ofs | hex dump | ascii |
---|
0000 | 53 51 4c 69 74 65 20 66 6f 72 6d 61 74 20 33 00 20 00 01 01 00 40 20 20 00 00 00 0a 00 00 00 da | SQLite.format.3......@.......... |
0020 | 00 00 00 00 00 00 00 00 00 00 00 05 00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 | ................................ |
0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0a | ................................ |
0060 | 00 2e 6e b8 0d 00 00 00 03 1e 74 00 1f 77 1e db 1e 74 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ..n.......t..w...t.............. |
0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
01a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
01c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
01e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
02a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
02c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
02e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
03a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
03c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
03e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
04a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
04c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
04e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
05a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
05c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
05e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
06a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
06c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
06e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
07a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
07c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
07e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
08a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
08c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
08e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
09a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
09c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
09e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
0fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
19a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
19c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
19e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 65 03 07 17 19 19 01 81 25 74 61 62 | ....................e.......%tab |
1e80 | 6c 65 72 65 61 64 6d 65 72 65 61 64 6d 65 04 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 61 64 | lereadmereadme.CREATE.TABLE.read |
1ea0 | 6d 65 28 0a 20 20 6d 73 67 20 54 45 58 54 20 2d 2d 20 48 75 6d 61 6e 2d 72 65 61 64 61 62 6c 65 | me(...msg.TEXT.--.Human-readable |
1ec0 | 20 64 65 73 63 72 69 70 74 69 6f 6e 20 6f 66 20 74 68 69 73 20 66 69 6c 65 0a 29 81 19 02 07 17 | .description.of.this.file.)..... |
1ee0 | 15 15 01 82 15 74 61 62 6c 65 78 73 71 6c 78 73 71 6c 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .....tablexsqlxsql.CREATE.TABLE. |
1f00 | 78 73 71 6c 28 0a 20 20 73 71 6c 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | xsql(...sqlid.INTEGER.PRIMARY.KE |
1f20 | 59 2c 20 20 20 2d 2d 20 53 51 4c 20 73 63 72 69 70 74 20 69 64 0a 20 20 73 71 6c 74 65 78 74 20 | Y,...--.SQL.script.id...sqltext. |
1f40 | 54 45 58 54 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 2d 20 54 65 78 74 20 6f 66 20 | TEXT.................--.Text.of. |
1f60 | 53 51 4c 20 73 74 61 74 65 6d 65 6e 74 73 20 74 6f 20 72 75 6e 0a 29 81 06 01 07 17 11 11 01 81 | SQL.statements.to.run.)......... |
1f80 | 77 74 61 62 6c 65 64 62 64 62 02 43 52 45 41 54 45 20 54 41 42 4c 45 20 64 62 28 0a 20 20 64 62 | wtabledbdb.CREATE.TABLE.db(...db |
1fa0 | 69 64 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 2d 2d 20 64 61 74 61 62 | id.INTEGER.PRIMARY.KEY,.--.datab |
1fc0 | 61 73 65 20 69 64 0a 20 20 64 62 63 6f 6e 74 65 6e 74 20 42 4c 4f 42 20 20 20 20 20 20 20 20 20 | ase.id...dbcontent.BLOB......... |
1fe0 | 20 20 20 2d 2d 20 64 61 74 61 62 61 73 65 20 64 69 73 6b 20 66 69 6c 65 20 69 6d 61 67 65 0a 29 | ...--.database.disk.file.image.) |
2000 | 0d 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
21a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
21c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
21e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
23a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
23c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
23e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
25a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
25c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
25e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
27a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
27c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
27e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
29a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
29c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
29e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
31a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
31c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
31e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
33a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
33c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
33e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
35a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
35c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
35e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
36a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
36c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
36e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
37a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
37c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
37e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
39a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
39c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
39e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4000 | 05 00 00 00 d5 1b 0b 00 00 00 00 da 1f fb 1f f6 1f f1 1f ec 1f e7 1f e2 1f dd 1f d8 1f d3 1f cd | ................................ |
4020 | 1f c7 1f c1 1f bb 1f b5 1f af 1f a9 1f a3 1f 9d 1f 97 1f 91 1f 8b 1f 85 1f 7f 1f 79 1f 73 1f 6d | ...........................y.s.m |
4040 | 1f 67 1f 61 1f 5b 1f 55 1f 4f 1f 49 1f 43 1f 3d 1f 37 1f 31 1f 2b 1f 25 1f 1f 1f 19 1f 13 1f 0d | .g.a.[.U.O.I.C.=.7.1.+.%........ |
4060 | 1f 07 1f 01 1e fb 1e f5 1e ef 1e e9 1e e3 1e dd 1e d7 1e d1 1e cb 1e c5 1e bf 1e b9 1e b3 1e ad | ................................ |
4080 | 1e a7 1e a1 1e 9b 1e 95 1e 8f 1e 89 1e 83 1e 7d 1e 77 1e 71 1e 6b 1e 65 1e 5f 1e 59 1e 53 1e 4d | ...............}.w.q.k.e._.Y.S.M |
40a0 | 1e 47 1e 41 1e 3b 1e 35 1e 2f 1e 29 1e 23 1e 1d 1e 17 1e 11 1e 0b 1e 05 1d ff 1d f9 1d f3 1d ed | .G.A.;.5./.).#.................. |
40c0 | 1d e7 1d e1 1d db 1d d5 1d cf 1d c9 1d c3 1d bd 1d b7 1d b1 1d ab 1d a5 1d 9f 1d 99 1d 93 1d 8d | ................................ |
40e0 | 1d 87 1d 81 1d 7b 1d 75 1d 6f 1d 69 1d 63 1d 5d 1d 57 1d 51 1d 4b 1d 45 1d 3f 1d 39 1d 33 1d 2d | .....{.u.o.i.c.].W.Q.K.E.?.9.3.- |
4100 | 1d 27 1d 21 1d 1b 1d 15 1d 0f 1d 09 1d 03 1c fd 1c f7 1c f1 1c eb 1c e5 1c df 1c d9 1c d3 1c cd | .'.!............................ |
4120 | 1c c7 1c c1 1c bb 1c b5 1c af 1c a9 1c a3 1c 9d 1c 97 1c 91 1c 8b 1c 85 1c 7f 1c 79 1c 73 1c 6d | ...........................y.s.m |
4140 | 1c 67 1c 61 1c 5b 1c 55 1c 4f 1c 49 1c 43 1c 3d 1c 37 1c 31 1c 2b 1c 25 1c 1f 1c 19 1c 13 1c 0d | .g.a.[.U.O.I.C.=.7.1.+.%........ |
4160 | 1c 07 1c 01 1b fb 1b f5 1b ef 1b e9 1b e3 1b dd 1b d7 1b d1 1b cb 1b c5 1b bf 1b b9 1b b3 1b ad | ................................ |
4180 | 1b a7 1b a1 1b 9b 1b 95 1b 8f 1b 89 1b 83 1b 7d 1b 77 1b 71 1b 6b 1b 65 1b 5f 1b 59 1b 53 1b 4d | ...............}.w.q.k.e._.Y.S.M |
41a0 | 1b 47 1b 41 1b 3b 1b 35 1b 2f 1b 29 1b 23 1b 1d 1b 17 1b 11 1b 0b 4e 53 45 52 54 20 4f 4e 20 74 | .G.A.;.5./.).#........NSERT.ON.t |
41c0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
41e0 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
4200 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
4220 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
4240 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
4260 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
4280 | 4c 55 45 53 28 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES(.replace(1,1,1),printf('%d, |
42a0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
42c0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
42e0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
4300 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
4320 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
4340 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
4360 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
4380 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
43a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
43c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
43e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
4400 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
4420 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
4440 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
4460 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
4480 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
44a0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
44c0 | 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c;1.WHERE.c<0;...SELECT.*.F |
44e0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 0d 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c | ROM.record;..Q....'..CREATE.TABL |
4500 | 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a..char(1)PRIMARY.KEY,.b.in |
4520 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
4540 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
4560 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
4580 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
45a0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ).........VALUES('bsert',printf( |
45c0 | 27 25 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%c.%d,%d',new.a,new.b,new.c));. |
45e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
4600 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
4620 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
4640 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%q,%d,%d',new. |
4660 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
4680 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
46a0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
46c0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
46e0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
4700 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
4720 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
4740 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
4760 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
4780 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
47a0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
47c0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
47e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
4800 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
4820 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
4840 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
4860 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
4880 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
48a0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
48c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
48e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
4900 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
4920 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
4940 | 88 49 0c 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 | .I.......CREATE.TABLE.t1(a..char |
4960 | 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | (1)PRIMARY.KEY,.b.int,.c.DEFAULT |
4980 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
49a0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
49c0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
49e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
4a00 | 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c 6e | LUES('bsert',printf(.glob(1,1),n |
4a20 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
4a40 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
4a60 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
4a80 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
4aa0 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
4ac0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
4ae0 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
4b00 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
4b20 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
4b40 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
4b60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
4b80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
4ba0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
4bc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
4be0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
4c00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
4c20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
4c40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
4c60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
4c80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
4ca0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
4cc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
4ce0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
4d00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
4d20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
4d40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
4d60 | 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c;1.WHERE.c<0;...SELECT.*.F |
4d80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 0b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c | ROM.record;..Y....7..CREATE.TABL |
4da0 | 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a..char(1)PRIMARY.KEY,.b.in |
4dc0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
4de0 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
4e00 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
4e20 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4e40 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
4e60 | 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%g,%d,%d',new.a,new.b,n |
4e80 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
4ea0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
4ec0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
4ee0 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c | ES('after-insert',printf('%g,%d, |
4f00 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
4f20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
4f40 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
4f60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
4f80 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
4fa0 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
4fc0 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
4fe0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
5000 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
5020 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
5040 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
5060 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
5080 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
50a0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
50c0 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
50e0 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
5100 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
5120 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
5140 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
5160 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
5180 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
51a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
51c0 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
51e0 | 72 65 63 6f 72 64 3b 0a 82 0d 0a 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | record;..........CREATE.TABLE.t1 |
5200 | 28 20 61 2c 62 61 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 49 4e | (.a,ba,INTEGER.PRIMARY.KEY,.b,IN |
5220 | 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T,.c.DEFAULT.0);...CREATE.UNIQUE |
5240 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
5260 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
5280 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
52a0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
52c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
52e0 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 0d 09 04 00 84 1f 20 | LECT.DISTINCT*.FROM.t1;......... |
5300 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 61 20 61 2c 62 45 47 45 52 20 50 | .CREATE.TABLE.t1(.a,ba.a,bEGER.P |
5320 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.INT,.c.DEFAULT.0); |
5340 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
5360 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
5380 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
53a0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
53c0 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
53e0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 | DO.NOTHING;...SELECT.DISTINCT*.F |
5400 | 52 4f 4d 20 74 31 3b 0a 82 0d 08 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ROM.t1;..........CREATE.TABLE.t1 |
5420 | 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 49 4e | (.a,ba.INTEGER.PRIMARY.KEY,.b,IN |
5440 | 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T,.c.DEFAULT.0);...CREATE.UNIQUE |
5460 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
5480 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
54a0 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
54c0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
54e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
5500 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 0d 07 04 00 84 1f 20 | LECT.DISTINCT*.FROM.t1;......... |
5520 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.t1(.a,ba.INTEGER.P |
5540 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 49 2c 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b,I,T,.c.DEFAULT.0); |
5560 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
5580 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
55a0 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
55c0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
55e0 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
5600 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 | DO.NOTHING;...SELECT.DISTINCT*.F |
5620 | 52 4f 4d 20 74 31 3b 0a 82 0d 06 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ROM.t1;..........CREATE.TABLE.t1 |
5640 | 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e | (.a,ba.INTEGER.PRIMARY.KEY,.b.IN |
5660 | 54 ac 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T..c.DEFAULT.0);...CREATE.UNIQUE |
5680 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
56a0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
56c0 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
56e0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
5700 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
5720 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 0d 05 04 00 84 1f 20 | LECT.DISTINCT*.FROM.t1;......... |
5740 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.t1(.a,ba.INTEGER.P |
5760 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.INT,.c.DEFAULT.0); |
5780 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
57a0 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
57c0 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
57e0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
5800 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
5820 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 | DO.NOTHING;...SELECT.DISTINCT*.F |
5840 | 52 4f 4d 20 74 31 3b 0a 82 0d 04 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ROM.t1;..........CREATE.TABLE.t1 |
5860 | 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 44 45 46 41 55 4c 54 20 4b 45 59 2c 20 62 2c 49 4e | (.a,ba.INTEGER.DEFAULT.KEY,.b,IN |
5880 | 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T,.c.DEFAULT.0);...CREATE.UNIQUE |
58a0 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
58c0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
58e0 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
5900 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
5920 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
5940 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 88 59 03 04 00 91 37 20 | LECT.DISTINCT*.FROM.t1;..Y....7. |
5960 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(.a,bTEGER.PRIMA |
5980 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
59a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
59c0 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
59e0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
5a00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
5a20 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fore-insert',printf('%d,%d,%d',n |
5a40 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
5a60 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
5a80 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
5aa0 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
5ac0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
5ae0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
5b00 | 42 45 46 4f 52 45 20 55 50 44 41 00 00 00 d9 9e 1d 00 00 00 d8 9d 6f 00 00 00 d7 9d 4b 00 00 00 | BEFORE.UPDA...........o.....K... |
5b20 | d6 9d 20 00 00 00 d5 9c 73 00 00 00 d4 9c 3d 00 00 00 d3 9c 1b 00 00 00 d2 9b 78 00 00 00 d1 9b | ........s.....=...........x..... |
5b40 | 4a 00 00 00 d0 9b 25 00 00 00 cf 9a 7f 00 00 00 ce 9a 59 00 00 00 cd 9a 33 00 00 00 cc 9a 0a 00 | J.....%...........Y.....3....... |
5b60 | 00 00 cb 99 64 00 00 00 ca 99 37 00 00 00 c9 99 11 00 00 00 c8 98 67 00 00 00 c7 98 3b 00 00 00 | ....d.....7...........g.....;... |
5b80 | c6 98 22 00 00 00 c5 98 0e 00 00 00 c4 97 7a 00 00 00 c3 97 62 00 00 00 c2 97 4f 00 00 00 c1 97 | .."...........z.....b.....O..... |
5ba0 | 3c 00 00 00 c0 97 21 00 00 00 bf 97 07 00 00 00 be 96 6c 00 00 00 bd 96 50 00 00 00 bc 96 35 00 | <.....!...........l.....P.....5. |
5bc0 | 00 00 bb 96 1d 00 00 00 ba 96 07 00 00 00 b9 95 6b 00 00 00 b8 95 4e 00 00 00 b7 95 33 00 00 00 | ................k.....N.....3... |
5be0 | b6 95 19 00 00 00 b5 95 05 00 00 00 b4 94 66 00 00 00 b3 94 44 00 00 00 b2 94 25 00 00 00 b1 94 | ..............f.....D.....%..... |
5c00 | 06 00 00 00 b0 93 68 00 00 00 af 93 49 00 00 00 ae 93 2a 00 00 00 ad 93 08 00 00 00 ac 92 6a 00 | ......h.....I.....*...........j. |
5c20 | 00 00 ab 92 4c 00 00 00 aa 92 25 00 00 00 a9 91 75 00 00 00 a8 91 4a 00 00 00 a7 91 2f 00 00 00 | ....L.....%.....u.....J...../... |
5c40 | a6 91 18 00 00 00 a5 91 05 00 00 00 a4 90 6f 00 00 00 a3 90 58 00 00 00 a2 90 40 00 00 00 a1 90 | ..............o.....X.....@..... |
5c60 | 29 00 00 00 a0 90 16 00 00 00 9f 90 0b 00 00 00 9e 90 00 00 00 00 9d 8f 75 00 00 00 9c 8f 6a 00 | ).......................u.....j. |
5c80 | 00 00 9b 8f 5f 00 00 00 9a 8f 54 00 00 00 99 8f 48 00 00 00 98 8f 3d 00 00 00 97 8f 32 00 00 00 | ...._.....T.....H.....=.....2... |
5ca0 | 96 8f 27 00 00 00 95 8f 1c 00 00 00 94 8f 11 00 00 00 93 8f 04 00 00 00 92 8e 76 00 00 00 91 8e | ..'.......................v..... |
5cc0 | 68 00 00 00 90 8e 5c 00 00 00 8f 8e 50 00 00 00 8e 8e 45 00 00 00 8d 8e 3a 00 00 00 8c 8e 2f 00 | h.....\.....P.....E.....:...../. |
5ce0 | 00 00 8b 8e 24 00 00 00 8a 8e 18 00 00 00 89 8e 0c 00 00 00 88 8e 00 00 00 00 87 8d 75 00 00 00 | ....$.......................u... |
5d00 | 86 8d 6a 00 00 00 85 8d 5f 00 00 00 84 8d 54 00 00 00 83 8d 49 00 00 00 82 8d 3e 00 00 00 81 8d | ..j....._.....T.....I.....>..... |
5d20 | 33 00 00 00 80 8d 28 00 00 00 7f 8d 1d 00 00 00 7e 8d 12 00 00 00 7d 8d 07 00 00 00 7c 8c 7c 00 | 3.....(.........~.....}.....|.|. |
5d40 | 00 00 7b 8c 71 00 00 00 7a 8c 66 00 00 00 79 8c 5b 00 00 00 78 8c 50 00 00 00 77 8c 44 00 00 00 | ..{.q...z.f...y.[...x.P...w.D... |
5d60 | 76 8c 38 00 00 00 75 8c 2d 00 00 00 74 8c 22 00 00 00 73 8c 17 00 00 00 72 8c 0c 00 00 00 71 8c | v.8...u.-...t."...s.....r.....q. |
5d80 | 01 00 00 00 70 8b 76 00 00 00 6f 8b 6b 00 00 00 6e 8b 60 00 00 00 6d 8b 55 00 00 00 6c 8b 4a 00 | ....p.v...o.k...n.`...m.U...l.J. |
5da0 | 00 00 6b 8b 3f 00 00 00 6a 8b 34 00 00 00 69 8b 29 00 00 00 68 8b 1e 00 00 00 67 8b 13 00 00 00 | ..k.?...j.4...i.)...h.....g..... |
5dc0 | 66 8b 07 00 00 00 65 8a 7a 00 00 00 64 8a 6d 00 00 00 63 8a 60 00 00 00 62 8a 54 00 00 00 61 8a | f.....e.z...d.m...c.`...b.T...a. |
5de0 | 48 00 00 00 60 8a 3c 00 00 00 5f 8a 2e 00 00 00 5e 8a 22 00 00 00 5d 8a 0c 00 00 00 5c 89 5e 00 | H...`.<..._.....^."...].....\.^. |
5e00 | 00 00 5b 89 34 00 00 00 5a 89 0c 00 00 00 59 88 60 00 00 00 58 88 2f 00 00 00 57 88 04 00 00 00 | ..[.4...Z.....Y.`...X./...W..... |
5e20 | 56 87 54 00 00 00 55 87 19 00 00 00 54 86 60 00 00 00 53 86 4b 00 00 00 52 86 37 00 00 00 51 86 | V.T...U.....T.`...S.K...R.7...Q. |
5e40 | 2c 00 00 00 50 86 20 00 00 00 4f 86 10 00 00 00 4e 86 05 00 00 00 4d 85 74 00 00 00 4c 85 5d 00 | ,...P.....O.....N.....M.t...L.]. |
5e60 | 00 00 4b 85 47 00 00 00 4a 85 2d 00 00 00 49 85 14 00 00 00 48 84 7a 00 00 00 47 84 61 00 00 00 | ..K.G...J.-...I.....H.z...G.a... |
5e80 | 46 84 47 00 00 00 45 84 2a 00 00 00 44 84 0d 00 00 00 43 83 74 00 00 00 42 83 6d 00 00 00 41 83 | F.G...E.*...D.....C.t...B.m...A. |
5ea0 | 66 00 00 00 40 83 5f 00 00 00 3f 83 58 00 00 00 3e 83 51 00 00 00 3d 83 4a 00 00 00 3c 83 43 00 | f...@._...?.X...>.Q...=.J...<.C. |
5ec0 | 00 00 3b 83 3c 00 00 00 3a 83 35 00 00 00 39 83 2e 00 00 00 38 83 27 00 00 00 37 83 20 00 00 00 | ..;.<...:.5...9.....8.'...7..... |
5ee0 | 36 83 19 00 00 00 35 83 12 00 00 00 34 83 0b 00 00 00 33 83 04 00 00 00 32 82 7d 00 00 00 31 82 | 6.....5.....4.....3.....2.}...1. |
5f00 | 76 00 00 00 30 82 6f 00 00 00 2f 82 68 00 00 00 2e 82 61 00 00 00 2d 82 5a 00 00 00 2c 82 53 00 | v...0.o.../.h.....a...-.Z...,.S. |
5f20 | 00 00 2b 82 4c 00 00 00 2a 82 45 00 00 00 29 82 3e 00 00 00 28 82 37 00 00 00 27 82 30 00 00 00 | ..+.L...*.E...).>...(.7...'.0... |
5f40 | 26 82 29 00 00 00 25 82 22 00 00 00 24 82 1b 00 00 00 23 82 14 00 00 00 22 82 0d 00 00 00 21 82 | &.)...%."...$.....#.....".....!. |
5f60 | 06 00 00 00 20 81 7f 00 00 00 1f 81 78 00 00 00 1e 81 71 00 00 00 1d 81 6a 00 00 00 1c 81 63 00 | ............x.....q.....j.....c. |
5f80 | 00 00 1b 81 5c 00 00 00 1a 81 55 00 00 00 19 81 4e 00 00 00 18 81 47 00 00 00 17 81 40 00 00 00 | ....\.....U.....N.....G.....@... |
5fa0 | 16 81 39 00 00 00 15 81 32 00 00 00 14 81 2b 00 00 00 13 81 24 00 00 00 12 81 1d 00 00 00 11 81 | ..9.....2.....+.....$........... |
5fc0 | 16 00 00 00 10 81 0f 00 00 00 0f 81 08 00 00 00 0e 81 01 00 00 00 0d 79 00 00 00 0c 5d 00 00 00 | .......................y....]... |
5fe0 | 0b 40 00 00 00 0a 31 00 00 00 09 2a 00 00 00 08 23 00 00 00 07 1c 00 00 00 06 15 00 00 00 05 0e | .@....1....*....#............... |
6000 | 0d 00 00 00 01 1f e7 00 1f e7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
61a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
61c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
61e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
63a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
63c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
63e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
65a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
65c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
65e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
67a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
67c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
67e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
69a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
69c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
69e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6fe0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7000 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
71a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
71c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
71e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
73a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
73c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
73e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
75a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
75c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
75e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
77a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
77c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
77e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
79a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
79c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
79e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ca0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7cc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ce0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7d00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7d20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7d40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7d60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7d80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7da0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7dc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7de0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ea0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ec0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7ee0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7f00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7f20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7f40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7f60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7f80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7fa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7fc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7fe0 | 00 00 00 00 00 00 00 17 01 02 37 54 65 73 74 20 63 61 73 65 73 20 66 6f 72 20 55 50 53 45 52 54 | ..........7Test.cases.for.UPSERT |
8000 | 0d 00 00 00 0e 00 a0 00 1f 50 1d b4 19 58 18 48 17 38 16 28 15 18 14 08 12 f8 11 e8 0d 8c 09 40 | .........P...X.H.8.(...........@ |
8020 | 04 ec 00 a0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80a0 | 88 49 0e 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 | .I.......CREATE.TABLE.t1(a..char |
80c0 | 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | (1)PRIMARY.KEY,.b.int,.c.DEFAULT |
80e0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
8100 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
8120 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
8140 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
8160 | 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | LUES('bsert',printf('%d,%d,%d',n |
8180 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
81a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
81c0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
81e0 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
8200 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
8220 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
8240 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
8260 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
8280 | 4c 55 45 53 28 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES(.replace(1,1,1),printf('%d, |
82a0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
82c0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
82e0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
8300 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
8320 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
8340 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
8360 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
8380 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
83a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
83c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
83e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
8400 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
8420 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
8440 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
8460 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
8480 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
84a0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
84c0 | 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c;1.WHERE.c<0;...SELECT.*.F |
84e0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 0d 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c | ROM.record;..Q....'..CREATE.TABL |
8500 | 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a..char(1)PRIMARY.KEY,.b.in |
8520 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
8540 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
8560 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
8580 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
85a0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ).........VALUES('bsert',printf( |
85c0 | 27 25 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%c.%d,%d',new.a,new.b,new.c));. |
85e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
8600 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
8620 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
8640 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%q,%d,%d',new. |
8660 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
8680 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
86a0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
86c0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
86e0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
8700 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
8720 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
8740 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
8760 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
8780 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
87a0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
87c0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
87e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
8800 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
8820 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
8840 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
8860 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
8880 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
88a0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
88c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
88e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
8900 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
8920 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
8940 | 88 49 0c 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 | .I.......CREATE.TABLE.t1(a..char |
8960 | 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | (1)PRIMARY.KEY,.b.int,.c.DEFAULT |
8980 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
89a0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
89c0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
89e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
8a00 | 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c 6e | LUES('bsert',printf(.glob(1,1),n |
8a20 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
8a40 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
8a60 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
8a80 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
8aa0 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
8ac0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
8ae0 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
8b00 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
8b20 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
8b40 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
8b60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
8b80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
8ba0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
8bc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
8be0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
8c00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
8c20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
8c40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
8c60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
8c80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
8ca0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
8cc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
8ce0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
8d00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
8d20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
8d40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
8d60 | 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c;1.WHERE.c<0;...SELECT.*.F |
8d80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 0b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c | ROM.record;..Y....7..CREATE.TABL |
8da0 | 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a..char(1)PRIMARY.KEY,.b.in |
8dc0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
8de0 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
8e00 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
8e20 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
8e40 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
8e60 | 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%g,%d,%d',new.a,new.b,n |
8e80 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
8ea0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
8ec0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
8ee0 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c | ES('after-insert',printf('%g,%d, |
8f00 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
8f20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
8f40 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
8f60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
8f80 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
8fa0 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
8fc0 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
8fe0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
9000 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
9020 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
9040 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
9060 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
9080 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
90a0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
90c0 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
90e0 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
9100 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
9120 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
9140 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
9160 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
9180 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
91a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
91c0 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
91e0 | 72 65 63 6f 72 64 3b 0a 82 0d 0a 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | record;..........CREATE.TABLE.t1 |
9200 | 28 20 61 2c 62 61 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 49 4e | (.a,ba,INTEGER.PRIMARY.KEY,.b,IN |
9220 | 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T,.c.DEFAULT.0);...CREATE.UNIQUE |
9240 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
9260 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
9280 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
92a0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
92c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
92e0 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 0d 09 04 00 84 1f 20 | LECT.DISTINCT*.FROM.t1;......... |
9300 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 61 20 61 2c 62 45 47 45 52 20 50 | .CREATE.TABLE.t1(.a,ba.a,bEGER.P |
9320 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.INT,.c.DEFAULT.0); |
9340 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
9360 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
9380 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
93a0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
93c0 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
93e0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 | DO.NOTHING;...SELECT.DISTINCT*.F |
9400 | 52 4f 4d 20 74 31 3b 0a 82 0d 08 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ROM.t1;..........CREATE.TABLE.t1 |
9420 | 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 49 4e | (.a,ba.INTEGER.PRIMARY.KEY,.b,IN |
9440 | 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T,.c.DEFAULT.0);...CREATE.UNIQUE |
9460 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
9480 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
94a0 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
94c0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
94e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
9500 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 0d 07 04 00 84 1f 20 | LECT.DISTINCT*.FROM.t1;......... |
9520 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.t1(.a,ba.INTEGER.P |
9540 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 49 2c 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b,I,T,.c.DEFAULT.0); |
9560 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
9580 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
95a0 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
95c0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
95e0 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
9600 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 | DO.NOTHING;...SELECT.DISTINCT*.F |
9620 | 52 4f 4d 20 74 31 3b 0a 82 0d 06 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ROM.t1;..........CREATE.TABLE.t1 |
9640 | 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e | (.a,ba.INTEGER.PRIMARY.KEY,.b.IN |
9660 | 54 ac 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T..c.DEFAULT.0);...CREATE.UNIQUE |
9680 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
96a0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
96c0 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
96e0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
9700 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
9720 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 0d 05 04 00 84 1f 20 | LECT.DISTINCT*.FROM.t1;......... |
9740 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.t1(.a,ba.INTEGER.P |
9760 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.INT,.c.DEFAULT.0); |
9780 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
97a0 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
97c0 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
97e0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
9800 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
9820 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 | DO.NOTHING;...SELECT.DISTINCT*.F |
9840 | 52 4f 4d 20 74 31 3b 0a 82 0d 04 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ROM.t1;..........CREATE.TABLE.t1 |
9860 | 28 20 61 2c 62 61 20 49 4e 54 45 47 45 52 20 44 45 46 41 55 4c 54 20 4b 45 59 2c 20 62 2c 49 4e | (.a,ba.INTEGER.DEFAULT.KEY,.b,IN |
9880 | 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 | T,.c.DEFAULT.0);...CREATE.UNIQUE |
98a0 | 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 | .INDEX.t1x1.ON.t1(a+b);...INSERT |
98c0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(7,8).ON.CON |
98e0 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 | FLICT(a+b).DO.NOTHING;...INSERT. |
9900 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f | INTO.t1(a,b).VALUES(8,7),(9,6).O |
9920 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 | N.CONFLICT(a+b).DO.NOTHING;...SE |
9940 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 88 59 03 04 00 91 37 20 | LECT.DISTINCT*.FROM.t1;..Y....7. |
9960 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 2c 62 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(.a,bTEGER.PRIMA |
9980 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
99a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
99c0 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
99e0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
9a00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
9a20 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fore-insert',printf('%d,%d,%d',n |
9a40 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
9a60 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
9a80 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
9aa0 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
9ac0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
9ae0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
9b00 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
9b20 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
9b40 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
9b60 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
9b80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
9ba0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
9bc0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
9be0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
9c00 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
9c20 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
9c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9c60 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
9c80 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
9ca0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
9cc0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
9ce0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
9d00 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
9d20 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
9d40 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
9d60 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
9d80 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
9da0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 83 19 02 04 00 86 37 20 20 43 52 45 | LECT.*.FROM.record;.......7..CRE |
9dc0 | 41 54 45 20 54 41 42 4c 45 20 65 78 63 6c 75 64 65 64 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 2c | ATE.TABLE.excluded(a.INT,.b.INT, |
9de0 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 | .c.INT.DEFAULT.0);...CREATE.UNIQ |
9e00 | 55 45 20 49 4e 44 45 58 20 65 78 63 6c 75 64 65 64 61 62 20 4f 4e 20 65 78 63 6c 75 64 65 64 28 | UE.INDEX.excludedab.ON.excluded( |
9e20 | 61 2c 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 65 78 63 6c 75 64 65 64 28 61 2c 62 | a,b);...INSERT.INTO.excluded(a,b |
9e40 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 2c | ).VALUES(1,2),(1,2),(3,4),(1,2), |
9e60 | 28 35 2c 36 29 2c 28 33 2c 34 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 61 29 | (5,6),(3,4).....ON.CONFLICT(b,a) |
9e80 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 65 78 63 6c 75 64 65 64 2e 63 2b 31 3b 0a 20 | .DO.UPDATE.SET.c=excluded.c+1;.. |
9ea0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 65 78 63 6c 75 64 65 64 20 41 53 20 62 61 73 65 28 61 2c | .INSERT.INTO.excluded.AS.base(a, |
9ec0 | 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 38 29 2c 28 31 2c 32 2c 33 29 0a 20 20 20 20 4f | b,c).VALUES(1,2,8),(1,2,3).....O |
9ee0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | N.CONFLICT(b,a).DO.UPDATE.SET.c= |
9f00 | 65 78 63 6c 75 64 65 64 2e 63 2b 31 20 57 48 45 52 45 20 62 61 73 65 2e 63 3c 65 78 63 6c 75 64 | excluded.c+1.WHERE.base.c<exclud |
9f20 | 65 64 2e 63 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 65 78 63 6c 75 | ed.c;...SELECT.*,.'x'.FROM.exclu |
9f40 | 64 65 64 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 81 2d 01 04 00 82 5f 00 52 45 41 54 45 20 54 41 | ded.ORDER.BY.a;..-...._.REATE.TA |
9f60 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
9f80 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT.0,...PRIMARY.KE |
9fa0 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
9fc0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
9fe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
a000 | 0d 00 00 00 07 01 c9 00 1b a5 17 51 13 01 0e b5 0a 69 06 1d 01 c9 00 00 00 00 00 00 00 00 00 00 | ...........Q.....i.............. |
a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a1c0 | 00 00 00 00 00 00 00 00 00 88 51 15 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ..........Q....'..CREATE.TABLE.t |
a1e0 | 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a..char(1)PRIMARY.KEY,.b.int,. |
a200 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
a220 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
a240 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
a260 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
a280 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | .......VALUES('bsert',printf('%d |
a2a0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
a2c0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
a2e0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
a300 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
a320 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%q,%d,%d',new.a,n |
a340 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
a360 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
a380 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
a3a0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
a3c0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
a3e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
a400 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
a420 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
a440 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
a460 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
a480 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
a4a0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
a4c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
a4e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
a500 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
a520 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
a540 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
a560 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
a580 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
a5a0 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
a5c0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
a5e0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
a600 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 14 | c<0;...SELECT.*.FROM.record;..I. |
a620 | 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 | ......CREATE.TABLE.t1(a..char(1) |
a640 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
a660 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
a680 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
a6a0 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
a6c0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
a6e0 | 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | S('bsert',printf('%d,%d,%d',new. |
a700 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
a720 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
a740 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
a760 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
a780 | 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%q,%d,%d',new.a,new.b,new.c)) |
a7a0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
a7c0 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
a7e0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
a800 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
a820 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 3c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d'<................... |
a840 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
a860 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
a880 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
a8a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
a8c0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
a8e0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
a900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
a920 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
a940 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
a960 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
a980 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
a9a0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
a9c0 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
a9e0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
aa00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
aa20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
aa40 | 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c;1.WHERE.c<0;...SELECT.*.FROM |
aa60 | 20 72 65 63 6f 72 64 3b 0a 88 49 13 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .record;..I.......CREATE.TABLE.t |
aa80 | 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a..char(1)PRIMARY.KEY,.b.int,. |
aaa0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
aac0 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
aae0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
ab00 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
ab20 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | .......VALUES('bsert',printf('%d |
ab40 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
ab60 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
ab80 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
aba0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
abc0 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%q,%d,%d',new.a,n |
abe0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
ac00 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
ac20 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
ac40 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
ac60 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
ac80 | 20 20 20 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ....json_array(1,1,1),old.b,old. |
aca0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
acc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
ace0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
ad00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
ad20 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
ad40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
ad60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
ad80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
ada0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
adc0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
ade0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
ae00 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
ae20 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
ae40 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
ae60 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
ae80 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c;1.WHERE.c<0;...S |
aea0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 12 04 00 91 17 20 20 43 52 | ELECT.*.FROM.record;..I.......CR |
aec0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a..char(1)PRIMARY. |
aee0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
af00 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
af20 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
af40 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
af60 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 | ecord(x,y).........VALUES('bsert |
af80 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
afa0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
afc0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
afe0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
b000 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 | UES('after-insert',printf('%q,%d |
b020 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
b040 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
b060 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
b080 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
b0a0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
b0c0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ,%d',.......................old. |
b0e0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
b100 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
b120 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
b140 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
b160 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
b180 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
b1a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 6e 74 66 28 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f | .............printf(1,1),old.b,o |
b1c0 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
b1e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
b200 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
b220 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
b240 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
b260 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
b280 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
b2a0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
b2c0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c;1.WH |
b2e0 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
b300 | 0a 88 4d 11 04 00 91 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 | ..M.......CREATE.TABLE.t1(a..cha |
b320 | 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | r(1)PRIMARY.KEY,.b.int,.c.DEFAUL |
b340 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
b360 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
b380 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
b3a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
b3c0 | 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | ALUES('bsert',printf('%d,%d,%d', |
b3e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
b400 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.INSERT.ON. |
b420 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
b440 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
b460 | 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%q,%d,%d',new.a,new.b,new |
b480 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
b4a0 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
b4c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
b4e0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
b500 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
b520 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
b540 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
b560 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
b580 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
b5a0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
b5c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
b5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
b600 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
b620 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
b640 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
b660 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
b680 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
b6a0 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 20 7c 7c 20 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 | DATE.SET.c=t1.c.||.+1;...SELECT. |
b6c0 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | *.FROM.record;...DELETE.FROM.rec |
b6e0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
b700 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
b720 | 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 | ATE.SET.c=c;1.WHERE.c<0;...SELEC |
b740 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 10 04 00 91 27 20 20 43 52 45 41 54 45 | T.*.FROM.record;..Q....'..CREATE |
b760 | 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a..char(1)PRIMARY.KEY, |
b780 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
b7a0 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
b7c0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
b7e0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
b800 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 | d(x,y).........VALUES('bsert',pr |
b820 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
b840 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | c));...END;...CREATE.TRIGGER.r2. |
b860 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
b880 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.record(x,y).....VALUES( |
b8a0 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 | 'after-insert',printf('%q,%d,%d' |
b8c0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
b8e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
b900 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
b920 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
b940 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
b960 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
b980 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
b9a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
b9c0 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
b9e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
ba00 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
ba20 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
ba40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
ba60 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
ba80 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
baa0 | 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(9,2);...DELETE.FROM.record;... |
bac0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
bae0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
bb00 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
bb20 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
bb40 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
bb60 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
bb80 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
bba0 | 6f 72 64 3b 0a 88 58 0f 04 00 91 35 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | ord;..X....5..CREATE.TABLE.t1(a. |
bbc0 | 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | .char(1)PRIMARY.KEY,.b.int,.c.DE |
bbe0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
bc00 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
bc20 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
bc40 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
bc60 | 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ...VALUES('bsert',printf('%d,%d, |
bc80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
bca0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
bcc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
bce0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
bd00 | 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%q,%d,%d',new.a,new.b |
bd20 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
bd40 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
bd60 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
bd80 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
bda0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
bde0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
be00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
be20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
be40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
be60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
be80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
bea0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
bec0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
bee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
bf00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
bf20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
bf40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
bf60 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
bf80 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
bfa0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
bfc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
bfe0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 41 4e 41 4c 59 5a 45 0a | ...SELECT.*.FROM.record;ANALYZE. |
c000 | 0d 00 00 00 07 01 d1 00 1b ac 17 60 13 14 0e c0 0a 6c 06 1d 01 d1 00 00 00 00 00 00 00 00 00 00 | ...........`.....l.............. |
c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 1c 04 00 91 17 20 20 43 52 45 41 54 45 | ..................I.......CREATE |
c1e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 28 30 29 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.CHECK(0)PRIMARY.KEY, |
c200 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
c220 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
c240 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
c260 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
c280 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 | d(x,y).........VALUES('bsert',pr |
c2a0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
c2c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | c));...END;...CREATE.TRIGGER.r2. |
c2e0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
c300 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.record(x,y).....VALUES( |
c320 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 | 'after-insert',printf('%q,%d,%d' |
c340 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
c360 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
c380 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
c3a0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
c3c0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
c3e0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ,.......................old.a,ol |
c400 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
c420 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
c440 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
c460 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
c480 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
c4a0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
c4c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
c4e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
c500 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
c520 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
c540 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
c560 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
c580 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
c5a0 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
c5c0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
c5e0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
c600 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4c 1b | c<0;...SELECT.*.FROM.record;..L. |
c620 | 04 00 91 1d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 28 20 2d | ......CREATE.TABLE.t1(a.CHECK(.- |
c640 | 31 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | 11)PRIMARY.KEY,.b.int,.c.DEFAULT |
c660 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
c680 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
c6a0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
c6c0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
c6e0 | 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | LUES('bsert',printf('%d,%d,%d',n |
c700 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
c720 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
c740 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
c760 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
c780 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
c7a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
c7c0 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
c7e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
c800 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
c820 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
c840 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
c860 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
c880 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
c8a0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
c8c0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
c8e0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
c900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
c920 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
c940 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
c960 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
c980 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
c9a0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
c9c0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
c9e0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
ca00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
ca20 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
ca40 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
ca60 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 1a 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c | ROM.record;..Q....'..CREATE.TABL |
ca80 | 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a..char(1)PRIMARY.KEY,.b.in |
caa0 | 74 2c 20 63 20 63 68 61 72 28 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | t,.c.char(1).DEFAULT.0);...CREAT |
cac0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
cae0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
cb00 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
cb20 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 | cord(x,y).........VALUES('bsert' |
cb40 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
cb60 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
cb80 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
cba0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
cbc0 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c | ES('after-insert',printf('%q,%d, |
cbe0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
cc00 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
cc20 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
cc40 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
cc60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
cc80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | %d',.......................old.a |
cca0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
ccc0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
cce0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
cd00 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
cd20 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
cd40 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
cd60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
cd80 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
cda0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
cdc0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
cde0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
ce00 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
ce20 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
ce40 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
ce60 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
ce80 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c;1.WHE |
cea0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
cec0 | 88 51 19 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 | .Q....'..CREATE.TABLE.t1(a..char |
cee0 | 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | (1)PRIMARY.KEY,.b.int,.c.DEFAULT |
cf00 | 2e 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
cf20 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
cf40 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
cf60 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
cf80 | 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | LUES('bsert',printf('%d,%d,%d',n |
cfa0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
cfc0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
cfe0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
d000 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
d020 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
d040 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
d060 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
d080 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
d0a0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
d0c0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
d0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
d100 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
d120 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
d140 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
d160 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
d180 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
d1a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
d1c0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
d1e0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
d200 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
d220 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
d240 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
d260 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
d280 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
d2a0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
d2c0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
d2e0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
d300 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 18 04 00 91 17 20 20 43 52 45 | LECT.*.FROM.record;..I.......CRE |
d320 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a..char(1)PRIMARY.K |
d340 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 b0 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT..);...CREAT |
d360 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
d380 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
d3a0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
d3c0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 | cord(x,y).........VALUES('bsert' |
d3e0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
d400 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
d420 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
d440 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
d460 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c | ES('after-insert',printf('%q,%d, |
d480 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
d4a0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
d4c0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
d4e0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
d500 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
d520 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | %d',.......................old.a |
d540 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
d560 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
d580 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
d5a0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
d5c0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
d5e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
d600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
d620 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
d640 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
d660 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
d680 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
d6a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
d6c0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
d6e0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
d700 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
d720 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c;1.WHE |
d740 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
d760 | 88 49 17 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 20 63 68 61 72 | .I.......CREATE.TABLE.t1(a..char |
d780 | 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | (1)PRIMARY.KEY,.b.int,.c.DEFAULT |
d7a0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
d7c0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
d7e0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
d800 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
d820 | 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 7a 2c 25 64 2c 25 64 27 2c 6e | LUES('bsert',printf('%z,%d,%d',n |
d840 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
d860 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
d880 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
d8a0 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
d8c0 | 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%q,%d,%d',new.a,new.b,new. |
d8e0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
d900 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
d920 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
d940 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
d960 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
d980 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
d9a0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
d9c0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
d9e0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
da00 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
da20 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
da40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
da60 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
da80 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
daa0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
dac0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
dae0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
db00 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
db20 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
db40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
db60 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
db80 | 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c;1.WHERE.c<0;...SELECT.*.F |
dba0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 16 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c | ROM.record;..Q....'..CREATE.TABL |
dbc0 | 45 20 74 31 28 61 20 20 63 68 61 72 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a..char(1)PRIMARY.KEY,.b.in |
dbe0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
dc00 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
dc20 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
dc40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
dc60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ).........VALUES('bsert',printf( |
dc80 | 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%q,%d,%d',new.a,new.b,new.c));. |
dca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
dcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
dce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
dd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%q,%d,%d',new. |
dd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
dd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
dd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
dd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
dda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
ddc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
dde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
de00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
de20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
de40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
de60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
de80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
dea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
dec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
dee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
df00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
df20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
df40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
df60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
df80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
e000 | 0d 00 00 00 07 01 dc 00 1b ae 17 62 13 16 0e ca 0a 74 06 28 01 dc 00 00 00 00 00 00 00 00 00 00 | ...........b.....t.(............ |
e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 23 04 | .............................I#. |
e1e0 | 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 28 b1 29 50 | .....CREATE.TABLE.t1(a.CHECK(.)P |
e200 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
e220 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
e240 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
e260 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
e280 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
e2a0 | 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | ('bsert',printf('%d,%d,%d',new.a |
e2c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
e2e0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
e300 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
e320 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
e340 | 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%q,%d,%d',new.a,new.b,new.c)); |
e360 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
e380 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
e3a0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
e3c0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
e3e0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
e400 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
e420 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
e440 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
e460 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
e480 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
e4a0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
e4c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
e4e0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
e500 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
e520 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
e540 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
e560 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
e580 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
e5a0 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
e5c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
e5e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
e600 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
e620 | 72 65 63 6f 72 64 3b 0a 88 49 22 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | record;..I"......CREATE.TABLE.t1 |
e640 | 28 61 20 43 48 45 43 4b 28 41 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.CHECK(A)PRIMARY.KEY,.b.int,.c |
e660 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
e680 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
e6a0 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
e6c0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
e6e0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ......VALUES('bsert',printf('%d, |
e700 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
e720 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
e740 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
e760 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
e780 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%q,%d,%d',new.a,ne |
e7a0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
e7c0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
e7e0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
e800 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
e820 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
e840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
e860 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
e880 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
e8a0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
e8c0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
e8e0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
e900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
e920 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
e940 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
e960 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
e980 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
e9a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
e9c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
e9e0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
ea00 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
ea20 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
ea40 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
ea60 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 53 21 04 00 91 2b 20 20 43 52 45 | LECT.*.FROM.record;..S!...+..CRE |
ea80 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 28 32 30 30 31 2d 30 31 2d 30 31 31 | ATE.TABLE.t1(a.CHECK(2001-01-011 |
eaa0 | 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | )PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
eac0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
eae0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
eb00 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
eb20 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
eb40 | 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | ES('bsert',printf('%d,%d,%d',new |
eb60 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
eb80 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
eba0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
ebc0 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
ebe0 | 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%q,%d,%d',new.a,new.b,new.c) |
ec00 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
ec20 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
ec40 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
ec60 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
ec80 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
eca0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
ecc0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
ece0 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
ed00 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
ed20 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
ed40 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
ed60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
ed80 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
eda0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
edc0 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
ede0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
ee00 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
ee20 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
ee40 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
ee60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
ee80 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
eea0 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
eec0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 49 20 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | M.record;..I.......CREATE.TABLE. |
eee0 | 74 31 28 61 20 43 48 45 43 4b 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 69 6e 74 2c | t1(a.CHECK(1)PRIMARY.KEY,.b,int, |
ef00 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
ef20 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
ef40 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
ef60 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
ef80 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | ........VALUES('bsert',printf('% |
efa0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
efc0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
efe0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
f000 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
f020 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%q,%d,%d',new.a, |
f040 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
f060 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
f080 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
f0a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
f0c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
f0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
f100 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
f120 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
f140 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
f160 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
f180 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
f1a0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
f1c0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
f1e0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
f200 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
f220 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
f240 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
f260 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
f280 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
f2a0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
f2c0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
f2e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
f300 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 1f 04 00 91 17 20 20 43 | SELECT.*.FROM.record;..I.......C |
f320 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 28 31 29 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.CHECK(1)PRIMARY |
f340 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
f360 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
f380 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
f3a0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
f3c0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 | record(x,y).........VALUES('bser |
f3e0 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
f400 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
f420 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
f440 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
f460 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 | LUES('after-insert',printf('%q,% |
f480 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
f4a0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
f4c0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
f4e0 | f2 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | .ecord(x,y).........VALUES('befo |
f500 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
f520 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | d,%d',.......................old |
f540 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
f560 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
f580 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
f5a0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
f5c0 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
f5e0 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
f600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
f620 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
f640 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
f660 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
f680 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
f6a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
f6c0 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
f6e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
f700 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
f720 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
f740 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
f760 | 3b 0a 88 49 1e 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 | ;..I.......CREATE.TABLE.t1(a.CHE |
f780 | 43 4b 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | CK(1)PRIMARY.KEY,.b.int,.c.DEFAU |
f7a0 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
f7c0 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
f7e0 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
f800 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
f820 | 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | VALUES('bsert',printf('%d,%d,%d' |
f840 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
f860 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
f880 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
f8a0 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
f8c0 | 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%q,%d,%d',new.a,new.b,ne |
f8e0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
f900 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
f920 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
f940 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
f960 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
f980 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
f9a0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
f9c0 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
f9e0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
fa00 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
fa20 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
fa60 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
fa80 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
faa0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
fac0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
fae0 | 55 45 53 28 31 2c 32 29 8a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
fb00 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
fb20 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
fb40 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
fb60 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
fb80 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELECT.* |
fba0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4f 1d 04 00 91 23 20 20 43 52 45 41 54 45 20 54 41 | .FROM.record;..O....#..CREATE.TA |
fbc0 | 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 28 31 29 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.CHECK(1)PRIMARY.KEY,.b. |
fbe0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
fc00 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
fc20 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
fc40 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
fc60 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 | ,y).........VALUES('bsert',print |
fc80 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
fca0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
fcc0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
fce0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
fd00 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%q,%d,%d',ne |
fd20 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
fd40 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
fd60 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
fd80 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
fda0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
fde0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
fe00 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
fe20 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
fe40 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
fe60 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
fe80 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
fec0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
fee0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
ff00 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
ff20 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
ff40 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
ff60 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
ff80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
ffa0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
ffc0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
ffe0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a | ;...SELECT.*.FROM.record;VACUUM. |
10000 | 0d 00 00 00 07 02 ff 00 1b a9 17 90 13 70 0f 4a 0b 31 07 18 02 ff 00 00 00 00 00 00 00 00 00 00 | .............p.J.1.............. |
10020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
101a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
101c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
101e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 | ................................ |
10300 | 16 2a 04 00 90 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 | .*...1..CREATE.TABLE.t1(a.INT.PR |
10320 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 | IMARY.KEY,.b.int,.c.DEFAULT.0).W |
10340 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | ITHOUT.ROWID;...CREATE.TRIGGER.r |
10360 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
10380 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
103a0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
103c0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
103e0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
10400 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
10420 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
10440 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
10460 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
10480 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
104a0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
104c0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
104e0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
10500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
10520 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
10540 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
10560 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
10580 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
105a0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
105c0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
105e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
10600 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
10620 | 29 3b 0a 20 2f 2a 20 2a 2f 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );../*.*/...INSERT.INTO.t1(a,b). |
10640 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
10660 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
10680 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
106a0 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | E.SET.c=t1.c+1;...DELETE.FROM.re |
106c0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
106e0 | 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ES(1,2).ON.CONFLICT.DO.NOTHING;. |
10700 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 61 2c 62 6f 72 64 3b 0a 88 16 29 04 00 90 31 20 | ..SELECT.*.FROM.a,bord;...)...1. |
10720 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b | .CREATE.TABLE.t1(a.INT.PRIMARY.K |
10740 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 | EY,.b.int,.c.DEFAULT.0).WITHOUT. |
10760 | 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | ROWID;...CREATE.TRIGGER.r1.BEFOR |
10780 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
107a0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
107c0 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-insert',printf('%d,%d,%d |
107e0 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
10800 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
10820 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
10840 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | d(x,y).........VALUES('after-ins |
10860 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
10880 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
108a0 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
108c0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
108e0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
10900 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
10920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
10940 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
10960 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
10980 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
109a0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
109c0 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
109e0 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
10a00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
10a20 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
10a40 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 62 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(b,b).VALUES( |
10a60 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
10a80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
10aa0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
10ac0 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | =t1.c+1;...DELETE.FROM.record;.. |
10ae0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
10b00 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 | .ON.CONFLICT.DO.NOTHING;...SELEC |
10b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 16 28 04 00 90 31 20 20 43 52 45 41 54 45 | T.*.FROM.record;...(...1..CREATE |
10b40 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | .TABLE.t1(a.INT.PRIMARY.KEY,.b.i |
10b60 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | nt,.c.DEFAULT.0).WITHOUT.ROWID;. |
10b80 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
10ba0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
10bc0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
10be0 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
10c00 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
10c20 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
10c40 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
10c60 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ........VALUES('after-insert',pr |
10c80 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
10ca0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
10cc0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
10ce0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
10d00 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
10d20 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
10d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
10d60 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
10d80 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
10da0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
10dc0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
10de0 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
10e00 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
10e20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
10e40 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
10e60 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
10e80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
10ea0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
10ec0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
10ee0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
10f00 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(1,2).ON.CON |
10f20 | 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | FLICT.DO.NOTHING;...SELECT.*.FRO |
10f40 | 4d 20 72 65 63 6f 72 64 3b 0a 88 23 27 04 00 90 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | M.record;..#'...K..CREATE.TABLE. |
10f60 | 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | t1(a.INT.PRIMARY.KEY,.b.int,.c.D |
10f80 | 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 | EFAULT.0).WITHOUT.ROWID;...CREAT |
10fa0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
10fc0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
10fe0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
11000 | 27 20 67 6c 6f 62 28 31 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | '.glob(1,1),printf('%d,%d,%d',ne |
11020 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
11040 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
11060 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
11080 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | y).........VALUES('after-insert' |
110a0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
110c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
110e0 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
11100 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
11120 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
11140 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
11160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
11180 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
111a0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
111c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
111e0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
11200 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
11220 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
11240 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
11260 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 2f 2a 20 2a 2f 0a 20 | .c,new.a,new.b,new.c));../*.*/.. |
11280 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
112a0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
112c0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
112e0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
11300 | 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | c+1;...DELETE.FROM.record;...INS |
11320 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 | ERT.INTO.t1(a,b).VALUES(1,2).ON. |
11340 | 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 57 | CONFLICT.DO.NOTHING;...SELECT.*W |
11360 | 48 45 52 45 20 72 65 63 6f 72 64 3b 45 4e 44 0a 88 1d 26 04 00 90 3f 20 20 43 52 45 41 54 45 20 | HERE.record;END...&...?..CREATE. |
11380 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | TABLE.t1(a.INT.PRIMARY.KEY,.b.in |
113a0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 | t,.c.DEFAULT.0).WITHOUT.ROWID;.. |
113c0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
113e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
11400 | 6f 72 64 28 20 61 2c 62 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | ord(.a,bx,y).........VALUES('bef |
11420 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
11440 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
11460 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
11480 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
114a0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | y).........VALUES('after-insert' |
114c0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
114e0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
11500 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
11520 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
11540 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
11560 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
11580 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
115a0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
115c0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
115e0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
11600 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
11620 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
11640 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
11660 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
11680 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 2f 2a 20 2a 2f 0a 20 | .c,new.a,new.b,new.c));../*.*/.. |
116a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
116c0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
116e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
11700 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
11720 | 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | c+1;...DELETE.FROM.record;...INS |
11740 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 | ERT.INTO.t1(a,b).VALUES(1,2).ON. |
11760 | 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | CONFLICT.DO.NOTHING;...SELECT.*. |
11780 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 4e 44 0a 88 16 25 04 00 90 31 20 20 43 52 45 41 54 45 20 | FROM.record;END...%...1..CREATE. |
117a0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 55 4e | TABLE.t1(a.INT.PRIMARY.KEY,.b.UN |
117c0 | 49 51 55 45 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 | IQUE.DEFAULT.0).WITHOUT.ROWID;.. |
117e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
11800 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c | .ON.t1.BEGIN...WITH.c(x).AS.(val |
11820 | 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ues(1))..........VALUES('before- |
11840 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
11860 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
11880 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
118a0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
118c0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | .......VALUES('after-insert',pri |
118e0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
11900 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
11920 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
11940 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
11960 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
11980 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
119a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
119c0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
119e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
11a00 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
11a20 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
11a40 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
11a60 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
11a80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
11aa0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 | ew.a,new.b,new.c));...END;...INS |
11ac0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 | ERT.INTO.t1(a,b).VALUES(1,2);... |
11ae0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
11b00 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
11b20 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b | FLICT(a).DO.UPDATE.SET.c=t1.c+1; |
11b40 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
11b60 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 | INTO.t1(a,b).VALUES(1,2).ON.CONF |
11b80 | 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | LICT.DO.NOTHING;...SELECT.*.FROM |
11ba0 | 20 72 65 63 6f 72 64 3b 0a 88 54 24 04 00 91 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .record;..T$...-..CREATE.TABLE.t |
11bc0 | 31 28 61 20 45 58 43 4c 55 53 49 56 45 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | 1(a.EXCLUSIVEINTEGER.PRIMARY.KEY |
11be0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
11c00 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
11c20 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
11c40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
11c60 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
11c80 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
11ca0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
11cc0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
11ce0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
11d00 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
11d20 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
11d40 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
11d60 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
11d80 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
11da0 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
11dc0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | %d,%d,%d',...............old.a,o |
11de0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
11e00 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
11e20 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
11e40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
11e60 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
11e80 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
11ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
11ec0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
11ee0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(c,b).VALUES(1,2); |
11f00 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
11f20 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 | INTO.t1(a,b).VALUES(1,2).ON.CONF |
11f40 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
11f60 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
11f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
11fa0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
11fc0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
11fe0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a | ;...SELECT.*.FROM.record;VACUUM. |
12000 | 0d 00 00 00 07 03 27 00 1b dc 17 b1 13 95 0f 79 0b 60 07 47 03 27 00 00 00 00 00 00 00 00 00 00 | ......'........y.`.G.'.......... |
12020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
121a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
121c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
121e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12320 | 00 00 00 00 00 00 00 88 1d 31 04 00 90 3f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .........1...?..CREATE.TABLE.t1( |
12340 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | a.INT.PRIMARY.KEY,.b.int,.c.DEFA |
12360 | 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | ULT.0).WITHOUT.ROWID;...CREATE.T |
12380 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
123a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
123c0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
123e0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
12400 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
12420 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
12440 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
12460 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
12480 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
124a0 | 3b 45 58 50 4c 41 49 4e 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;EXPLAIN...CREATE.TRIGGER.r3.BEF |
124c0 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
124e0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
12500 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
12520 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
12540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
12560 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
12580 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
125a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
125c0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
125e0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
12600 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
12620 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
12640 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
12660 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
12680 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
126a0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
126c0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
126e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
12700 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 | TO.t1(a,b).VALUES(1,2).ON.CONFLI |
12720 | 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | CT.DO.NOTHING;...SELECT.*.FROM.r |
12740 | 65 63 6f 72 64 3b 0a 88 16 30 04 00 90 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ecord;...0...1..CREATE.TABLE.t1( |
12760 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | a.INT.PRIMARY.KEY,.b.int,.c.DEFA |
12780 | 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | ULT.0).WITHOUT.ROWID;...CREATE.T |
127a0 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
127c0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
127e0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
12800 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
12820 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
12840 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
12860 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
12880 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
128a0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
128c0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
128e0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
12900 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
12920 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 2a 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf*'%d,%d,%d/%d,% |
12940 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
12960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
12980 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
129a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
129c0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
129e0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
12a00 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
12a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
12a40 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
12a60 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
12a80 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
12aa0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
12ac0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
12ae0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 | DO.UPDATE.SET.c=t1.c+1;...DELETE |
12b00 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
12b20 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e | ,b).VALUES(1,2).ON.CONFLICT.DO.N |
12b40 | 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | OTHING;...SELECT.*.FROM.record;. |
12b60 | 88 16 2f 04 00 90 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 | ../...1..CREATE.TABLE.t1(a.INT.P |
12b80 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 | RIMARY.KEY,.b.int,.c.DEFAULT.0). |
12ba0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | WITHOUT.ROWID;...CREATE.TRIGGER. |
12bc0 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
12be0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
12c00 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
12c20 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
12c40 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
12c60 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
12c80 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
12ca0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
12cc0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
12ce0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
12d00 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
12d20 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
12d40 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
12d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
12d80 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
12da0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
12dc0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
12de0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
12e00 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
12e20 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
12e40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
12e60 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
12e80 | 29 29 3b 0a 20 2f 2a 20 2a 2f 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));../*.*/...INSERT.INTO.t1(a,b) |
12ea0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
12ec0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
12ee0 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
12f00 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | TE.SET.c=t1.c+1;...DELETE.FROM.r |
12f20 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
12f40 | 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | UES(1,2).ON.CONFLICT.DO.NOTHING; |
12f60 | 0a 20 20 53 45 4c 45 43 54 20 2a a0 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 19 2e 04 00 90 37 | ...SELECT.*.FROM.record;.......7 |
12f80 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 | ..CREATE.TABLE.t1(a.INT.PRIMARY. |
12fa0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 | KEY,.b.int,.c.DEFAULT.0).WITHOUT |
12fc0 | 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .ROWID;...CREATE.TRIGGER.r1.BEFO |
12fe0 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
13000 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
13020 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-insert',printf('%d,%d,% |
13040 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
13060 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
13080 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
130a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | rd(x,y).........VALUES('after-in |
130c0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
130e0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
13100 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
13120 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
13140 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
13160 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
13180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
131a0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
131c0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
131e0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
13200 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
13220 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
13240 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
13260 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
13280 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 2f 2a | b,old.c,new.a,new.b,new.c));../* |
132a0 | 20 2a 2f 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | .*/...INSERT.INTO.t1(a,b).VALUES |
132c0 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
132e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
13300 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
13320 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | c=t1.c+1;...DELETE.FROM.record;. |
13340 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
13360 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 | ).ON.CONFLICT.DO.NOTHING;...SELE |
13380 | 43 54 20 2a 57 48 45 52 45 20 72 65 63 6f 72 64 3b 45 4e 44 2a 88 19 2d 04 00 90 37 20 20 43 52 | CT.*WHERE.record;END*..-...7..CR |
133a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t1(a.INT.PRIMARY.KEY, |
133c0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | .b.int,.c.DEFAULT.0).WITHOUT.ROW |
133e0 | 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | ID;...CREATE.TRIGGER.r1.BEFORE.I |
13400 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
13420 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
13440 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fore-insert',printf('%d,%d,%d',n |
13460 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
13480 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
134a0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
134c0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | ,y).........VALUES('after-insert |
134e0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
13500 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
13520 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
13540 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
13560 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
13580 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
135a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
135c0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
135e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
13600 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
13620 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
13640 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
13660 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
13680 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
136a0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 2f 2a 20 2a 2f 0a | d.c,new.a,new.b,new.c));../*.*/. |
136c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
136e0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
13700 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
13720 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
13740 | 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | .c+1;...DELETE.FROM.record;...IN |
13760 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e | SERT.INTO.t1(a,b).VALUES(1,2).ON |
13780 | 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .CONFLICT.DO.NOTHING;...SELECT.* |
137a0 | 20 46 52 4f 4d 20 72 65 63 6f 0a 64 3b 45 4e 44 0a 88 28 2c 04 00 90 55 20 20 43 52 45 41 54 45 | .FROM.reco.d;END..(,...U..CREATE |
137c0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | .TABLE.t1(a.INT.PRIMARY.KEY,.b.i |
137e0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | nt,.c.DEFAULT.0).WITHOUT.ROWID;. |
13800 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
13820 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
13840 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
13860 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
13880 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
138a0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
138c0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
138e0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ........VALUES('after-insert',pr |
13900 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
13920 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
13940 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
13960 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
13980 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
139a0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
139c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
139e0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
13a00 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
13a20 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
13a40 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
13a60 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
13a80 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
13aa0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
13ac0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 2f 2a 20 2a 2f 0a 20 20 49 4e | new.a,new.b,new.c));../*.*/...IN |
13ae0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
13b00 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
13b20 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
13b40 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
13b60 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
13b80 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e | .INTO.t1(a,b).VALUES(1,2).ON.CON |
13ba0 | 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | FLICT.DO.NOTHING;...SELECT.*.FRO |
13bc0 | 4d 20 72 61 6e 64 6f 6d 28 29 48 41 56 49 4e 47 20 72 65 63 6f 72 64 3b 45 4e 44 0a 88 21 2b 04 | M.random()HAVING.record;END..!+. |
13be0 | 00 90 47 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 | ..G..CREATE.TABLE.t1(a.INT.PRIMA |
13c00 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 | RY.KEY,.b.int,.c.DEFAULT.0).WITH |
13c20 | 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | OUT.ROWID;...CREATE.TRIGGER.r1.B |
13c40 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
13c60 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
13c80 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
13ca0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
13cc0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
13ce0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
13d00 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
13d20 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
13d40 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
13d60 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
13d80 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
13da0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
13dc0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
13de0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
13e00 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
13e20 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
13e40 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
13e60 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
13e80 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
13ea0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
13ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
13ee0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
13f00 | 20 2f 2a 20 2a 2f 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ./*.*/...INSERT.INTO.t1(a,b).VAL |
13f20 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
13f40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
13f60 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
13f80 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | ET.c=t1.c+1;...DELETE.FROM.recor |
13fa0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
13fc0 | 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 | 1,2).ON.CONFLICT.DO.NOTHING;...S |
13fe0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 20 22 61 22 2c 22 62 22 65 63 6f 72 64 3b 45 4e 44 0a | ELECT.*.FROM.r."a","b"ecord;END. |
14000 | 0d 00 00 00 0f 00 cd 00 1b e4 17 cb 13 b2 0f 99 0b 77 0a d0 09 b9 08 9f 07 85 06 6e 05 57 04 2e | .................w.........n.W.. |
14020 | 03 09 01 e4 00 cd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
140a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
140c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 82 14 40 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 | ...............@...-..CREATE.TAB |
140e0 | 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | LE.t1(a.INT.PRIMARY.KEY,.b.int,. |
14100 | 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e | c.DEFAULT.0).WITHOUT.ROWID;...IN |
14120 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
14140 | 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ,4);...INSERT.INTO.t1(a,b).VALUE |
14160 | 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | S(1,8),(2,11),(3,1).....ON.CONFL |
14180 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
141a0 | 62 2c 20 63 3d 63 2b 20 61 66 66 69 6e 69 74 79 28 41 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a | b,.c=c+.affinity(A)<excluded.b;. |
141c0 | 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | ..SELECT.*,.'x'.FROM.t1.ORDER.BY |
141e0 | 20 61 3b 0a 82 22 3f 04 00 84 49 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | .a;.."?...I..CREATE.TABLE.t1(a.I |
14200 | 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | NT.PRIMARY.KEY,.b.int,.c.DEFAULT |
14220 | 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .0).WITHOUT.ROWID;...INSERT.INTO |
14240 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
14260 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
14280 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
142a0 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 20 7c 20 72 61 6e 64 6f | .UPDATE.SET.b=excluded.b.|.rando |
142c0 | 6d 62 6c 6f 62 28 31 29 7c 4e 4f 54 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3c 65 78 63 6c 75 64 65 | mblob(1)|NOT.nullif(1,1)<exclude |
142e0 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | d.b;...SELECT.*,.'x'.FROM.t1.ORD |
14300 | 45 52 20 42 59 20 61 3b 0a 82 22 3e 04 00 84 49 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.a;..">...I..CREATE.TABLE.t |
14320 | 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | 1(a.INT.PRIMARY.KEY,.b.int,.c.DE |
14340 | 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 | FAULT.0).WITHOUT.ROWID;...INSERT |
14360 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
14380 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
143a0 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 8),(2,11),(3,1).....ON.CONFLICT( |
143c0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 20 7c 20 | a).DO.UPDATE.SET.b=excluded.b.|. |
143e0 | 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 7c 20 63 2b 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3c 65 78 | randomblob(1)|.c+.nullif(1,1)<ex |
14400 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | cluded.b;...SELECT.*,.'x'.FROM.t |
14420 | 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 26 3d 04 00 84 51 20 20 43 52 45 41 54 45 20 54 41 | 1.ORDER.BY.a;..&=...Q..CREATE.TA |
14440 | 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | BLE.t1(a.INT.PRIMARY.KEY,.b.int, |
14460 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 | .c.DEFAULT.0).WITHOUT.ROWID;...I |
14480 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
144a0 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
144c0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
144e0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
14500 | 2e 62 20 7c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 7c 20 63 20 7c 7c 20 2b 20 6e 75 6c 6c 69 | .b.|.randomblob(1)|.c.||.+.nulli |
14520 | 66 28 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 | f(1,1)<excluded.b;...SELECT.*,.' |
14540 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 3c 04 00 84 2d 20 20 | x'.FROM.t1.ORDER.BY.a;...<...-.. |
14560 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 | CREATE.TABLE.t1(a.INT.PRIMARY.KE |
14580 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 | Y,.b.int,.c.DEFAULT.0).WITHOUT.R |
145a0 | 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | OWID;...INSERT.INTO.t1(a,b).VALU |
145c0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
145e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 | a,b).VALUES(1,8),(2,11),(3,1)... |
14600 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
14620 | 3d 65 78 63 6c 75 64 65 64 2e 62 20 47 4c 4f 42 2b 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3c 65 78 | =excluded.b.GLOB+.nullif(1,1)<ex |
14640 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | cluded.b;...SELECT.*,.'x'.FROM.t |
14660 | 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 3b 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 | 1.ORDER.BY.a;...;...-..CREATE.TA |
14680 | 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | BLE.t1(a.INT.PRIMARY.KEY,.b.int, |
146a0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 | .c.DEFAULT.0).WITHOUT.ROWID;...I |
146c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
146e0 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
14700 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
14720 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.a=excluded |
14740 | 2e 62 2c 20 63 3d 63 2b 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+.nullif(1,1)<excluded.b; |
14760 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | ...SELECT.*,.'x'.FROM.t1.ORDER.B |
14780 | 59 20 61 3b 0a 82 17 3a 04 00 84 33 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | Y.a;...:...3..CREATE.TABLE.t1(a. |
147a0 | 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | INT.PRIMARY.KEY,.b.int,.c.DEFAUL |
147c0 | 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | T.0).WITHOUT.ROWID;...INSERT.INT |
147e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 | O.t1(a,b).VALUES(1,2),(3,4);...I |
14800 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,8),( |
14820 | 32 20 2d 31 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 2.-1,11),(3,1).....ON.CONFLICT(a |
14840 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
14860 | 63 2b 24 6e 75 6c 6c 69 66 28 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c | c+$nullif(1,1)<excluded.b;...SEL |
14880 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 | ECT.*,.'x'.FROM.t1.ORDER.BY.a;.. |
148a0 | 17 39 04 00 84 33 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 | .9...3..CREATE.TABLE.t1(a.INT.PR |
148c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 | IMARY.KEY,.b.int,.c.DEFAULT.0).W |
148e0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ITHOUT.ROWID;...INSERT.INTO.t1(a |
14900 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,b).VALUES(1,2),(3,4);...INSERT. |
14920 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 20 2d 31 2c 31 | INTO.t1(a,b).VALUES(1,8),(2.-1,1 |
14940 | 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | 1),(3,1).....ON.CONFLICT(a).DO.U |
14960 | 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 61 2b 20 6e 75 6c | PDATE.SET.b=excluded.b,.c=a+.nul |
14980 | 6c 69 66 28 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c | lif(1,1)<excluded.b;...SELECT.*, |
149a0 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 38 04 00 84 2d | .'x'.FROM.t1.ORDER.BY.a;...8...- |
149c0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 | ..CREATE.TABLE.t1(a.INT.PRIMARY. |
149e0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 | KEY,.b.int,.c.DEFAULT.0).WITHOUT |
14a00 | 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | .ROWID;...INSERT.INTO.t1(a,b).VA |
14a20 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | LUES(1,2),(3,4);...INSERT.INTO.t |
14a40 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a | 1(a,b).VALUES(1,2),(2,11),(3,1). |
14a60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
14a80 | 20 61 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3c | .a=excluded.b,.c=c+.nullif(1,1)< |
14aa0 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | excluded.b;...SELECT.*,.'x'.FROM |
14ac0 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 81 24 37 04 00 82 4d 20 20 43 52 45 41 54 45 20 | .t1.ORDER.BY.a;..$7...M..CREATE. |
14ae0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | TABLE.t1(a.INT.PRIMARY.KEY,.b.in |
14b00 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 | t,.c.DEFAULT.0).WITHOUT.ROWID;.. |
14b20 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
14b40 | 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 53 45 | ,(3,4);...INSERT.INTO.t1(a,b).SE |
14b60 | 4c 45 43 54 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 20 2a 2c 31 29 0a 88 1f 36 04 00 90 43 20 20 | LECT(1,8),(2,11),.*,1)...6...C.. |
14b80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 | CREATE.TABLE.t1(a.INT.PRIMARY.KE |
14ba0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 | Y,.b.int,.c.DEFAULT.0).WITHOUT.R |
14bc0 | 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | OWID;...CREATE.TRIGGER.r1.BEFORE |
14be0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 | .INSERT.ON.t1.BEGIN...WITH.c(x). |
14c00 | 41 53 20 28 76 61 6c 75 65 73 28 31 29 55 4e 49 4f 4e 20 41 4c 4c 20 20 56 41 4c 55 45 53 28 27 | AS.(values(1)UNION.ALL..VALUES(' |
14c20 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
14c40 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 55 4e 49 4f 4e 20 41 4c 4c 3b 0a 20 | ,new.a,new.b,new.c))UNION.ALL;.. |
14c60 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
14c80 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
14ca0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
14cc0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
14ce0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
14d00 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
14d20 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
14d40 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
14d60 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
14d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
14da0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
14dc0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
14de0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
14e00 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
14e20 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
14e40 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
14e60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
14e80 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
14ea0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
14ec0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
14ee0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
14f00 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
14f20 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | TE.SET.c=t1.c+1;...DELETE.FROM.r |
14f40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
14f60 | 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | UES(1,2).ON.CONFLICT.DO.NOTHING; |
14f80 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 16 35 04 00 90 31 | ...SELECT.*.FROM.record;...5...1 |
14fa0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 | ..CREATE.TABLE.t1(a.INT.PRIMARY. |
14fc0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 | KEY,.b.int,.c.DEFAULT.0).WITHOUT |
14fe0 | 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .ROWID;...CREATE.TRIGGER.r1.BEFO |
15000 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 | RE.INSERT.ON.t1.BEGIN...WITH.c(x |
15020 | 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 55 4e 49 4f 4e 20 41 4c 4c 20 20 56 41 4c 55 45 53 | ).AS.(values(1)UNION.ALL..VALUES |
15040 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-insert',printf('%d,%d,% |
15060 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
15080 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
150a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
150c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | rd(x,y).........VALUES('after-in |
150e0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
15100 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
15120 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
15140 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
15160 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
15180 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
151a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
151c0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
151e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
15200 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
15220 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
15240 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
15260 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
15280 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
152a0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
152c0 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
152e0 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
15300 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
15320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
15340 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | c=t1.c+1;...DELETE.FROM.record;. |
15360 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
15380 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 | ).ON.CONFLICT.DO.NOTHING;...SELE |
153a0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 16 34 04 00 90 31 20 20 43 52 45 41 54 | CT.*.FROM.record;...4...1..CREAT |
153c0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | E.TABLE.t1(a.INT.PRIMARY.KEY,.b. |
153e0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | int,.c.DEFAULT.0).WITHOUT.ROWID; |
15400 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
15420 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 | RT.ON.t1.BEGIN...WITH.c(x).AS.(v |
15440 | 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | alues(1))..........VALUES('befor |
15460 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 69 6e 73 | e-insert',printf('%d,%d,%d',.ins |
15480 | 74 72 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | tr(1,1),new.c));...END;...CREATE |
154a0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
154c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
154e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | .........VALUES('after-insert',p |
15500 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
15520 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
15540 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
15560 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
15580 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
155a0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
155c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
155e0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
15600 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
15620 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
15640 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
15660 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
15680 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
156a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
156c0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
156e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
15700 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
15720 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
15740 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
15760 | 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | 1;...DELETE.FROM.record;...INSER |
15780 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f | T.INTO.t1(a,b).VALUES(1,2).ON.CO |
157a0 | 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | NFLICT.DO.NOTHING;...SELECT.*.FR |
157c0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 16 33 04 00 90 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | OM.record;...3...1..CREATE.TABLE |
157e0 | 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | .t1(a.INT.PRIMARY.KEY,.b.int,.c. |
15800 | 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 | DEFAULT.0).WITHOUT.ROWID;...CREA |
15820 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
15840 | 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | 1.BEGIN...WITH.c(x).AS.(values(1 |
15860 | 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ))..........VALUES('before-inser |
15880 | 74 27 2c 70 72 69 6e 74 66 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f | t',printf(.sqlite_compileoption_ |
158a0 | 67 65 74 28 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | get(1)));...END;...CREATE.TRIGGE |
158c0 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
158e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
15900 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
15920 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
15940 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
15960 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
15980 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
159a0 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
159c0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
159e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
15a00 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
15a20 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
15a40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
15a60 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
15a80 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
15aa0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
15ac0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
15ae0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
15b00 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
15b20 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
15b40 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
15b60 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 | (a).DO.UPDATE.SET.c=t1.c+1;...DE |
15b80 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
15ba0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | t1(a,b).VALUES(1,2).ON.CONFLICT. |
15bc0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | DO.NOTHING;...SELECT.*.FROM.reco |
15be0 | 72 64 3b 0a 88 19 32 04 00 90 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | rd;...2...7..CREATE.TABLE.t1(a.I |
15c00 | 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | NT.PRIMARY.KEY,.b.int,.c.DEFAULT |
15c20 | 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .0).WITHOUT.ROWID;...CREATE.TRIG |
15c40 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
15c60 | 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 | .....WITH.c(x).AS.(values(1))... |
15c80 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
15ca0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
15cc0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
15ce0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
15d00 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
15d20 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
15d40 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
15d60 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
15d80 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
15da0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
15dc0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
15de0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
15e00 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
15e20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
15e40 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
15e60 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
15e80 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
15ea0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
15ec0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
15ee0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
15f00 | 65 77 2e 63 29 29 3b 0a 20 2f 2a 20 2a 2f 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));../*.*/...INSERT.INTO.t1( |
15f20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
15f40 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
15f60 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
15f80 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | UPDATE.SET.c=t1.c+1;...DELETE.FR |
15fa0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
15fc0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 | .VALUES(1,2).ON.CONFLICT.DO.NOTH |
15fe0 | 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 4e 44 0a | ING;...SELECT.*.FROM.record;END. |
16000 | 0d 00 00 00 1d 01 00 00 1e e9 1d d2 1c b3 1b 95 1a 7e 19 67 18 44 17 2d 16 0f 14 f8 13 cf 12 b0 | .................~.g.D.-........ |
16020 | 11 99 10 74 0f 5d 0e 46 0d 28 0c 11 0a fa 09 f7 09 6b 08 67 07 63 06 4b 05 33 04 2b 03 19 02 0e | ...t.].F.(.......k.g.c.K.3.+.... |
16040 | 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16100 | 82 0b 5d 04 00 84 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | ..]......CREATE.TABLE.t1(a.INTEG |
16120 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.INT,.c.DEFAULT |
16140 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 | .0);...CREATE.UNIQUE.INDEX.t1x1. |
16160 | 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ON.t1(a+b);...INSERT.INTO.t1(a,b |
16180 | 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 | ).VALUES(7,8).ON.CONFLICT(a+b).D |
161a0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | O.NOTHING;...INSERT.INTO.t1(a,b) |
161c0 | 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .VALUES(8,7),(9,6).ON.CONFLICT(a |
161e0 | 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 32 30 30 31 2d 30 31 | +b).DO.NOTHING;...SELECT.2001-01 |
16200 | 2d 30 31 32 20 46 52 4f 4d 20 74 31 3b 0a 82 08 5c 04 00 84 15 20 20 43 52 45 41 54 45 20 54 41 | -012.FROM.t1;...\......CREATE.TA |
16220 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
16240 | 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 | INT,.c.DEFAULT.0);...CREATE.UNIQ |
16260 | 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 | UE.INDEX.t1x1.ON.t1(a+b);...INSE |
16280 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 | RT.INTO.t1(a,b).VALUES(7,8).ON.C |
162a0 | 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 | ONFLICT(a+b).DO.NOTHING;...INSER |
162c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 | T.INTO.t1(a,b).VALUES(8,7),(9,6) |
162e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 | .ON.CONFLICT(a+b).DO.NOTHING;... |
16300 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 52 45 49 4e 44 45 58 0a 82 0f 5b 04 00 84 23 | SELECT.*.FROM.t1;REINDEX...[...# |
16320 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
16340 | 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.INT,.c.DEFAULT.0);... |
16360 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 | CREATE.UNIQUE.INDEX.t1x1.ON.t1(a |
16380 | 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | +b);...INSERT.INTO.t1(a,b).VALUE |
163a0 | 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 | S(7,8).ON.CONFLICT(a+b).DO.NOTHI |
163c0 | 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | NG;...INSERT.INTO.t1(a,b).VALUES |
163e0 | 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 | (8,7),(9,6).ON.CONFLICT(a+b).DO. |
16400 | 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 20 32 30 30 31 2d 30 31 2d 30 31 31 3d 31 | NOTHING;...SELECT..2001-01-011=1 |
16420 | 32 20 46 52 4f 4d 20 74 31 3b 0a 82 05 5a 04 00 84 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | 2.FROM.t1;...Z......CREATE.TABLE |
16440 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 | .t1(a.INTEGER.PRIMARY.KEY,.b.INT |
16460 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | ,.c.DEFAULT.0);...CREATE.UNIQUE. |
16480 | 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 | INDEX.t1x1.ON.t1(a+b);...INSERT. |
164a0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 | INTO.t1(a,b).VALUES(7,8).ON.CONF |
164c0 | 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 | LICT(a+b).DO.NOTHING;...INSERT.I |
164e0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e | NTO.t1(a,b).VALUES(8,7),(9,6).ON |
16500 | 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c | .CONFLICT(a+b).DO.NOTHING;...SEL |
16520 | 45 43 54 20 20 31 3d 31 32 20 46 52 4f 4d 20 74 31 3b 0a 82 15 59 04 00 84 2f 20 20 43 52 45 41 | ECT..1=12.FROM.t1;...Y.../..CREA |
16540 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
16560 | 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.INT,.c.DEFAULT.0);...CREATE |
16580 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 | .UNIQUE.INDEX.t1x1.ON.t1(a+b);.. |
165a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 32 30 30 31 | .INSERT.INTO.t1(a,b).VALUES(2001 |
165c0 | 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2001-01-01-01-017,8).ON.CONFLICT |
165e0 | 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (a+b).DO.NOTHING;...INSERT.INTO. |
16600 | 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e | t1(c,b).VALUES(8,7),(9,6).ON.CON |
16620 | 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 | FLICT(a+b).DO.NOTHING;...SELECT. |
16640 | 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 15 58 04 00 84 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | *.FROM.t1;...X.../..CREATE.TABLE |
16660 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 | .t1(a.INTEGER.PRIMARY.KEY,.b.INT |
16680 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | ,.c.DEFAULT.0);...CREATE.UNIQUE. |
166a0 | 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 | INDEX.t1x1.ON.t1(a+b);...INSERT. |
166c0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 37 2c | INTO.t1(a,b).VALUES(2001-01-017, |
166e0 | 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | 8).ON.CONFLICT(a+b).DO.NOTHING;. |
16700 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 32 30 | ..INSERT.INTO.t1(a,b).VALUES(820 |
16720 | 30 31 2d 30 31 2d 30 31 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b | 01-01-01,7),(9,6).ON.CONFLICT(a+ |
16740 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 | b).DO.NOTHING;...SELECT.*.FROM.t |
16760 | 31 3b 0a 82 01 57 04 00 84 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | 1;...W......CREATE.TABLE.t1(a.IN |
16780 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.INT,.c.DEFA |
167a0 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ULT.0);...CREATE.UNIQUE.INDEX.t1 |
167c0 | 78 31 20 4f 4e 20 74 31 28 20 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | x1.ON.t1(.+b);...INSERT.INTO.t1( |
167e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 | a,b).VALUES(7,8).ON.CONFLICT./*. |
16800 | 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | */DO.NOTHING;...INSERT.INTO.t1(a |
16820 | 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ,b).VALUES(8,7),(9,6).ON.CONFLIC |
16840 | 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T./*.*/DO.NOTHING;...SELECT.*.FR |
16860 | 4f 4d 20 74 31 3b 0a 82 01 56 04 00 84 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | OM.t1;...V......CREATE.TABLE.t1( |
16880 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.INT,.c. |
168a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 20 2f 2a 20 2a 2f 20 49 4e 44 45 | DEFAULT.0);...CREATE../*.*/.INDE |
168c0 | 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | X.t1x1.ON.t1(a+b);...INSERT.INTO |
168e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | .t1(a,b).VALUES(7,8).ON.CONFLICT |
16900 | 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ./*.*/DO.NOTHING;...INSERT.INTO. |
16920 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e | t1(a,b).VALUES(8,7),(9,6).ON.CON |
16940 | 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 | FLICT./*.*/DO.NOTHING;...SELECT. |
16960 | 2a 20 46 52 4f 4d 20 74 31 3b 0a 81 09 55 04 00 82 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | *.FROM.t1;...U......CREATE.TABLE |
16980 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 | .t1(a.INTEGER.PRIMARY.KEY,.b.INT |
169a0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 27 61 27 0a 20 20 43 52 45 41 54 45 20 55 45 20 49 4e 4f 20 | ,.c.DEFAULT.'a'...CREATE.UE.INO. |
169c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e | t1(a,b).VALUES(8,7),(9,6).ON.CON |
169e0 | 46 4c 49 43 54 28 61 2b 63 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 82 00 54 04 00 84 05 20 20 | FLICT(a+c).DO.NOTHING;...T...... |
16a00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 4b 45 59 2c 20 62 20 69 | CREATE.TABLE.t1(a.INTEGEKEY,.b.i |
16a20 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
16a40 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 64 28 33 2c 34 29 3b 0a 20 20 49 4e 53 | t1(a,b).VALUES(1,2)d(3,4);...INS |
16a60 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c | ERT.INTO.t1(a,b).VALUES(1,8),(2, |
16a80 | 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | 11),(3,1).....ON.CONFLICT(a).DO. |
16aa0 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 | UPDATE.SET.b=excluded.b,.c=c+1.W |
16ac0 | 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | HERE.t1.b<excluded.b;...SELECT.* |
16ae0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 53 04 00 84 | ,.'x'.FROM.t1.ORDER.BY.a;...S... |
16b00 | 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 | -..CREATE.TABLE.t1(a.INT.PRIMARY |
16b20 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 | .KEY,.b.int,.c.DEFAULT.0).WITHOU |
16b40 | 54 20 52 4f 57 49 44 3b 0a 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | T.ROWID;..REPLACE.INTO.t1(a,b).V |
16b60 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ALUES(1,2),(3,4);...INSERT.INTO. |
16b80 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 | t1(a,b).VALUES(1,8),(2,11),(3,1) |
16ba0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
16bc0 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 | T.b=excluded.b,.c=c+1.WHERE.t1.b |
16be0 | 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f | <excluded.b;...SELECT.*,.'x'.FRO |
16c00 | 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 52 04 00 84 2d 20 20 43 52 45 41 54 45 | M.t1.ORDER.BY.a;...R...-..CREATE |
16c20 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | .TABLE.t1(a.INT.PRIMARY.KEY,.b.i |
16c40 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | nt,.c.DEFAULT.0).WITHOUT.ROWID;. |
16c60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(9,2 |
16c80 | 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ),(3,4);...INSERT.INTO.t1(a,b).V |
16ca0 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 | ALUES(1,8),(2,11),(3,1).....ON.C |
16cc0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
16ce0 | 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 | ded.b,.c=c+1.WHERE.t1.b<excluded |
16d00 | 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | .b;...SELECT.*,.'x'.FROM.t1.ORDE |
16d20 | 52 20 42 59 20 61 2c 3f 82 1b 51 04 00 84 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | R.BY.a,?..Q...;..CREATE.TABLE.t1 |
16d40 | 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | (a.INT.PRIMARY.KEY,.b.int,.c.DEF |
16d60 | 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 | AULT.0).WITHOUT.ROWID;...INSERT. |
16d80 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 45 | INTO.t1(a,b).VALUES(1,2),(3,4);E |
16da0 | 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | XPLAIN...INSERT.INTO.t1(a,b).VAL |
16dc0 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | UES(1,8),(2,11),(3,1).....ON.CON |
16de0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
16e00 | 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | d.b,.c=c+1.WHERE.t1.b<excluded.b |
16e20 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 | ;...SELECT.*,.'x'.FROM.t1.ORDER. |
16e40 | 42 59 20 61 3b 0a 82 14 50 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | BY.a;...P...-..CREATE.TABLE.t1(a |
16e60 | 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | .INT.PRIMARY.KEY,.b.int,.c.DEFAU |
16e80 | 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | LT.0).WITHOUT.ROWID;...INSERT.IN |
16ea0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
16ec0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c | INSERT.INTO.t1(a,b).VALUES(1,8), |
16ee0 | 28 33 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | (3,11),(3,1).....ON.CONFLICT(a). |
16f00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b | DO.UPDATE.SET.b=excluded.b,.c=c+ |
16f20 | 20 64 61 74 65 28 41 2c 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 | .date(A,1,1)<excluded.b;...SELEC |
16f40 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 4f | T.*,.'x'.FROM.t1.ORDER.BY.a;...O |
16f60 | 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d | ...-..CREATE.TABLE.t1(a.INT.PRIM |
16f80 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 | ARY.KEY,.b.int,.c.DEFAULT.0).WIT |
16fa0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | HOUT.ROWID;...INSERT.INTO.t1(a,b |
16fc0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ).VALUES(1,2),(3,4);...INSERT.IN |
16fe0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 33 | TO.t1(a,b).VALUES(1,8),(3,11),(3 |
17000 | 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,1).....ON.CONFLICT(a).DO.UPDATE |
17020 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 20 7c 7c 20 63 2b 20 6e 75 6c 6c 69 66 28 31 | .SET.b=excluded.b.||.c+.nullif(1 |
17040 | 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ,1)<excluded.b;...SELECT.*,.'x'. |
17060 | 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 22 4e 04 00 84 49 20 20 43 52 45 | FROM.t1.ORDER.BY.a;.."N...I..CRE |
17080 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | ATE.TABLE.t1(a.INT.PRIMARY.KEY,. |
170a0 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | b.int,.c.DEFAULT.0).WITHOUT.ROWI |
170c0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
170e0 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | 1,2),(3,4);...INSERT.INTO.t1(a,b |
17100 | 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f | ).VALUES(1,8),(3,11),(3,1).....O |
17120 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
17140 | 63 6c 75 64 65 64 2e 62 20 7c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 7c 20 63 2b 20 6e 75 6c | cluded.b.|.randomblob(1)|.c+.nul |
17160 | 6c 69 66 28 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c | lif(1,1)<excluded.b;...SELECT.*, |
17180 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 4d 04 00 84 2d | .'x'.FROM.t1.ORDER.BY.a;...M...- |
171a0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 | ..CREATE.TABLE.t1(a.INT.PRIMARY. |
171c0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 | KEY,.b.int,.c.DEFAULT.0).WITHOUT |
171e0 | 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | .ROWID;...INSERT.INTO.t1(a,b).VA |
17200 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | LUES(1,2),(3,4);...INSERT.INTO.t |
17220 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 33 2c 31 29 0a | 1(a,b).VALUES(1,8),(3,11),(3,1). |
17240 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
17260 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 20 47 4c 4f 42 2b 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3c | .b=excluded.b.GLOB+.nullif(1,1)< |
17280 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | excluded.b;...SELECT.*,.'x'.FROM |
172a0 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 1c 4c 04 00 84 3d 20 20 43 52 45 41 54 45 20 | .t1.ORDER.BY.a;...L...=..CREATE. |
172c0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | TABLE.t1(a.INT.PRIMARY.KEY,.b.in |
172e0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 | t,.c.DEFAULT.0).WITHOUT.ROWID;.. |
17300 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
17320 | 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ,(3,4);...INSERT.INTO.t1(a,b).VA |
17340 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f | LUES(1,8),(2,11),(3,1).....ON.CO |
17360 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 | NFLICT(a).DO.UPDATE.SET.b=exclud |
17380 | 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e | ed.b,.c=c+1.WHERE.t1.b<excluded. |
173a0 | 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 3f 2c 20 27 78 27 20 46 52 4f 4d 20 | b;...SELECT.DISTINCT?,.'x'.FROM. |
173c0 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 26 4b 04 00 84 51 20 20 43 52 45 41 54 45 20 54 | t1.ORDER.BY.a;..&K...Q..CREATE.T |
173e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | ABLE.t1(a.INT.PRIMARY.KEY,.b.int |
17400 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 | ,.c.DEFAULT.0).WITHOUT.ROWID;... |
17420 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
17440 | 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | (3,4);...INSERT.INTO.t1(a,b).VAL |
17460 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | UES(1,8),(2,11),(3,1).....ON.CON |
17480 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
174a0 | 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | d.b,.c=c+1.WHERE.t1.b<excluded.b |
174c0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 61 72 72 61 79 28 41 2c 31 2c 31 29 20 | ;...SELECT.*,.json_array(A,1,1). |
174e0 | 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 4a 04 00 84 2d 20 | 'x'.FROM.t1.ORDER.BY.a;...J...-. |
17500 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b | .CREATE.TABLE.t1(a.INT.PRIMARY.K |
17520 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 | EY,.b.int,.c.DEFAULT.0).WITHOUT. |
17540 | 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ROWID;...INSERT.INTO.t1(a,b).VAL |
17560 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | UES(1,2),(3,4);...INSERT.INTO.t1 |
17580 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 | (a,b).VALUES(1,8),(2,11),(3,1).. |
175a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
175c0 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 | b=excluded.b,.c=c+1.WHERE.t1.b<e |
175e0 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 20 46 52 4f 4d 20 | xcluded.b;...SELECT.*,.a,b.FROM. |
17600 | 74 31 20 47 52 4f 55 50 20 42 59 20 61 2c 62 82 1b 49 04 00 84 3b 20 20 43 52 45 41 54 45 20 54 | t1.GROUP.BY.a,b..I...;..CREATE.T |
17620 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | ABLE.t1(a.INT.PRIMARY.KEY,.b.int |
17640 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 | ,.c.DEFAULT.0).WITHOUT.ROWID;... |
17660 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
17680 | 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | (3,4);...INSERT.INTO.t1(a,b).VAL |
176a0 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | UES(1,8),(2,11),(3,1).....ON.CON |
176c0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
176e0 | 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | d.b,.c=c+1.WHERE.t1.b<excluded.b |
17700 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 | ;...SELECT.*,.'x'.FROM.t1.ORDER. |
17720 | 42 59 20 61 3b 52 45 49 4e 44 45 58 0a 82 14 48 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 | BY.a;REINDEX...H...-..CREATE.TAB |
17740 | 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | LE.t1(a.INT.PRIMARY.KEY,.b.int,. |
17760 | 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e | c.DEFAULT.0).WITHOUT.ROWID;...IN |
17780 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
177a0 | 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ,4);...INSERT.INTO.t1(a,b).VALUE |
177c0 | 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | S(1,8),(2,11),(3,1).....ON.CONFL |
177e0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
17800 | 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a | b,.c=c+1.WHERE.t1.b<excluded.b;. |
17820 | 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | ..SELECT.*,.'x'.FROM.t1.ORDER.BY |
17840 | 20 61 2c 62 82 20 47 04 00 84 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | .a,b..G...E..CREATE.TABLE.t1(a.I |
17860 | 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | NT.PRIMARY.KEY,.b.int,.c.DEFAULT |
17880 | 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .0).WITHOUT.ROWID;...INSERT.INTO |
178a0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
178c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
178e0 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
17900 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
17920 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
17940 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 20 61 2c 20 22 61 | *,.'x'.FROM.t1.ORDER.BY.a,.a,."a |
17960 | 22 2c 22 62 22 62 62 82 14 46 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ","b"bb..F...-..CREATE.TABLE.t1( |
17980 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | a.INT.PRIMARY.KEY,.b.int,.c.DEFA |
179a0 | 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ULT.0).WITHOUT.ROWID;...INSERT.I |
179c0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
179e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 | .INSERT.INTO.t1(a,b).VALUES(1,8) |
17a00 | 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,(2,11),(3,1).....ON.CONFLICT(a) |
17a20 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 | .DO.UPDATE.SET.b=excluded.b,.c=c |
17a40 | 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 | +1.WHERE.t1.b<excluded.b;...SELE |
17a60 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 40 61 2c 62 82 14 | CT.*,.'x'.FROM.t1.GROUP.BY@a,b.. |
17a80 | 45 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 | E...-..CREATE.TABLE.t1(a.INT.PRI |
17aa0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 | MARY.KEY,.b.int,.c.DEFAULT.0).WI |
17ac0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | THOUT.ROWID;...INSERT.INTO.t1(a, |
17ae0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | b).VALUES(1,2),(3,4);...INSERT.I |
17b00 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 | NTO.t1(a,b).VALUES(1,8),(2,11),( |
17b20 | 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 3,1).....ON.CONFLICT(a).DO.UPDAT |
17b40 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | E.SET.b=excluded.b,.c=c+1.WHERE. |
17b60 | 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | t1.b<excluded.b;...SELECT.*,.'x' |
17b80 | 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3c 62 82 1b 44 04 00 84 3b 20 20 43 52 | .FROM.t1.GROUP.BY.a<b..D...;..CR |
17ba0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t1(a.INT.PRIMARY.KEY, |
17bc0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | .b.int,.c.DEFAULT.0).WITHOUT.ROW |
17be0 | 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ID;...INSERT.INTO.t1(a,b).VALUES |
17c00 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | (1,2),(3,4);...INSERT.INTO.t1(a, |
17c20 | 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 | b).VALUES(1,8),(2,11),(3,1)..... |
17c40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
17c60 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c | xcluded.b,.c=c+1.WHERE.t1.b<excl |
17c80 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
17ca0 | 47 52 4f 55 50 20 42 59 20 61 2c 20 61 76 67 28 31 29 62 82 1c 43 04 00 84 3d 20 20 43 52 45 41 | GROUP.BY.a,.avg(1)b..C...=..CREA |
17cc0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | TE.TABLE.t1(a.INT.PRIMARY.KEY,.b |
17ce0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | .int,.c.DEFAULT.0).WITHOUT.ROWID |
17d00 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
17d20 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ,2),(3,4);...INSERT.INTO.t1(a,b) |
17d40 | 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e | .VALUES(1,8),(2,11),(3,1).....ON |
17d60 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
17d80 | 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 | luded.b,.c=c+1.WHERE.t1.b<exclud |
17da0 | 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 | ed.b;...SELECT.*,.'x'.FROM.t1.GR |
17dc0 | 4f 55 50 20 42 59 20 61 2c 20 22 61 22 2c 22 62 22 62 82 14 42 04 00 84 2d 20 20 43 52 45 41 54 | OUP.BY.a,."a","b"b..B...-..CREAT |
17de0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | E.TABLE.t1(a.INT.PRIMARY.KEY,.b. |
17e00 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | int,.c.DEFAULT.0).WITHOUT.ROWID; |
17e20 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
17e40 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | 2),(3,4);...INSERT.INTO.t1(a,b). |
17e60 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 | VALUES(1,8),(2,11),(3,1).....ON. |
17e80 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
17ea0 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 20 64 61 74 65 28 41 2c 3f 2c 31 29 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+.date(A,?,1)<exclude |
17ec0 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | d.b;...SELECT.*,.'x'.FROM.t1.ORD |
17ee0 | 45 52 20 42 59 20 61 3b 0a 82 14 41 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.a;...A...-..CREATE.TABLE.t |
17f00 | 31 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | 1(a.INT.PRIMARY.KEY,.b.int,.c.DE |
17f20 | 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 | FAULT.0).WITHOUT.ROWID;...INSERT |
17f40 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
17f60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
17f80 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 8),(2,11),(3,1).....ON.CONFLICT( |
17fa0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 | a).DO.UPDATE.SET.b=excluded.b,.c |
17fc0 | 3d 63 2b 20 64 61 74 65 28 41 2c 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | =c+.date(A,1,1)<excluded.b;...SE |
17fe0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
18000 | 0d 00 00 00 1c 04 9c 00 1e fc 1d f8 1c f4 1b de 1a da 19 ea 18 df 17 d1 16 d3 15 bb 14 b7 13 9f | ................................ |
18020 | 12 8b 11 df 10 db 0f d7 0e d3 0e 47 0d 0d 0c 03 0a f8 0a 3c 09 38 08 34 07 30 06 54 05 78 04 9c | ...........G.......<.8.4.0.T.x.. |
18040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
180a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
180c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
180e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
181a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
181c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
181e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
182a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
182c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
182e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
183a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
183c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
183e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 59 79 04 | .............................Yy. |
184a0 | 00 83 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..7..CREATE.TABLE.t1(a.INTEGER.P |
184c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 58 63 20 44 45 46 41 55 4c 54 20 30 29 | RIMARY.KEY,.b.int,.Xc.DEFAULT.0) |
184e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
18500 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 | ,2),(3,4);...WITH.nx(a,b).AS.(VA |
18520 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 | LUES(1,8),(2,11),(3,1),(2,15),(1 |
18540 | 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e | ,4),(1,99))...SELECT.a,.b.FROM.n |
18560 | 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 0a 81 59 78 04 00 83 37 20 | x.WHERE.true.....ON.CON..Yx...7. |
18580 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
185a0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 58 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | RY.KEY,.b.int,.Xc.DEFAULT.0);... |
185c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
185e0 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
18600 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c | (1,8),(2,11),(3,1),(2,15),(1,4), |
18620 | 28 31 2c 39 39 29 29 0a 20 20 53 45 4c 45 43 54 20 61 0c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 | (1,99))...SELECT.a..b.FROM.nx.WH |
18640 | 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 0a 81 59 77 04 00 83 37 20 20 43 52 45 | ERE.true.....ON.CON..Yw...7..CRE |
18660 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
18680 | 45 59 2c 20 62 20 69 6e 74 2c 20 58 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | EY,.b.int,.Xc.DEFAULT.0);...INSE |
186a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
186c0 | 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 | );...WITH.nx(a,b).AS.(VALUES(1,8 |
186e0 | 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 | ),(2,11),(3,1),(2,15),(1,4),(1,9 |
18700 | 39 29 29 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | 9))...SELECT.*,.b.FROM.nx.WHERE. |
18720 | 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 0a 82 01 76 04 00 84 07 20 20 43 52 45 41 54 45 20 | true.....ON.CON...v......CREATE. |
18740 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
18760 | 62 20 63 68 61 72 28 31 29 44 45 46 41 55 4c 54 2e 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e | b.char(1)DEFAULT.0);...CREATE.UN |
18780 | 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 52 45 50 | IQUE.INDEX.t1x1.ON.t1(a+b);..REP |
187a0 | 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e | LACE.INTO.t1(a,b).VALUES(7,8).ON |
187c0 | 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 | .CONFLICT(a+b).DO.NOTHING;...INS |
187e0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c | ERT.INTO.t1(a,b).VALUES(8,7),(9, |
18800 | 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | 6).ON.CONFLICT(a+b).DO.NOTHING;. |
18820 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 75 04 00 84 07 20 20 43 52 45 | ..SELECT.*.FROM.t1;...u......CRE |
18840 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
18860 | 45 59 2c 20 62 20 63 68 61 72 28 31 29 44 45 46 41 55 4c 54 20 b0 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.char(1)DEFAULT..);...CREAT |
18880 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a | E.UNIQUE.INDEX.t1x1.ON.t1(a+b);. |
188a0 | 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 | .REPLACE.INTO.t1(a,b).VALUES(7,8 |
188c0 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 | ).ON.CONFLICT(a+b).DO.NOTHING;.. |
188e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 | .INSERT.INTO.t1(a,b).VALUES(8,7) |
18900 | 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 | ,(9,6).ON.CONFLICT(a+b).DO.NOTHI |
18920 | 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 74 04 00 84 07 20 | NG;...SELECT.*.FROM.t1;...t..... |
18940 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
18960 | 52 59 20 4b 45 59 2c 20 62 20 63 68 61 72 28 31 29 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.char(1)DEFAULT.0);...C |
18980 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b | REATE.UNIQUE.INDEX.t1x1.ON.t1(a+ |
189a0 | 62 29 3b 0a 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | b);..REPLACE.INTO.t1(a,b).VALUES |
189c0 | 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e | (7,8).ON.CONFLICT(a+b).DO.NOTHIN |
189e0 | 47 3b 0a 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | G;..REPLACE.INTO.t1(a,b).VALUES( |
18a00 | 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e | 8,7),(9,6).ON.CONFLICT(a+b).DO.N |
18a20 | 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 81 39 73 04 | OTHING;...SELECT.*.FROM.t1;..9s. |
18a40 | 00 82 77 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..w..CREATE.TABLE.t1(a.INTEGER.P |
18a60 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 63 68 61 72 28 31 29 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.char(1)DEFAULT.0); |
18a80 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
18aa0 | 31 28 61 2b 62 29 3b 0a 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);..REPLACE.INTO.t1(a,b).VA |
18ac0 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
18ae0 | 54 48 49 4e 47 3b 0a 20 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 74 31 0a 82 08 72 04 00 84 15 20 | THING;..REINDEX.INTO.t1...r..... |
18b00 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
18b20 | 52 59 20 4b 45 59 2c 20 62 20 63 68 61 72 28 31 29 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.char(1)DEFAULT.0);...C |
18b40 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b | REATE.UNIQUE.INDEX.t1x1.ON.t1(a+ |
18b60 | 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | b);...INSERT.INTO.t1(a,b).VALUES |
18b80 | 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e | (7,8).ON.CONFLICT(a+b).DO.NOTHIN |
18ba0 | 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | G;...INSERT.INTO.t1(a,b).VALUES( |
18bc0 | 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e | 8,7),(9,6).ON.CONFLICT(a+b).DO.N |
18be0 | 4f 54 48 49 4e 47 3b 45 58 50 4c 41 49 4e 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 | OTHING;EXPLAIN...SELECT.*.FROM.t |
18c00 | 31 3b 0a 82 07 71 04 00 84 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | 1;...q......CREATE.TABLE.t1(a.IN |
18c20 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 63 68 61 72 28 31 29 44 45 46 41 | TEGER.PRIMARY.KEY,.b.char(1)DEFA |
18c40 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ULT.0);...CREATE.UNIQUE.INDEX.t1 |
18c60 | 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | x1.ON.t1(a+b);...INSERT.INTO.t1( |
18c80 | 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 | a,b).VALUES(7,8).ON.CONFLICT(a+b |
18ca0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ).DO.NOTHING;...INSERT.INTO.t1(a |
18cc0 | 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ,b).VALUES(8,7),(9,6).ON.CONFLIC |
18ce0 | 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T(a+b).DO.NOTHING;...SELECT.*.FR |
18d00 | 4f 4d 20 74 31 3b 56 41 43 55 55 4d 0a 82 37 70 04 00 84 73 20 20 43 52 45 41 54 45 20 54 41 42 | OM.t1;VACUUM..7p...s..CREATE.TAB |
18d20 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 55 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.U |
18d40 | 4e 49 51 55 45 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NIQUE.DEFAULT.0);...INSERT.INTO. |
18d60 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
18d80 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
18da0 | 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e | ,(.json_group_array(1),99))...IN |
18dc0 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
18de0 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 | ECT.a,.b.FROM.nx.WHERE.true..... |
18e00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 3f 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(?).DO.UPDATE.SET.b=e |
18e20 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 | xcluded.b,.c=t2.c+1.WHERE.t2.b<e |
18e40 | 64 65 64 2e 61 3b 0a 81 09 6f 04 00 82 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ded.a;...o......CREATE.TABLE.t1( |
18e60 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 ac 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.INT..c. |
18e80 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | DEFAULT.0);...CREATE.UNIQUE.INDE |
18ea0 | 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 29 62 29 3b 0a 20 20 49 4e 4f 54 48 49 4e 47 3b 0a 20 | X.t1x1.ON.t1(a)b);...INOTHING;.. |
18ec0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 6e 04 00 84 07 20 20 43 52 45 41 | .SELECT.*.FROM.t1;...n......CREA |
18ee0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
18f00 | 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 2e 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.INT,.c.DEFAULT.0);...CREATE |
18f20 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 | .UNIQUE.INDEX.t1x1.ON.t1(a+b);.. |
18f40 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 | .INSERT.INTO.t1(a,b).VALUES(7,8) |
18f60 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 | .ON.CONFLICT(a+b).DO.NOTHING;... |
18f80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c | INSERT.INTO.t1(a,b).VALUES(8,7), |
18fa0 | 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e | (9,6).ON.CONFLICT(a+b).DO.NOTHIN |
18fc0 | 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 6d 04 00 84 07 20 20 | G;...SELECT.*.FROM.t1;...m...... |
18fe0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
19000 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.INT,.c.DEFAULT.0);...CR |
19020 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 63 2b 62 | EATE.UNIQUE.INDEX.t1x1.ON.t1(c+b |
19040 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
19060 | 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 7,8).ON.CONFLICT(a+b).DO.NOTHING |
19080 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 | ;...INSERT.INTO.t1(a,b).VALUES(8 |
190a0 | 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | ,7),(9,6).ON.CONFLICT(a+b).DO.NO |
190c0 | 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 6c 04 00 | THING;...SELECT.*.FROM.t1;...l.. |
190e0 | 84 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
19100 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.INT,.c.DEFAULT.0);. |
19120 | 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 | ..CREATE.UNIQUE.INDEX.t1x1.ON.t1 |
19140 | 28 61 2c 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | (a,b);...INSERT.INTO.t1(a,b).VAL |
19160 | 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 | UES(7,8).ON.CONFLICT./*.*/DO.NOT |
19180 | 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | HING;...INSERT.INTO.t1(a,b).VALU |
191a0 | 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 | ES(8,7),(9,6).ON.CONFLICT./*.*/D |
191c0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 81 | O.NOTHING;...SELECT.*.FROM.t1;.. |
191e0 | 29 6b 04 00 82 57 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | )k...W..CREATE.TABLE.t1(a.INTEGE |
19200 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.INT,.c.DEFAULT. |
19220 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f | 0);...CREATE.UNIQUE.INDEX.t1x1.O |
19240 | 4e 20 74 31 28 61 2c 61 29 3b 0a 20 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | N.t1(a,a);..REINDEX.INTO.t1(a,b) |
19260 | 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f | .VALUES(7,8).ON.CONFLICT(a+b).DO |
19280 | 20 4e 4f 54 48 49 4e 47 3b 0a 0a 82 11 6a 04 00 84 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | .NOTHING;....j...'..CREATE.TABLE |
192a0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 | .t1(a.INTEGER.PRIMARY.KEY,.b.INT |
192c0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | ,.c.DEFAULT.0);...CREATE.UNIQUE. |
192e0 | 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e | INDEX.t1x1.ON.t1(a+~~~~~~~~~~~~~ |
19300 | 7e 7e 7e 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ~~~b);...INSERT.INTO.t1(a,b).VAL |
19320 | 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 | UES(7,8).ON.CONFLICT(a+b).DO.NOT |
19340 | 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | HING;...INSERT.INTO.t1(a,b).VALU |
19360 | 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 2d 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 | ES(8,7),(9,6).ON.-ONFLICT(a+b).D |
19380 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 40 31 46 52 4f 20 5b 61 5d 3b 0a 82 | O.NOTHING;...SELECT.@1FRO.[a];.. |
193a0 | 15 69 04 00 84 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .i.../..CREATE.TABLE.t1(a.INTEGE |
193c0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.INT,.c.DEFAULT. |
193e0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f | 0);...CREATE.UNIQUE.INDEX.t1x1.O |
19400 | 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | N.t1(a+b);...INSERT.INTO.t1(a,b) |
19420 | 20 56 41 4c 55 45 53 28 3a 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 37 2c 38 29 | .VALUES(:0012001-01-01-01-017,8) |
19440 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 | .ON.CONFLICT(a+b).DO.NOTHING;... |
19460 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c | INSERT.INTO.t1(a,b).VALUES(8,7), |
19480 | 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e | (9,6).ON.CONFLICT(a+b).DO.NOTHIN |
194a0 | 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 68 04 00 84 07 20 20 | G;...SELECT.*.FROM.t1;...h...... |
194c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
194e0 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.INT,.c.DEFAULT.0);...CR |
19500 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 | EATE.UNIQUE.INDEX.t1x1.ON.t1(a+b |
19520 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
19540 | 37 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 2c 38 29 20 4f 4e 20 43 4f 4e 46 | 720012001-01-01-01-01,8).ON.CONF |
19560 | 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 | LICT(a+b).DO.NOTHING;...INSERT.I |
19580 | 4e 54 4f 20 74 31 28 62 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 37 29 2c 28 39 2c 36 29 20 4f 4e | NTO.t1(b,b).VALUES(9,7),(9,6).ON |
195a0 | 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 82 15 67 04 00 | .CONFLICT(a+b).DO.NOTHING;...g.. |
195c0 | 84 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ./..CREATE.TABLE.t1(a.INTEGER.PR |
195e0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.INT,.c.DEFAULT.0);. |
19600 | 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 | ..CREATE.UNIQUE.INDEX.t1x1.ON.t1 |
19620 | 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | (a+b);...INSERT.INTO.t1(a,b).VAL |
19640 | 55 45 53 28 37 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 2c 38 29 20 4f 4e 20 | UES(720012001-01-01-01-01,8).ON. |
19660 | 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 | CONFLICT(a+b).DO.NOTHING;...INSE |
19680 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 | RT.INTO.t1(a,b).VALUES(8,7),(9,6 |
196a0 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 | ).ON.CONFLICT(a+b).DO.NOTHING;.. |
196c0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 81 7b 66 04 00 83 7b 20 20 43 52 45 41 | .SELECT.*.FROM.t1;..{f...{..CREA |
196e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
19700 | 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.INT,.c.DEFAULT.0);...CREATE |
19720 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 | .UNIQUE.INDEX.t1x1.ON.t1(a+b);.. |
19740 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 32 30 30 | .INSERT.INTO.t1(a,b).VALUES(7200 |
19760 | 31 2d 30 31 2d 30 31 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e | 1-01-01,8).ON.CONFLICT(a+b).DO.N |
19780 | 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | OTHING;...INSERT.INTO.t1(a,b).VA |
197a0 | 4c 55 45 53 28 39 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 | LUES(9,7),(9,6).ON.CONFLICT(a+b) |
197c0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 31 3b 0a 82 0b 65 04 00 84 1b 20 20 43 52 45 41 54 45 | .DO.NOTHING;..1;...e......CREATE |
197e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
19800 | 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 | .b.INT,.c.DEFAULT.0);...CREATE.U |
19820 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 | NIQUE.INDEX.t1x1.ON.t1(a+b);...I |
19840 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 32 30 30 31 2d | NSERT.INTO.t1(a,b).VALUES(72001- |
19860 | 30 31 2d 30 31 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 | 01-01,8).ON.CONFLICT(a+b).DO.NOT |
19880 | 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | HING;...INSERT.INTO.t1(a,b).VALU |
198a0 | 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 | ES(8,7),(9,6).ON.CONFLICT(a+b).D |
198c0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 | O.NOTHING;...SELECT.*.FROM.t1;.. |
198e0 | 08 64 04 00 84 15 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .d......CREATE.TABLE.t1(a.INTEGE |
19900 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.INT,.c.DEFAULT. |
19920 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f | 0);...CREATE.UNIQUE.INDEX.t1x1.O |
19940 | 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | N.t1(a+b);...INSERT.INTO.t1(a,b) |
19960 | 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f | .VALUES(7,8).ON.CONFLICT(a+b).DO |
19980 | 20 4e 4f 54 48 49 4e 47 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | .NOTHING;EXPLAIN...INSERT.INTO.t |
199a0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 | 1(a,b).VALUES(8,7),(9,6).ON.CONF |
199c0 | 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 32 | LICT(a+b).DO.NOTHING;...SELECT.2 |
199e0 | 20 46 52 4f 4d 20 74 31 3b 0a 81 6d 63 04 00 83 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .FROM.t1;..mc..._..CREATE.TABLE. |
19a00 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c | t1(a.INTEGER.PRIMARY.KEY,.b.INT, |
19a20 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | .c.DEFAULT.0);...CREATE.UNIQUE.I |
19a40 | 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | NDEX.t1x1.ON.t1(a+b);...INSERT.I |
19a60 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c | NTO.t1(a,b).VALUES(7,8).ON.CONFL |
19a80 | 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ICT(a+b).DO.NOTHING;...INSERT.IN |
19aa0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 | TO.t1(a,b).VALUES(8,7),(9,6).ON. |
19ac0 | 43 4f 4e 46 4c 49 43 54 28 61 2b 63 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 82 01 62 04 00 84 | CONFLICT(a+c).DO.NOTHING;...b... |
19ae0 | 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
19b00 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.INT,.c.DEFAULT.0);.. |
19b20 | 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 | .CREATE.UNIQUE.INDEX.t1x1.ON.t1( |
19b40 | 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | a+b);...INSERT.INTO.t1(a,b).VALU |
19b60 | 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 | ES(7,8).ON.CONFLICT(a+b).DO.NOTH |
19b80 | 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ING;...INSERT.INTO.t1(a,b).VALUE |
19ba0 | 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f | S(8,7),(9,6).ON.CONFLICT(a+b).DO |
19bc0 | 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 23 80 31 46 52 4f 4d 20 74 31 3b 0a 82 13 | .NOTHING;...SELECT#.1FROM.t1;... |
19be0 | 61 04 00 84 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | a...+..CREATE.TABLE.t1(a.INTEGER |
19c00 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.INT,.c.DEFAULT.0 |
19c20 | 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e | );...CREATE.UNIQUE.INDEX.t1x1.ON |
19c40 | 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | .t1(a+b);...INSERT.INTO.t1(a,b). |
19c60 | 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 | VALUES(7,8).ON.CONFLICT(a+b).DO. |
19c80 | 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | NOTHING;...INSERT.INTO.t1(a,b).V |
19ca0 | 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 | ALUES(8,7),(9,6).ON.CONFLICT(a+b |
19cc0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 3f | ).DO.NOTHING;...SELECT.DISTINCT? |
19ce0 | 20 67 6c 6f 62 28 31 2c 31 29 20 46 52 4f 4d 20 74 31 3b 0a 82 01 60 04 00 84 07 20 20 43 52 45 | .glob(1,1).FROM.t1;...`......CRE |
19d00 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
19d20 | 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.INT,.c.DEFAULT.0);...CREAT |
19d40 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a | E.UNIQUE.INDEX.t1x1.ON.t1(a+b);. |
19d60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 | ..INSERT.INTO.t1(a,b).VALUES(7,8 |
19d80 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 | ).ON.CONFLICT(a+b).DO.NOTHING;.. |
19da0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 | .INSERT.INTO.t1(a,b).VALUES(8,7) |
19dc0 | 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 | ,(9,6).ON.CONFLICT(a+b).DO.NOTHI |
19de0 | 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 41 20 46 52 4f 4d 20 74 31 3b 0a 82 01 5f 04 00 84 07 20 | NG;...SELECT.A.FROM.t1;..._..... |
19e00 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
19e20 | 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.INT,.c.DEFAULT.0);...C |
19e40 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b | REATE.UNIQUE.INDEX.t1x1.ON.t1(a+ |
19e60 | 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | b);...INSERT.INTO.t1(a,b).VALUES |
19e80 | 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e | (7,8).ON.CONFLICT(a+b).DO.NOTHIN |
19ea0 | 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | G;...INSERT.INTO.t1(a,b).VALUES( |
19ec0 | 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e | 8,7),(9,6).ON.CONFLICT(a+b).DO.N |
19ee0 | 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 40 31 46 52 4f 4d 00 74 31 3b 0a 82 01 5e 04 | OTHING;...SELECT.@1FROM.t1;...^. |
19f00 | 00 84 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
19f20 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.INT,.c.DEFAULT.0); |
19f40 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
19f60 | 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | 1(a+b);...INSERT.INTO.t1(a,b).VA |
19f80 | 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f | LUES(7,8).ON.CONFLICT(a+b).DO.NO |
19fa0 | 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | THING;...INSERT.INTO.t1(a,b).VAL |
19fc0 | 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 | UES(8,7),(9,6).ON.CONFLICT(a+b). |
19fe0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 40 31 46 52 4f 20 5b 61 5d 3b 0a | DO.NOTHING;...SELECT.@1FRO.[a];. |
1a000 | 0d 00 00 00 08 00 57 00 1b 9d 1a 2e 15 da 11 8d 0d 40 08 f3 04 a5 00 57 00 00 00 00 00 00 00 00 | ......W..........@.....W........ |
1a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 4a 81 01 04 00 91 19 20 | ........................J....... |
1a060 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
1a080 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 27 61 27 27 62 27 20 | RY.KEY,.b.int,.c.DEFAULT.'a''b'. |
1a0a0 | 20 2c 20 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | .,.V);.,.y.TEXT);...CREATE.TRIGG |
1a0c0 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
1a0e0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
1a100 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
1a120 | 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | f(S(''%d,%d,%d',new.a,new.b,new. |
1a140 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | c));...END;...CREATE.TRIGGER.r2. |
1a160 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
1a180 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.recorP(x,y).....VALUES( |
1a1a0 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | 'after-insert',printf('%d,%d,%d' |
1a1c0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
1a1e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
1a200 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
1a220 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
1a240 | 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | @.te',printf('%d,%d,%d/%d,%d,%d' |
1a260 | 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,.........A..................... |
1a280 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
1a2a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
1a2c0 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
1a2e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
1a300 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
1a320 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
1a340 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 | .......................olf.a,old |
1a360 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
1a380 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
1a3a0 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
1a3c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
1a3e0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a..DO.UPDATE.SET |
1a400 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
1a420 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
1a440 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
1a460 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
1a480 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SE`ECT.*.FROM.rec |
1a4a0 | 6f 72 64 3b 0a 88 4a 81 00 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..J........CREATE.TABLE.t1(a |
1a4c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
1a4e0 | 45 46 41 55 4c 54 20 27 61 27 27 62 27 20 20 20 2c 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a | EFAULT.'a''b'...,V);.,.y.TEXT);. |
1a500 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
1a520 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
1a540 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
1a560 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | -insert',printf(S(''%d,%d,%d',ne |
1a580 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
1a5a0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
1a5c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c | .BEGIN.....INSERT.INTO.recorP(x, |
1a5e0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
1a600 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
1a620 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
1a640 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
1a660 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
1a680 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-up@.te',printf('%d,% |
1a6a0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',.........A....... |
1a6c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
1a6e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
1a700 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
1a720 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
1a740 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
1a760 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
1a780 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
1a7a0 | 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....olf.a,old.b,old.c,new.a,new |
1a7c0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
1a7e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
1a800 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
1a820 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f | ).VALUES(1,2).....ON.CONFLICT(a. |
1a840 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
1a860 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
1a880 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
1a8a0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
1a8c0 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 | PDATE.SET.c=c+1.WHERE.c<0;...SE` |
1a8e0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4a 7f 04 00 91 19 20 20 43 52 45 41 | ECT.*.FROM.record;..J.......CREA |
1a900 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
1a920 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 27 61 27 27 62 27 20 20 20 20 56 29 | Y,.b.int,.c.DEFAULT.'a''b'....V) |
1a940 | 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | ;.,.y.TEXT);...CREATE.TRIGGER.r1 |
1a960 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
1a980 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
1a9a0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 | ALUES('before-insert',printf(S(' |
1a9c0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
1a9e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
1aa00 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
1aa20 | 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.recorP(x,y).....VALUES('afte |
1aa40 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
1aa60 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
1aa80 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
1aaa0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
1aac0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 | ).........VALUES('before-up@.te' |
1aae0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
1ab00 | 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | .....A.....................old.a |
1ab20 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
1ab40 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
1ab60 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
1ab80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
1aba0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
1abc0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
1abe0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................olf.a,old.b,ol |
1ac00 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
1ac20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
1ac40 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
1ac60 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
1ac80 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a..DO.UPDATE.SET.c=t1 |
1aca0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
1acc0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
1ace0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
1ad00 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
1ad20 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SE`ECT.*.FROM.record;. |
1ad40 | 88 4a 7e 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | .J~......CREATE.TABLE.t1(a.INTEG |
1ad60 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
1ad80 | 20 27 61 27 20 20 20 20 20 20 2c 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | .'a'......,V);.,.y.TEXT);...CREA |
1ada0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
1adc0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
1ade0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
1ae00 | 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | t',printf(S(''%d,%d,%d',new.a,ne |
1ae20 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
1ae40 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
1ae60 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.recorP(x,y).... |
1ae80 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
1aea0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
1aec0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
1aee0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
1af00 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
1af20 | 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-up@.te',printf('%d,%d,%d/% |
1af40 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',.........A............. |
1af60 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
1af80 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
1afa0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
1afc0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
1afe0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
1b000 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
1b020 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
1b040 | 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | lf.a,old.b,old.c,new.a,new.b,new |
1b060 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
1b080 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
1b0a0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
1b0c0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a..DO.UP |
1b0e0 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | DATE.SET.c=t1.c+1;...SELECT.*.FR |
1b100 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | OM.record;...DELETE.FROM.record; |
1b120 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
1b140 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
1b160 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SE`ECT.*. |
1b180 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4a 7d 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 | FROM.record;..J}......CREATE.TAB |
1b1a0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
1b1c0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 27 61 27 20 20 20 20 20 20 20 56 29 3b 0a 2c 20 79 20 | nt,.c.DEFAULT.'a'.......V);.,.y. |
1b1e0 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
1b200 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
1b220 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
1b240 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 | 'before-insert',printf(S(''%d,%d |
1b260 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
1b280 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
1b2a0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
1b2c0 | 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | corP(x,y).....VALUES('after-inse |
1b2e0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
1b300 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
1b320 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
1b340 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
1b360 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-up@.te',print |
1b380 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 | f('%d,%d,%d/%d,%d,%d',.........A |
1b3a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
1b3c0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
1b3e0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
1b400 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
1b420 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
1b440 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
1b460 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
1b480 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............olf.a,old.b,old.c,ne |
1b4a0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
1b4c0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
1b4e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
1b500 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
1b520 | 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a..DO.UPDATE.SET.c=t1.c+1;. |
1b540 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
1b560 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
1b580 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
1b5a0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
1b5c0 | 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 7c 04 00 91 | ;...SE`ECT.*.FROM.record;..Q|... |
1b5e0 | 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | '..CREATE.TABLE.t1(a.INTEGER.PRI |
1b600 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 27 20 61 62 73 | MARY.KEY,.b.int,.c.DEFAULT.'.abs |
1b620 | 28 31 29 61 27 27 62 27 20 20 20 20 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | (1)a''b'....V);.,.y.TEXT);...CRE |
1b640 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
1b660 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
1b680 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
1b6a0 | 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | rt',printf(S(''%d,%d,%d',new.a,n |
1b6c0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
1b6e0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
1b700 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.recorP(x,y)... |
1b720 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
1b740 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
1b760 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
1b780 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
1b7a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
1b7c0 | 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-up@.te',printf('%d,%d,%d/ |
1b7e0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',.........A............ |
1b800 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
1b820 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
1b840 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
1b860 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
1b880 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
1b8a0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
1b8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
1b8e0 | 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | olf.a,old.b,old.c,new.a,new.b,ne |
1b900 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
1b920 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
1b940 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
1b960 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a..DO.U |
1b980 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
1b9a0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
1b9c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
1b9e0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
1ba00 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SE`ECT.* |
1ba20 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 82 6c 7b 04 00 85 5d 20 20 43 52 45 41 54 45 20 54 41 | .FROM.record;..l{...]..CREATE.TA |
1ba40 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
1ba60 | 69 6e 74 2c 20 63 20 44 45 46 41 20 61 2c 62 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | int,.c.DEFA.a,b0)WITHOUT.ROWID;. |
1ba80 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
1baa0 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
1bac0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
1bae0 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
1bb00 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 | AS.t2(a,b).SELECT.a,.b.FROM.nx.W |
1bb20 | 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | HERE.true.....ON.CONFLICT(a).DO. |
1bb40 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b | UPDATE.SET.b=excluded.b,.c=t2.c+ |
1bb60 | 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 | CURRENT_DATE<excluded.b;...SELEC |
1bb80 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 88 60 7a | T.*,.'x'.FROM.t1.ORDER.BY.a;..`z |
1bba0 | 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...E..CREATE.TABLE.t1(a.INTEGER. |
1bbc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 20 61 2c 62 30 29 | PRIMARY.KEY,.b.int,.c.DEFA.a,b0) |
1bbe0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
1bc00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
1bc20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
1bc40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
1bc60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
1bc80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
1bca0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
1bcc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
1bce0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
1bd00 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
1bd20 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
1bd40 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
1bd60 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
1bd80 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
1bda0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
1bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
1bde0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
1be00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
1be20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
1be40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
1be60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
1be80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
1bea0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
1bec0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
1bee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
1bf00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
1bf20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
1bf40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
1bf60 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
1bf80 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | FROM.record;EXPLAIN...INSERT.INT |
1bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
1bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
1bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
1c000 | 0d 00 00 00 07 01 d9 00 1b b2 17 64 13 16 0e c8 0a 7a 06 2c 01 d9 00 00 00 00 00 00 00 00 00 00 | ...........d.....z.,............ |
1c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 4f 81 08 04 00 91 | ..........................O..... |
1c1e0 | 23 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | #..CREATE.TABLE.t1(a.INTEGER.PRI |
1c200 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 20 20 20 20 | MARY.KEY,.b.int,.c.DEFAULT.0.... |
1c220 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b 0a 20 20 43 52 45 41 54 45 20 | ....................);...CREATE. |
1c240 | 54 41 42 4c 45 20 72 65 63 84 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.rec.rd(x.TEXT,.y.TEXT);... |
1c260 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
1c280 | 4e 4f 54 20 49 4e 44 45 58 45 44 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | NOT.INDEXEDON.t1.BEGIN.....INSER |
1c2a0 | 54 20 49 4e 54 4f 20 72 de de de de de de de de de de de de de de de de de de de de de 65 63 6f | T.INTO.r.....................eco |
1c2c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 8b 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUE.('before-i |
1c2e0 | 6e 73 65 72 74 27 2c 70 72 69 00 00 10 00 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',pri....'%d,%d,%d',new.a,n |
1c300 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 20 0a 20 20 45 4e 44 39 0a 20 20 43 52 41 46 54 45 52 20 49 | ew.b,new.c))....END9...CRAFTER.I |
1c320 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 01 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BE.IN.....INSERT.INT |
1c340 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 3e 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUE>('after- |
1c360 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
1c380 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
1c3a0 | 52 49 47 47 45 52 20 72 85 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r..BEFORE.UPDATE.ON.t1.BE |
1c3c0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 00 10 72 65 63 6f 72 64 28 78 2c 69 29 0a | GIN.....INSERT.INT..record(x,i). |
1c3e0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 67 20 6c 6f 77 65 72 28 31 11 62 65 66 6f 72 65 2d | ........VALUES(g.lower(1.before- |
1c400 | 75 70 54 54 54 54 54 54 54 54 54 5d 54 54 54 54 54 54 54 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | upTTTTTTTTT]TTTTTTTdate',printf( |
1c420 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | '%d,%d,%d/%d,..............old.a |
1c440 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 de de de de de de de 2c 6f 6c 64 | GIN.....INSERT.INTO.r.......,old |
1c460 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
1c480 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
1c4a0 | 50 44 41 54 45 20 4f 4e 20 74 30 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t0.BEGIN.....INSERT.INT |
1c4c0 | 4f 2a 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O*record(x,y).........VALUES('af |
1c4e0 | 74 65 72 2d 8e 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-.pdate',printf('%d,%d,%d/%d, |
1c500 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
1c520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
1c540 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 85 2e 63 29 29 3b 0a 20 20 45 4e 41 4c 55 45 53 28 31 | new.a,new.b,ne..c));...ENALUES(1 |
1c560 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 49 4e 54 4f 20 74 31 28 | ,2);...DELETE.FROM.recorINTO.t1( |
1c580 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 72 69 6e 74 66 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2)...rintfCONFLICT |
1c5a0 | 28 61 29 20 44 4f 20 55 50 44 41 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | (a).DO.UPDA*.FROM.record;...DELE |
1c5c0 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 04 49 4e 53 45 52 54 20 49 4e 54 4f 20 2c 32 | TE.FROM.record;...INSERT.INTO.,2 |
1c5e0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
1c600 | 45 54 20 63 74 72 69 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.ctri1.WHERE.c<0;...SELECT.*.F |
1c620 | 52 4f 4d 20 72 65 63 6f 72 64 20 0a 88 4a 81 07 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record...J........CREATE.TAB |
1c640 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
1c660 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 0a 2c 20 20 20 20 20 20 20 56 29 3b 0a 2c 20 79 20 | nt,.c.DEFAULT.0.,.......V);.,.y. |
1c680 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
1c6a0 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
1c6c0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
1c6e0 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 | 'before-insert',printf(S(''%d,%d |
1c700 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
1c720 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
1c740 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
1c760 | 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | corP(x,y).....VALUES('after-inse |
1c780 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
1c7a0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
1c7c0 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
1c7e0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
1c800 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-up@.te',print |
1c820 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 | f('%d,%d,%d/%d,%d,%d',.........A |
1c840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
1c860 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
1c880 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
1c8a0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
1c8c0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
1c8e0 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
1c900 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
1c920 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............olf.a,old.b,old.c,ne |
1c940 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
1c960 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
1c980 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
1c9a0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
1c9c0 | 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a..DO.UPDATE.SET.c=t1.c+1;. |
1c9e0 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
1ca00 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
1ca20 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
1ca40 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
1ca60 | 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4a 81 06 04 00 | ;...SE`ECT.*.FROM.record;..J.... |
1ca80 | 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
1caa0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 0a 20 20 | IMARY.KEY,.b.int,.c.DEFAULT.0... |
1cac0 | 2c 20 20 20 20 20 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ,.....V);.,.y.TEXT);...CREATE.TR |
1cae0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
1cb00 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
1cb20 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
1cb40 | 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | intf(S(''%d,%d,%d',new.a,new.b,n |
1cb60 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
1cb80 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
1cba0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.recorP(x,y).....VALU |
1cbc0 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
1cbe0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
1cc00 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
1cc20 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
1cc40 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
1cc60 | 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -up@.te',printf('%d,%d,%d/%d,%d, |
1cc80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',.........A.................. |
1cca0 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
1ccc0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
1cce0 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
1cd00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
1cd20 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
1cd40 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
1cd60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c | ..........................olf.a, |
1cd80 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
1cda0 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
1cdc0 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
1cde0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
1ce00 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a..DO.UPDATE. |
1ce20 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
1ce40 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
1ce60 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
1ce80 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
1cea0 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SE`ECT.*.FROM. |
1cec0 | 72 65 63 6f 72 64 3b 0a 88 4a 81 05 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;..J........CREATE.TABLE.t |
1cee0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
1cf00 | 63 20 44 45 46 41 55 4c 54 20 30 0a 20 20 20 2c 20 20 20 20 56 29 3b 0a 2c 20 79 20 54 45 58 54 | c.DEFAULT.0....,....V);.,.y.TEXT |
1cf20 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
1cf40 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
1cf60 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
1cf80 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 | ore-insert',printf(S(''%d,%d,%d' |
1cfa0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
1cfc0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
1cfe0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 | .t1.BEGIN.....INSERT.INTO.recorP |
1d000 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
1d020 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
1d040 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
1d060 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
1d080 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
1d0a0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-up@.te',printf('% |
1d0c0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 | d,%d,%d/%d,%d,%d',.........A.... |
1d0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
1d100 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
1d120 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
1d140 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
1d160 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
1d180 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
1d1a0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
1d1c0 | 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........olf.a,old.b,old.c,new.a, |
1d1e0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
1d200 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
1d220 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
1d240 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
1d260 | 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a..DO.UPDATE.SET.c=t1.c+1;...SE |
1d280 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
1d2a0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
1d2c0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
1d2e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
1d300 | 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4a 81 04 04 00 91 19 20 20 | SE`ECT.*.FROM.record;..J........ |
1d320 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
1d340 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 0a 20 20 20 20 2c 20 | Y.KEY,.b.int,.c.DEFAULT.0.....,. |
1d360 | 20 20 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ..V);.,.y.TEXT);...CREATE.TRIGGE |
1d380 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
1d3a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
1d3c0 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
1d3e0 | 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | (S(''%d,%d,%d',new.a,new.b,new.c |
1d400 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
1d420 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
1d440 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.recorP(x,y).....VALUES(' |
1d460 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
1d480 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
1d4a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
1d4c0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
1d4e0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 | (x,y).........VALUES('before-up@ |
1d500 | 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | .te',printf('%d,%d,%d/%d,%d,%d', |
1d520 | 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | .........A.....................o |
1d540 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
1d560 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
1d580 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
1d5a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
1d5c0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
1d5e0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
1d600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e | ......................olf.a,old. |
1d620 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
1d640 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
1d660 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
1d680 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
1d6a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a..DO.UPDATE.SET. |
1d6c0 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
1d6e0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
1d700 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
1d720 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
1d740 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SE`ECT.*.FROM.reco |
1d760 | 72 64 3b 0a 88 4a 81 03 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..J........CREATE.TABLE.t1(a. |
1d780 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
1d7a0 | 46 41 55 4c 54 20 30 0a 20 20 20 20 20 2c 20 20 56 29 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 | FAULT.0......,..V);.,.y.TEXT);.. |
1d7c0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
1d7e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
1d800 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
1d820 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | insert',printf(S(''%d,%d,%d',new |
1d840 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
1d860 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
1d880 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 | BEGIN.....INSERT.INTO.recorP(x,y |
1d8a0 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
1d8c0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
1d8e0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
1d900 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
1d920 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
1d940 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-up@.te',printf('%d,%d |
1d960 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 41 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.........A........ |
1d980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
1d9a0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
1d9c0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
1d9e0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
1da00 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
1da20 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
1da40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
1da60 | 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....olf.a,old.b,old.c,new.a,new. |
1da80 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
1daa0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
1dac0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
1dae0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 | .VALUES(1,2).....ON.CONFLICT(a.. |
1db00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
1db20 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
1db40 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
1db60 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
1db80 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 | DATE.SET.c=c+1.WHERE.c<0;...SE`E |
1dba0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4a 81 02 04 00 91 19 20 20 43 52 45 41 | CT.*.FROM.record;..J........CREA |
1dbc0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
1dbe0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 0a 20 20 20 20 20 20 20 20 56 29 | Y,.b.int,.c.DEFAULT.0.........V) |
1dc00 | 3b 0a 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | ;.,.y.TEXT);...CREATE.TRIGGER.r1 |
1dc20 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
1dc40 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
1dc60 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 53 28 27 | ALUES('before-insert',printf(S(' |
1dc80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
1dca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
1dcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
1dce0 | 4e 54 4f 20 72 65 63 6f 72 50 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.recorP(x,y).....VALUES('afte |
1dd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
1dd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
1dd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
1dd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
1dd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 40 00 74 65 27 | ).........VALUES('before-up@.te' |
1dda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
1ddc0 | 20 20 20 20 20 41 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | .....A.....................old.a |
1dde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
1de00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
1de20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
1de40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
1de60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
1de80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
1dea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 66 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................olf.a,old.b,ol |
1dec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
1dee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
1df00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
1df20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
1df40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 0f 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a..DO.UPDATE.SET.c=t1 |
1df60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
1df80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
1dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
1dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
1dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 60 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SE`ECT.*.FROM.record;. |
1e000 | 0d 00 00 00 07 01 91 00 1b 8c 17 36 12 d9 0e 7c 0a 2f 05 e0 01 91 00 00 00 00 00 00 00 00 00 00 | ...........6...|./.............. |
1e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 4b 81 0f 04 00 91 1b 20 20 43 52 45 41 54 | ..................K........CREAT |
1e1a0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
1e1c0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
1e1e0 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
1e200 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
1e220 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ON.t1.BEGIN........VALUES('befor |
1e240 | 65 2d 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | e-b,new.c));...ENinsert',printf( |
1e260 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
1e280 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
1e2a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
1e2c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
1e2e0 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
1e300 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
1e320 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
1e340 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
1e360 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
1e380 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
1e3a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
1e3c0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
1e3e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
1e400 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
1e420 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
1e440 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
1e460 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
1e480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
1e4a0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
1e4c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
1e4e0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
1e500 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
1e520 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
1e540 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 43 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.reCord;... |
1e560 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
1e580 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
1e5a0 | 46 4c 32 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FL2CT(a).DO.UPDATE.SET.c=c+1.WHE |
1e5c0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
1e5e0 | 88 4b 81 0e 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .K........CREATE.TABLE.t1(a.INTE |
1e600 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
1e620 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
1e640 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
1e660 | 20 42 45 46 4f 52 45 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.DELETE.ON.t1.BEGIN.....I |
1e680 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
1e6a0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
1e6c0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
1e6e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
1e700 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
1e720 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
1e740 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
1e760 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
1e780 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
1e7a0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
1e7c0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
1e7e0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
1e800 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
1e820 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
1e840 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
1e860 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
1e880 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
1e8a0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
1e8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
1e8e0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
1e900 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c | .c));...END;...INSERT.INTO.t1(c, |
1e920 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
1e940 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
1e960 | 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ES(1,2).ON.CONFLICT(a).DO.UPDATE |
1e980 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
1e9a0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
1e9c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
1e9e0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
1ea00 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
1ea20 | 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 49 81 0d 04 00 91 17 20 20 43 52 45 41 54 45 20 | .record;VACUUM..I........CREATE. |
1ea40 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
1ea60 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
1ea80 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
1eaa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 44 45 4c 45 54 45 20 4f 4e | EATE.TRIGGER.r1.BEFORE.DELETE.ON |
1eac0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
1eae0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
1eb00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
1eb20 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
1eb40 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
1eb60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
1eb80 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
1eba0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
1ebc0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
1ebe0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
1ec00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
1ec20 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
1ec40 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
1ec60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,o,d.b,old.c,new.a,n |
1ec80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
1eca0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
1ecc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
1ece0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
1ed00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
1ed20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
1ed40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
1ed60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
1ed80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
1eda0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
1edc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
1ede0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 | ATE.SET.c=t1.c+1;...SELd;...DELE |
1ee00 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
1ee20 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
1ee40 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
1ee60 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 0c | <0;...SELECT.*.FROM.record;..Y.. |
1ee80 | 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...7..CREATE.TABLE.t1(a.INTEGER. |
1eea0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
1eec0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
1eee0 | 79 20 54 2c 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.T,XT);...CREATE.TRIGGER.r1.BEF |
1ef00 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
1ef20 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
1ef40 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
1ef60 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
1ef80 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
1efa0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
1efc0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
1efe0 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
1f000 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
1f020 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
1f040 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
1f060 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
1f080 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
1f0a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
1f0c0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
1f0e0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
1f100 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
1f120 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
1f140 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
1f160 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
1f180 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
1f1a0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
1f1c0 | 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(c,b).VALUES(1,2);...DE |
1f1e0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
1f200 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
1f220 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
1f240 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
1f260 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
1f280 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
1f2a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
1f2c0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 0b 04 00 91 | ...SELECT.*.FROM.record;..Y..... |
1f2e0 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
1f300 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
1f320 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 2c 45 58 54 2c 20 79 2c 54 | .CREATE.TABLE.record(x.,EXT,.y,T |
1f340 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
1f360 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
1f380 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
1f3a0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
1f3c0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
1f3e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
1f400 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
1f420 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
1f440 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
1f460 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
1f480 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
1f4a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
1f4c0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
1f4e0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
1f500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
1f520 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
1f540 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
1f560 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
1f580 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
1f5a0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
1f5c0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
1f5e0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
1f600 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
1f620 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
1f640 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
1f660 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
1f680 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
1f6a0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
1f6c0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
1f6e0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
1f700 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
1f720 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 52 81 0a 04 00 91 29 20 20 | SELECT.*.FROM.record;..R.....).. |
1f740 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
1f760 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
1f780 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 27 61 27 27 62 27 20 54 45 58 54 2c | EATE.TABLE.record(x.'a''b'.TEXT, |
1f7a0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
1f7c0 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
1f7e0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
1f800 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
1f820 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
1f840 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
1f860 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
1f880 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
1f8a0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
1f8c0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
1f8e0 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
1f900 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
1f920 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
1f940 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
1f960 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
1f980 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
1f9a0 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
1f9c0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
1f9e0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
1fa00 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
1fa20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
1fa40 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
1fa60 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 | );...END;...INSERT.INTO.t1(c,b). |
1fa80 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
1faa0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
1fac0 | 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 1,2).ON.CONFLICT(a).DO.UPDATE.SE |
1fae0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
1fb00 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
1fb20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
1fb40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
1fb60 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
1fb80 | 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 70 81 09 04 00 91 65 20 20 43 52 45 41 54 45 20 54 41 42 | cord;VACUUM..p.....e..CREATE.TAB |
1fba0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
1fbc0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 3b | nt,.c.DEFAULT.0...............); |
1fbe0 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
1fc00 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
1fc20 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
1fc40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
1fc60 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-insert',printf('%d,%d,% |
1fc80 | 64 27 2c 6e 65 77 2e 61 2c 6e 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | d',new.a,nTABLE.t1(a.INTEGER.PRI |
1fca0 | 4d 41 52 59 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | MARYew.b,new.c));...END;...CREAT |
1fcc0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
1fce0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 4f 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.ONTO.record(x,y |
1fd00 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
1fd20 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
1fd40 | 29 3b 0a 20 20 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | );...GER.r3.BEFORE.UPDATE.ON.t1. |
1fd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
1fd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
1fda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
1fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
1fde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 63 | ,old.b,old.c,new.a,new.b,new.c)c |
1fe00 | 6c 75 64 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | lud.END;...CREATE.TRIGGER.r4.AFT |
1fe20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
1fe40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
1fe60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
1fe80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
1fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
1fec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 56 49 45 57 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,neVIEW);...END;. |
1fee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
1ff00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
1ff20 | 54 20 49 4e 54 4f 20 74 31 28 41 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(A,b).VALUES(1,2).....O |
1ff40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
1ff60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
1ff80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
1ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 00 00 00 80 | O.t1(a,b).VALUES(1,2).....ON.... |
1ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
1ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
20000 | 0d 00 00 00 07 01 74 00 1b 76 17 19 12 cc 0e 6f 0a 20 05 c3 01 74 00 00 00 00 00 00 00 00 00 00 | ......t..v.....o.....t.......... |
20020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
200a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
200c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
200e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
20160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 4b 81 16 04 00 91 1b 20 20 43 52 | .....................K........CR |
20180 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
201a0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
201c0 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
201e0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
20200 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
20220 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
20240 | 65 2d 69 6e 73 65 72 74 27 2c 45 58 49 53 54 53 28 53 45 4c 45 43 54 27 25 64 2c 25 64 2c 25 64 | e-insert',EXISTS(SELECT'%d,%d,%d |
20260 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
20280 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
202a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
202c0 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
202e0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
20300 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
20320 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 | r3.BEFORE.UPDATE.ON.t1.BEGIN.INS |
20340 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
20360 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
20380 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
203a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
203c0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
203e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
20400 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
20420 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
20440 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
20460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
20480 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
204a0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
204c0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e | .t1(a,b).VALUES(1,2);...DELETEIN |
204e0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
20500 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
20520 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
20540 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
20560 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
20580 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
205a0 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
205c0 | 64 3b 0a 88 59 81 15 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.....7..CREATE.TABLE.t1(a.I |
205e0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
20600 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
20620 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
20640 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
20660 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
20680 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 40 72 69 6e 74 66 28 | ..VALUES('before-insert',@rintf( |
206a0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
206c0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
206e0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
20700 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
20720 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
20740 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
20760 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
20780 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
207a0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
207c0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
207e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
20800 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
20820 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
20840 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
20860 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
20880 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
208a0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
208c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
208e0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
20900 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
20920 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
20940 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
20960 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
20980 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
209a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
209c0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
209e0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
20a00 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
20a20 | 88 4b 81 14 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .K........CREATE.TABLE.t1(a.INTE |
20a40 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
20a60 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
20a80 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
20aa0 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
20ac0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
20ae0 | 41 4c 55 45 53 28 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 70 72 69 6e 74 66 28 20 74 72 | ALUES(.replace(1,1,1),printf(.tr |
20b00 | 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | im(1,1),new.a,new.b,new.c));...E |
20b20 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
20b40 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
20b60 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
20b80 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e | nsert',printf(.glob(1,1),new.a,n |
20ba0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
20bc0 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
20be0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
20c00 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
20c20 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
20c40 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
20c60 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
20c80 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
20ca0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
20cc0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
20ce0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
20d00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
20d20 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
20d40 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
20d60 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
20d80 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
20da0 | 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ES(1,2).ON.CONFLICT(a).DO.UPDATE |
20dc0 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
20de0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
20e00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
20e20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
20e40 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
20e60 | 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 59 81 13 04 00 91 37 20 20 43 52 45 41 54 45 20 | .record;VACUUM..Y.....7..CREATE. |
20e80 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
20ea0 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
20ec0 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
20ee0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
20f00 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
20f20 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 20 72 65 70 6c 61 63 65 28 31 2c | (x,y).........VALUES(.replace(1, |
20f40 | 31 2c 31 29 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 2c 6e 65 77 | 1,1),printf(.datetime(1,1,1),new |
20f60 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
20f80 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
20fa0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
20fc0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
20fe0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
21000 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
21020 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
21040 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
21060 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
21080 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
210a0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
210c0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
210e0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
21100 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
21120 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
21140 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
21160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
21180 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
211a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
211c0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
211e0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
21200 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
21220 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
21240 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
21260 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
21280 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
212a0 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
212c0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 12 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..I........CREATE.TAB |
212e0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
21300 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
21320 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
21340 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
21360 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
21380 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 20 6a 73 6f 6e 5f 74 79 70 65 28 31 2c 31 | y).........VALUES(.json_type(1,1 |
213a0 | 29 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ),printf(.trim(1,1),new.a,new.b, |
213c0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
213e0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
21400 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
21420 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 | UES('after-insert',printf(.glob( |
21440 | 31 2c 31 29 2c 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b | 1,1),.json_remove(1,1)));...END; |
21460 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
21480 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
214a0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
214c0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
214e0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
21500 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
21520 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
21540 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
21560 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
21580 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
215a0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
215c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
215e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
21600 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
21620 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ALUES(1,2);.M.record;...INSERT.I |
21640 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c | NTO.t1(a,b).VALUES(1,2).ON.CONFL |
21660 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
21680 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
216a0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
216c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
216e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
21700 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 11 04 00 91 | ...SELECT.*.FROM.record;..Y..... |
21720 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
21740 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
21760 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
21780 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
217a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
217c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 78 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,x).........VALUES(' |
217e0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
21800 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
21820 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
21840 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
21860 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
21880 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
218a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
218c0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
218e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
21900 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
21920 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
21940 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
21960 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
21980 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
219a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
219c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
219e0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
21a00 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
21a20 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
21a40 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
21a60 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
21a80 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
21aa0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
21ac0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.a=t1.c+1;...SE |
21ae0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
21b00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
21b20 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
21b40 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
21b60 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 89 06 81 10 04 00 92 11 20 20 | SELECT.*.FROM.record;........... |
21b80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
21ba0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
21bc0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
21be0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
21c00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
21c20 | 20 72 65 63 6f 72 46 28 78 43 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .recorF(xCy).........VALUES('bef |
21c40 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
21c60 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
21c80 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
21ca0 | 20 42 45 47 4e 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGNN.....INSERT.INTO.record(x, |
21cc0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 68 74 27 2c 70 72 69 | y).....VALUES('after-inseht',pri |
21ce0 | 00 40 ff 28 27 25 64 2c 25 64 2c 22 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .@.('%d,%d,"d',new.a,new.b,new.c |
21d00 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
21d20 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 7f ff ff ff 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.....EGIN.....INS |
21d40 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 91 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,.).........VAL |
21d60 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
21d80 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
21da0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
21dc0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
21de0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
21e00 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
21e20 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
21e40 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
21e60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
21e80 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
21ea0 | 2e 62 2c 6e 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 65 77 3b 0a 20 20 45 4e 44 3b 0a 20 | .b,nDEFAULT.0);...CRew;...END;.. |
21ec0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
21ee0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
21f00 | 20 49 4e 54 4f 20 74 4c 55 45 53 28 27 62 65 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | .INTO.tLUES('be1(a,b).VALUES(1,2 |
21f20 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
21f40 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
21f60 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 3f 20 46 5d 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELET?.F]OM.record;...INS |
21f80 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
21fa0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 | .ON.CONFLICT(a.................. |
21fc0 | e2 e2 e2 e2 e2 e2 e2 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | .......).DO.UPDATE.SET.c=c+1.WHE |
21fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
22000 | 0d 00 00 00 07 01 ca 00 1b b3 17 66 13 14 0e c5 0a 76 06 27 01 ca 00 00 00 00 00 00 00 00 00 00 | ...........f.....v.'............ |
22020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
220a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
220c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
220e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
22180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
221a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
221c0 | 00 00 00 00 00 00 00 00 00 00 88 59 81 1d 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | ...........Y.....7..CREATE.TABLE |
221e0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
22200 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
22220 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
22240 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
22260 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
22280 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
222a0 | 70 72 69 6e 74 66 28 20 20 6d 61 78 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf(..max(1,1),new.a,new.b,ne |
222c0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
222e0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
22300 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
22320 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
22340 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
22360 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
22380 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
223a0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
223c0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
223e0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
22400 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
22420 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
22440 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
22460 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
22480 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
224a0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
224c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
224e0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
22500 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
22520 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
22540 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
22560 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
22580 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
225a0 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELETE.FROM.record;...INS |
225c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
225e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
22600 | 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | c+1.WHERE.c<0;...SELECT.*.FROM.r |
22620 | 65 63 6f 72 64 3b 0a 88 4b 81 1c 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ecord;..K........CREATE.TABLE.t1 |
22640 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
22660 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
22680 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
226a0 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
226c0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
226e0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
22700 | 20 49 4e 28 53 45 4c 45 43 54 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | .IN(SELECT'%d,%d,%d',new.a,new.b |
22720 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
22740 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
22760 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
22780 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
227a0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
227c0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
227e0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ATE.ON.t1.BEGIN.INSERT.INTO.reco |
22800 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
22820 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
22840 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
22860 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
22880 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
228a0 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
228c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
228e0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
22900 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
22920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
22940 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
22960 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
22980 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2);...DELETEINSERT.INTO.t1( |
229a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
229c0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
229e0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
22a00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
22a20 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
22a40 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
22a60 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 81 1b 04 00 91 1b 20 20 | SELECT.*.FROM.record;..K........ |
22a80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
22aa0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
22ac0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
22ae0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
22b00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
22b20 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
22b40 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 3e 3d 28 53 45 4c 45 43 54 27 25 64 2c 25 64 2c | ore-insert',pri.>=(SELECT'%d,%d, |
22b60 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
22b80 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
22ba0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
22bc0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
22be0 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
22c00 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
22c20 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.I |
22c40 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
22c60 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
22c80 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
22ca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
22cc0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
22ce0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
22d00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
22d20 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
22d40 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 49 | ate',printf('%d,%d,%d/%d,%d,%d'I |
22d60 | 4e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | N............................... |
22d80 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
22da0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
22dc0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
22de0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
22e00 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
22e20 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
22e40 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
22e60 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
22e80 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
22ea0 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
22ec0 | 6f 72 64 3b 0a 88 4b 81 1a 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..K........CREATE.TABLE.t1(a |
22ee0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
22f00 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
22f20 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
22f40 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
22f60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
22f80 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 3e | ....VALUES('before-insert',pri.> |
22fa0 | 3d 28 53 45 4c 45 43 54 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | =(SELECT'%d,%d,%d',new.a,new.b,n |
22fc0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
22fe0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
23000 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
23020 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
23040 | 25 64 27 2c 6e 65 77 2c 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new,a,new.b,new.c));...END;. |
23060 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
23080 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | E.ON.t1.BEGIN.INSERT.INTO.record |
230a0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
230c0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
230e0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
23100 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
23120 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
23140 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
23160 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
23180 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
231a0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
231c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
231e0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
23200 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
23220 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | (1,2);...DELETEINSERT.INTO.t1(a, |
23240 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
23260 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
23280 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
232a0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
232c0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
232e0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
23300 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4e 81 19 04 00 91 21 20 20 43 52 | LECT.*.FROM.record;..N.....!..CR |
23320 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
23340 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
23360 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
23380 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
233a0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
233c0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
233e0 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 3e 3d 28 53 45 4c 45 43 54 20 40 31 27 25 64 2c 25 64 | e-insert',pri.>=(SELECT.@1'%d,%d |
23400 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
23420 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
23440 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
23460 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
23480 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
234a0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
234c0 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
234e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
23500 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
23520 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
23540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
23560 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
23580 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
235a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
235c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
235e0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
23600 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
23620 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
23640 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
23660 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
23680 | 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | EINSERT.INTO.t1(a,b).VALUES(1,2) |
236a0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
236c0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
236e0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
23700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
23720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
23740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
23760 | 63 6f 72 64 3b 0a 88 49 81 18 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I........CREATE.TABLE.t1( |
23780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
237a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
237c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
237e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
23800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
23820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 | .....VALUES('before-insert',pri. |
23840 | 3e 3d 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | >=('%d,%d,%d',new.a,new.b,new.c) |
23860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
23880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
238a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
238c0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 31 2c | fter-insert',printf(.datetime(1, |
238e0 | 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | 1,1),new.b,new.c));...END;...CRE |
23900 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
23920 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
23940 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
23960 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
23980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
239a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
239c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
239e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
23a00 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
23a20 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
23a40 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
23a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
23a80 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
23aa0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
23ac0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | 1,2);...DELETEINSERT.INTO.t1(a,b |
23ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
23b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
23b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
23b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
23b60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
23b80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
23ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 17 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I........CRE |
23bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
23be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
23c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
23c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
23c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
23c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
23c80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 3e 3d 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',pri.>=('%d,%d,%d',new.a |
23ca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
23cc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
23ce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
23d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 3e 3d | ....VALUES('after-insert',pri.>= |
23d20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
23d40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
23d60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
23d80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
23da0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
23dc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
23de0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
23e00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
23e20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
23e40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
23e60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
23e80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
23ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
23ec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
23ee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
23f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e 53 45 52 | (a,b).VALUES(1,2);...DELETEINSER |
23f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
23f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
23f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
23f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
23fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
23fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
23fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
24000 | 0d 00 00 00 07 01 91 00 1b 9f 17 42 12 f5 0e 98 0a 3b 05 ee 01 91 00 00 00 00 00 00 00 00 00 00 | ...........B.....;.............. |
24020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
240a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
240c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
240e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
24180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 81 24 04 00 91 37 20 20 43 52 45 41 54 | ..................Y.$...7..CREAT |
241a0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
241c0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
241e0 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
24200 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
24220 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
24240 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
24260 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 31 20 2d 31 31 29 2c 6e | nsert',printf(.datetime(1.-11),n |
24280 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
242a0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
242c0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
242e0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
24300 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
24320 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
24340 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
24360 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
24380 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
243a0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
243c0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
243e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
24400 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
24420 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
24440 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
24460 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
24480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
244a0 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
244c0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
244e0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
24500 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
24520 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
24540 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
24560 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
24580 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
245a0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
245c0 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELECT.* |
245e0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 23 04 00 91 17 20 20 43 52 45 41 54 45 20 54 | .FROM.record;..I.#......CREATE.T |
24600 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
24620 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 | .int,.c.DEFAULT.0);...CREATE.TAB |
24640 | 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | LE.record(x.TEXT,.y.TEXT);...CRE |
24660 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
24680 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
246a0 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
246c0 | 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 20 4e 55 4c 4c 29 2c 6e 65 77 2e | rt',printf(.datetime(.NULL),new. |
246e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
24700 | 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.INSERT.ON.t1.BEGIN.. |
24720 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 | ...INSERT.INTO.record(x,y).....V |
24740 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-insert',printf('%d, |
24760 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
24780 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 | D;...CREATE.TRIGGER.r3.BEFORE.UP |
247a0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
247c0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
247e0 | 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ore-update',printf('%d,%d,%d/%d, |
24800 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
24820 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
24840 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
24860 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
24880 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
248a0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
248c0 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
248e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
24900 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
24920 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
24940 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
24960 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
24980 | 28 31 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 63 3d 74 31 2e 63 2b 31 3b | (1,2).....ON.CONFLICT(.c=t1.c+1; |
249a0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 | ...SELECT.*.FROM.record;...DELET |
249c0 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
249e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
24a00 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c | (a).DO.UPDATE.SET.c=c+1.WHERE.c< |
24a20 | 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 22 04 | 0;...SELECT.*.FROM.record;..Y.". |
24a40 | 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..7..CREATE.TABLE.t1(a.INTEGER.P |
24a60 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
24a80 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
24aa0 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
24ac0 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
24ae0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
24b00 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d | ('before-insert',printf(.datetim |
24b20 | 65 28 20 31 3d 31 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | e(.1=11),new.b,new.c));...END;.. |
24b40 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
24b60 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
24b80 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
24ba0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
24bc0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
24be0 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
24c00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
24c20 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
24c40 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
24c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
24c80 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
24ca0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 | ...CREATE.TRIGGER.r4.AFTER.UPDAT |
24cc0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
24ce0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | cord(x,y).........VALUES('after- |
24d00 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
24d20 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
24d40 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
24d60 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 | a,new.b,new.c));...END;...INSERT |
24d80 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c | .INTO.t1(a,b).VALUES(1,2);...DEL |
24da0 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
24dc0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
24de0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 | CT(a).DO.UPDATE.SET.c=t1.c+1;... |
24e00 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | SELECT.*.FROM.record;...DELETE.F |
24e20 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
24e40 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
24e60 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
24e80 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 21 04 00 91 37 | ..SELECT.*.FROM.record;..Y.!...7 |
24ea0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
24ec0 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
24ee0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
24f00 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
24f20 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
24f40 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
24f60 | 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 20 | efore-insert',printf(.datetime(. |
24f80 | 2d 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | -1,1),new.b,new.c));...END;...CR |
24fa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.INSERT.ON. |
24fc0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
24fe0 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
25000 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
25020 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
25040 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
25060 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
25080 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
250a0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
250c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
250e0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
25100 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
25120 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
25140 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
25160 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
25180 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
251a0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
251c0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
251e0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
25200 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
25220 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
25240 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
25260 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
25280 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
252a0 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
252c0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
252e0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 20 04 00 91 17 20 20 43 | ELECT.*.FROM.record;..I........C |
25300 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
25320 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
25340 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
25360 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
25380 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
253a0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
253c0 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 20 20 22 61 | re-insert',printf(.datetime(.."a |
253e0 | 22 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | "),new.b,new.c));...END;...CREAT |
25400 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
25420 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
25440 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
25460 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
25480 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
254a0 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
254c0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
254e0 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
25500 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
25520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
25540 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
25560 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
25580 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
255a0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
255c0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
255e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
25600 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
25620 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
25640 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
25660 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
25680 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 63 3d | .VALUES(1,2).....ON.CONFLICT(.c= |
256a0 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
256c0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
256e0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
25700 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
25720 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
25740 | 3b 0a 88 59 81 1f 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..Y.....7..CREATE.TABLE.t1(a.IN |
25760 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
25780 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
257a0 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
257c0 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
257e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
25800 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 | .VALUES('before-insert',printf(. |
25820 | 63 68 61 6e 67 65 73 28 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | changes(),new.a,new.b,new.c));.. |
25840 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
25860 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
25880 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
258a0 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 73 71 6c 69 | -insert',printf('%d,%d,%d',.sqli |
258c0 | 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | te_version()));...END;...CREATE. |
258e0 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
25900 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
25920 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
25940 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
25960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
25980 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
259a0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
259c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
259e0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
25a00 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
25a20 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
25a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
25a60 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
25a80 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
25aa0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
25ac0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
25ae0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
25b00 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
25b20 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
25b40 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
25b60 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
25b80 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
25ba0 | 5d 81 1e 04 00 91 3f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | ].....?..CREATE.TABLE.t1(a.INTEG |
25bc0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
25be0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
25c00 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
25c20 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
25c40 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
25c60 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 27 61 27 | LUES('before-insert',printf(.'a' |
25c80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
25ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
25cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
25ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
25d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
25d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
25d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
25d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
25d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
25da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
25dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
25de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
25e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
25e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
25e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
25e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
25e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
25ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
25ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
25ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
25f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
25f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
25f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
25f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
25f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
25fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
25fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
25fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
26000 | 0d 00 00 00 07 01 7f 00 1b a3 17 46 12 f9 0e 96 0a 39 05 dc 01 7f 00 00 00 00 00 00 00 00 00 00 | ...........F.....9.............. |
26020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
260a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
260c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
260e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
26160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 | ................................ |
26180 | 59 81 2b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | Y.+...7..CREATE.TABLE.t1(a.INTEG |
261a0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
261c0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
261e0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
26200 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
26220 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
26240 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 | LUES('before-insert',printf(.dat |
26260 | 65 74 69 6d 65 28 31 2c 31 45 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | etime(1,1E1),new.b,new.c));...EN |
26280 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
262a0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
262c0 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
262e0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
26300 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
26320 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
26340 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
26360 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
26380 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
263a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
263c0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
263e0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
26400 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
26420 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
26440 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
26460 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
26480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
264a0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
264c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
264e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
26500 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
26520 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
26540 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
26560 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
26580 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
265a0 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
265c0 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 2a | <0;...SELECT.*.FROM.record;..Y.* |
265e0 | 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...7..CREATE.TABLE.t1(a.INTEGER. |
26600 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
26620 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
26640 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
26660 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
26680 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
266a0 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 | S('before-insert',printf(.dateti |
266c0 | 6d 65 28 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | me(1,1,1),new.b,new.c));...END;. |
266e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r2.AFTER.UPDATE |
26700 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
26720 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
26740 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
26760 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
26780 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
267a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
267c0 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
267e0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
26800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
26820 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
26840 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
26860 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
26880 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
268a0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
268c0 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
268e0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
26900 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
26920 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
26940 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
26960 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
26980 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
269a0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
269c0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
269e0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
26a00 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
26a20 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 29 04 00 91 | ...SELECT.*.FROM.record;..Y.)... |
26a40 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
26a60 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
26a80 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
26aa0 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
26ac0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
26ae0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
26b00 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 | before-insert',printf(.datetime( |
26b20 | 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | 1,1,1),new.b,new.c));...END;...C |
26b40 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
26b60 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
26b80 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
26ba0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
26bc0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
26be0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
26c00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
26c20 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
26c40 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
26c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
26c80 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
26ca0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
26cc0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
26ce0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
26d00 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
26d20 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
26d40 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
26d60 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
26d80 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
26da0 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
26dc0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
26de0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
26e00 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 41 4e 41 4c 59 5a 45 20 46 52 4f | LECT.*.FROM.record;..ANALYZE.FRO |
26e20 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
26e40 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
26e60 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
26e80 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5f 81 28 04 00 91 43 20 20 | SELECT.*.FROM.record;.._.(...C.. |
26ea0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
26ec0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
26ee0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
26f00 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
26f20 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
26f40 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
26f60 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 31 2c 31 | ore-insert',printf(.datetime(1,1 |
26f80 | 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | ,1),new.b,new.c));...END;...CREA |
26fa0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
26fc0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
26fe0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
27000 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
27020 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
27040 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
27060 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
27080 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
270a0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
270c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
270e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
27100 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
27120 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
27140 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
27160 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
27180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
271a0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
271c0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
271e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
27200 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
27220 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
27240 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
27260 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
27280 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
272a0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
272c0 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
272e0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 49 81 27 04 00 91 | ECT.*.FROM.record;VACUUM..I.'... |
27300 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
27320 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
27340 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
27360 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
27380 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
273a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
273c0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 64 61 74 65 74 69 6d 65 28 | before-insert',printf(.datetime( |
273e0 | 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | 1,1,1),new.b,new.c));...END;...C |
27400 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
27420 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
27440 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
27460 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
27480 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
274a0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
274c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
274e0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
27500 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
27520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
27540 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
27560 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
27580 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
275a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
275c0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
275e0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
27600 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
27620 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
27640 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
27660 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
27680 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
276a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 20 73 74 72 66 74 69 6d 65 28 31 2c | (a).DO.UPDATE.SET.c=.strftime(1, |
276c0 | 31 2c 31 2c 31 29 20 46 52 4f 4d 20 72 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 1,1,1).FROM.recor.record;...INSE |
276e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
27700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
27720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
27740 | 63 6f 72 64 3b 0a 88 59 81 26 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.&...7..CREATE.TABLE.t1( |
27760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
27780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
277a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
277c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
277e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
27800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
27820 | 74 66 28 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf(.datetime(1,1,1),new.b,new.c) |
27840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
27860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
27880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 20 63 | T.INTO.record(x,y).....VALUES(.c |
278a0 | 6f 61 6c 65 73 63 65 28 31 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | oalesce(1,1),printf('%d,%d,%d',n |
278c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
278e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
27900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
27920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
27940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
27960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
27980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
279a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
279c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
279e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
27a00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
27a20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
27a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
27a60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
27a80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
27aa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
27ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
27ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
27b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
27b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
27b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
27b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
27b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
27ba0 | 64 3b 0a 88 59 81 25 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.%...7..CREATE.TABLE.t1(a.I |
27bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
27be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
27c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
27c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
27c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
27c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
27c80 | 20 64 61 74 65 74 69 6d 65 28 31 2c 20 2d 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | .datetime(1,.-1),new.b,new.c));. |
27ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
27cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
27ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
27d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
27d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
27d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
27d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
27d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
27da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
27dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
27de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
27e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
27e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
27e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
27e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
27e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
27ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
27ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
27ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
27f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
27f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
27f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
27f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
27f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
27fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
27fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
27fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
28000 | 0d 00 00 00 07 01 97 00 1b a3 17 46 12 f9 0e aa 0a 4d 05 fe 01 97 00 00 00 00 00 00 00 00 00 00 | ...........F.....M.............. |
28020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
280a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
280c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
280e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
28180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 63 81 32 04 00 91 4b 20 | ........................c.2...K. |
281a0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
281c0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
281e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
28200 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
28220 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
28240 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
28260 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 20 6c 74 72 69 6d | fore-insert',printf(.trim(.ltrim |
28280 | 28 31 2c 31 29 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | (1,1),1),new.a,new.b,new.c));... |
282a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
282c0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
282e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
28300 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
28320 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
28340 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
28360 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
28380 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
283a0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
283c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
283e0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
28400 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
28420 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
28440 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
28460 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
28480 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
284a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
284c0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
284e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(a,b).VALUES(1,2); |
28500 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
28520 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
28540 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
28560 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
28580 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
285a0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
285c0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
285e0 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b | .c<0;...SELECT.*.FROM.record;..K |
28600 | 81 31 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .1......CREATE.TABLE.t1(a.INTEGE |
28620 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
28640 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
28660 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
28680 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
286a0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
286c0 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 73 71 6c 69 | UES('before-insert',printf(.sqli |
286e0 | 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 29 29 3b 0a 20 20 45 4e 44 | te_compileoption_get(1)));...END |
28700 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
28720 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
28740 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
28760 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
28780 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
287a0 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
287c0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
287e0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
28800 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
28820 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
28840 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
28860 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
28880 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
288a0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
288c0 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
288e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
28900 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
28920 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 | ));...END;...INSERT.INTO.t1(c,b) |
28940 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
28960 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
28980 | 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | (1,2).ON.CONFLICT(a).DO.UPDATE.S |
289a0 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
289c0 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELETE.FROM.record;...INS |
289e0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
28a00 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
28a20 | 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | c+1.WHERE.c<0;...SELECT.*.FROM.r |
28a40 | 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 59 81 30 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 | ecord;VACUUM..Y.0...7..CREATE.TA |
28a60 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
28a80 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
28aa0 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
28ac0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
28ae0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
28b00 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
28b20 | 74 27 2c 70 72 69 6e 74 66 28 20 6c 69 6b 65 6c 79 28 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf(.likely(1),new.a,new.b |
28b40 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
28b60 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
28b80 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
28ba0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
28bc0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
28be0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
28c00 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
28c20 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
28c40 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
28c60 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
28c80 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
28ca0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
28cc0 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
28ce0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
28d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
28d20 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
28d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
28d60 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
28d80 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
28da0 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
28dc0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
28de0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
28e00 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
28e20 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
28e40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
28e60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
28e80 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
28ea0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 81 2f 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..K./......CREATE.TABLE |
28ec0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
28ee0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
28f00 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
28f20 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
28f40 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
28f60 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
28f80 | 70 72 69 6e 74 66 28 20 6c 65 6e 67 74 68 28 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf(.length(1),new.a,new.b,ne |
28fa0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
28fc0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
28fe0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
29000 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
29020 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
29040 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
29060 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
29080 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
290a0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
290c0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | d',...............old.a,old.b,ol |
290e0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
29100 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
29120 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
29140 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
29160 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
29180 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
291a0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
291c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
291e0 | 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(c,b).VALUES(1,2);...DELE |
29200 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
29220 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (a,b).VALUES(1,2).ON.CONFLICT(a) |
29240 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
29260 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
29280 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
292a0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
292c0 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
292e0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 49 81 2e 04 00 91 | ECT.*.FROM.record;VACUUM..I..... |
29300 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
29320 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
29340 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
29360 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
29380 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
293a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
293c0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 6a 73 6f 6e 5f 73 65 74 28 | before-insert',printf(.json_set( |
293e0 | 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | 1,1,1),new.b,new.c));...END;...C |
29400 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
29420 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
29440 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
29460 | 70 72 69 6e 74 66 28 20 6a 73 6f 6e 5f 73 65 74 28 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 | printf(.json_set(1,1,1),new.b,ne |
29480 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
294a0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
294c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
294e0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
29500 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
29520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
29540 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
29560 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
29580 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
295a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
295c0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
295e0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
29600 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
29620 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
29640 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
29660 | 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | EINSERT.INTO.t1(a,b).VALUES(1,2) |
29680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
296a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
296c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
296e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
29700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
29720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
29740 | 63 6f 72 64 3b 0a 88 59 81 2d 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.-...7..CREATE.TABLE.t1( |
29760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
29780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
297a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
297c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
297e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
29800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
29820 | 74 66 28 20 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf(.json_patch(1,1),new.b,new.c) |
29840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
29860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
29880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
298a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
298c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
298e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
29900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
29920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
29940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
29960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
29980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
299a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
299c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
299e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
29a00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
29a20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
29a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
29a60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
29a80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
29aa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
29ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
29ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
29b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
29b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
29b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
29b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
29b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
29ba0 | 64 3b 0a 88 59 81 2c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.,...7..CREATE.TABLE.t1(a.I |
29bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
29be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
29c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
29c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
29c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
29c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
29c80 | 20 64 61 74 65 74 69 6d 65 28 31 2e 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | .datetime(1.1,1),new.b,new.c));. |
29ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
29cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
29ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
29d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
29d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
29d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
29d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
29d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
29da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
29dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
29de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
29e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
29e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
29e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
29e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
29e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
29ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
29ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
29ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
29f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
29f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
29f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
29f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
29f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
29fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
29fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
29fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
2a000 | 0d 00 00 00 07 01 9a 00 1b a0 17 47 12 f8 0e a9 0a 50 05 f7 01 9a 00 00 00 00 00 00 00 00 00 00 | ...........G.....P.............. |
2a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 81 39 04 00 | ...........................Y.9.. |
2a1a0 | 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .7..CREATE.TABLE.t1(a.INTEGER.PR |
2a1c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
2a1e0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
2a200 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
2a220 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
2a240 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
2a260 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 | 'before-insert',printf(.trim(1,1 |
2a280 | 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ),new.a,new.b,new.c));...END;... |
2a2a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
2a2c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
2a2e0 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
2a300 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
2a320 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
2a340 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
2a360 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
2a380 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
2a3a0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
2a3c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
2a3e0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
2a400 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
2a420 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
2a440 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
2a460 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
2a480 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
2a4a0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
2a4c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
2a4e0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
2a500 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
2a520 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
2a540 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
2a560 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ELECT.*.FROM.record;...DELETE.FR |
2a580 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;..ANALYZE.INTO.t1(a,b) |
2a5a0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
2a5c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 | DO.UPDATE.SET.c=c+1.WHERE.c<0;.. |
2a5e0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 81 38 04 00 91 2f 20 | .SELECT.*.FROM.record;..U.8.../. |
2a600 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
2a620 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
2a640 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
2a660 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
2a680 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
2a6a0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
2a6c0 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e | fore-insert',printf(.trim(1,1),n |
2a6e0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
2a700 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
2a720 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
2a740 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
2a760 | 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf(.trim(1,1),new.a,new.b,new. |
2a780 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
2a7a0 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
2a7c0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
2a7e0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
2a800 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
2a820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
2a840 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
2a860 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
2a880 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
2a8a0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
2a8c0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
2a8e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
2a900 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
2a920 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
2a940 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
2a960 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
2a980 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | b).VALUES(1,2).ON.CONFLICT(a).DO |
2a9a0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
2a9c0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
2a9e0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
2aa00 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
2aa20 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
2aa40 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 81 37 04 00 91 2f 20 20 43 52 45 41 54 45 | .*.FROM.record;..U.7.../..CREATE |
2aa60 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
2aa80 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
2aaa0 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
2aac0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
2aae0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
2ab00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
2ab20 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf(.trim(1,1),new.a,ne |
2ab40 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
2ab60 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
2ab80 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
2aba0 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 | .VALUES('after-insert',printf(.g |
2abc0 | 6c 6f 62 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | lob(1,1),new.a,new.b,new.c));... |
2abe0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
2ac00 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
2ac20 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
2ac40 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
2ac60 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | d,%d,%d',...............old.a,ol |
2ac80 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
2aca0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
2acc0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
2ace0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
2ad00 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
2ad20 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
2ad40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
2ad60 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
2ad80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 | NSERT.INTO.t1(a,b).VALUES(2001-0 |
2ada0 | 31 2d 30 31 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | 1-011,2);...DELETE.FROM.record;. |
2adc0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
2ade0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ).ON.CONFLICT(a).DO.UPDATE.SET.c |
2ae00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
2ae20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
2ae40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
2ae60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
2ae80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
2aea0 | 64 3b 56 41 43 55 55 4d 0a 88 4b 81 36 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | d;VACUUM..K.6......CREATE.TABLE. |
2aec0 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
2aee0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
2af00 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
2af20 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
2af40 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
2af60 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
2af80 | 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf(.trim(1,1),new.a,new.b,new |
2afa0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
2afc0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
2afe0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
2b000 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 | ('after-insert',printf(.glob(1,1 |
2b020 | 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ),new.a,new.b,new.c));...END;... |
2b040 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
2b060 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
2b080 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
2b0a0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
2b0c0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | ',...............old.a,old.b,old |
2b0e0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
2b100 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
2b120 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
2b140 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
2b160 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
2b180 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
2b1a0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
2b1c0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
2b1e0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
2b200 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
2b220 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | a,b).VALUES(1,2).ON.CONFLICT(a). |
2b240 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
2b260 | 20 61 62 73 28 31 29 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .abs(1).record;...DELETE.FROM.re |
2b280 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
2b2a0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
2b2c0 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
2b2e0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 4b 81 35 04 00 91 1b | CT.*.FROM.record;VACUUM..K.5.... |
2b300 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
2b320 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
2b340 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
2b360 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
2b380 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
2b3a0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
2b3c0 | 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c | efore-insert',printf(.trim(1,1), |
2b3e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
2b400 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.INSERT.ON. |
2b420 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
2b440 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
2b460 | 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf(.glob(1,1),new.a,new.b,new |
2b480 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
2b4a0 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
2b4c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
2b4e0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
2b500 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
2b520 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
2b540 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
2b560 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
2b580 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
2b5a0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
2b5c0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
2b5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
2b600 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
2b620 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
2b640 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
2b660 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
2b680 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
2b6a0 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
2b6c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
2b6e0 | 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(c,b).VALUES(1,2).....ON.CO |
2b700 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
2b720 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
2b740 | 56 41 43 55 55 4d 0a 88 55 81 34 04 00 91 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | VACUUM..U.4.../..CREATE.TABLE.t1 |
2b760 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
2b780 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
2b7a0 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
2b7c0 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
2b7e0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
2b800 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
2b820 | 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 20 69 6e 73 74 72 28 31 2c 31 29 2c 6e 65 77 2e 63 | ntf(.trim(1,1),.instr(1,1),new.c |
2b840 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
2b860 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
2b880 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
2b8a0 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c | after-insert',printf(.glob(1,1), |
2b8c0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
2b8e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
2b900 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
2b920 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
2b940 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
2b960 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
2b980 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
2b9a0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
2b9c0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
2b9e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
2ba00 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
2ba20 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
2ba40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
2ba60 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
2ba80 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
2baa0 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
2bac0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f | NSERT.INTO.t1(a,b).VALUES(1,2).O |
2bae0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
2bb00 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
2bb20 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
2bb40 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
2bb60 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
2bb80 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
2bba0 | 88 5c 81 33 04 00 91 3d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .\.3...=..CREATE.TABLE.t1(a.INTE |
2bbc0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
2bbe0 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
2bc00 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
2bc20 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
2bc40 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
2bc60 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 | ALUES('before-insert',printf(.tr |
2bc80 | 69 6d 28 31 2c 20 2d 31 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | im(1,.-11),new.a,new.b,new.c));. |
2bca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
2bcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
2bce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
2bd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
2bd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
2bd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
2bd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
2bd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
2bda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
2bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
2bde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
2be00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
2be20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
2be40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
2be60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
2be80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
2bea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
2bec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
2bee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
2bf00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
2bf20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
2bf40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
2bf60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
2bf80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
2bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
2bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
2bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
2c000 | 0d 00 00 00 07 01 2a 00 1b ab 17 41 12 d0 0e 5f 09 f8 05 91 01 2a 00 00 00 00 00 00 00 00 00 00 | ......*....A..._.....*.......... |
2c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2c120 | 00 00 00 00 00 00 00 00 00 00 88 63 81 40 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | ...........c.@...K..CREATE.TABLE |
2c140 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
2c160 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
2c180 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
2c1a0 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
2c1c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
2c1e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
2c200 | 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 32 30 30 31 45 30 31 2d 30 31 2c 31 29 2c 6e 65 77 2e | printf(.trim(12001E01-01,1),new. |
2c220 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
2c240 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
2c260 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
2c280 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
2c2a0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
2c2c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
2c2e0 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
2c300 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
2c320 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
2c340 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
2c360 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
2c380 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
2c3a0 | 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r4.AFTER.UPDATE.ON.t1 |
2c3c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
2c3e0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 | y).........VALUES('after-update' |
2c400 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
2c420 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
2c440 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
2c460 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ,new.c));...END;...INSERT.INTO.t |
2c480 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | 1(a,b).VALUES(1,2);...DELETE.FRO |
2c4a0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
2c4c0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
2c4e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 | O.UPDATE.SET.c=t1.c+1;...SELECT. |
2c500 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | *.FROM.record;...DELETE.FROM.rec |
2c520 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
2c540 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
2c560 | 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 | ATE.SET.c=c+1.WHERE.c<0;...SELEC |
2c580 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 3f 04 00 91 4b 20 20 43 52 45 41 54 | T.*.FROM.record;..c.?...K..CREAT |
2c5a0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
2c5c0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
2c5e0 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
2c600 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
2c620 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
2c640 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
2c660 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 32 30 30 31 2d 30 31 2d 4e 55 4c | nsert',printf(.trim(12001-01-NUL |
2c680 | 4c 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | L),new.a,new.b,new.c));...END;.. |
2c6a0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
2c6c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
2c6e0 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
2c700 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
2c720 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
2c740 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
2c760 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
2c780 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
2c7a0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
2c7c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
2c7e0 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
2c800 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 | ...CREATE.TRIGGER.r4.AFTER.UPDAT |
2c820 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
2c840 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | cord(x,y).........VALUES('after- |
2c860 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
2c880 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
2c8a0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
2c8c0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 | a,new.b,new.c));...END;...INSERT |
2c8e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c | .INTO.t1(a,b).VALUES(1,2);...DEL |
2c900 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
2c920 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
2c940 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 | CT(a).DO.UPDATE.SET.c=t1.c+1;... |
2c960 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | SELECT.*.FROM.record;...DELETE.F |
2c980 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
2c9a0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
2c9c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
2c9e0 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 3e 04 00 91 4b | ..SELECT.*.FROM.record;..c.>...K |
2ca00 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
2ca20 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
2ca40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
2ca60 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
2ca80 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
2caa0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
2cac0 | 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 32 30 30 31 | efore-insert',printf(.trim(12001 |
2cae0 | 2d 30 31 2d 30 31 2c 39 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | -01-01,9),new.a,new.b,new.c));.. |
2cb00 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
2cb20 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
2cb40 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
2cb60 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
2cb80 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
2cba0 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
2cbc0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
2cbe0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
2cc00 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
2cc20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
2cc40 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
2cc60 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
2cc80 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
2cca0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
2ccc0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
2cce0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
2cd00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
2cd20 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
2cd40 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
2cd60 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
2cd80 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
2cda0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
2cdc0 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
2cde0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
2ce00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
2ce20 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
2ce40 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
2ce60 | 6d 81 3d 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | m.=..._..CREATE.TABLE.t1(a.INTEG |
2ce80 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
2cea0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
2cec0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
2cee0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
2cf00 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
2cf20 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 | LUES('before-insert',printf(.tri |
2cf40 | 6d 28 31 32 30 30 31 2d 30 31 2d 30 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 2c 6e 65 77 2e 61 | m(12001-01-01,2001-01-011),new.a |
2cf60 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
2cf80 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
2cfa0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
2cfc0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
2cfe0 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
2d000 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
2d020 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
2d040 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
2d060 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
2d080 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
2d0a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
2d0c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
2d0e0 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
2d100 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
2d120 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
2d140 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
2d160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
2d180 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
2d1a0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
2d1c0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
2d1e0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
2d200 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
2d220 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
2d240 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
2d260 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
2d280 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
2d2a0 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
2d2c0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 81 3c 04 00 91 5f 20 20 43 52 45 41 54 45 | .*.FROM.record;..m.<..._..CREATE |
2d2e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
2d300 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
2d320 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
2d340 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
2d360 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
2d380 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
2d3a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 32 30 30 31 2d 30 31 2d 30 31 2c 31 | sert',printf(.trim(12001-01-01,1 |
2d3c0 | 32 30 30 31 2d 30 31 2d 30 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | 2001-01-01),new.a,new.b,new.c)); |
2d3e0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
2d400 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
2d420 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
2d440 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
2d460 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
2d480 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
2d4a0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
2d4c0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
2d4e0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
2d500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
2d520 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
2d540 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
2d560 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
2d580 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
2d5a0 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
2d5c0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
2d5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
2d600 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
2d620 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
2d640 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
2d660 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
2d680 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
2d6a0 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
2d6c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
2d6e0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
2d700 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
2d720 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
2d740 | 0a 88 66 81 3b 04 00 91 51 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..f.;...Q..CREATE.TABLE.t1(a.INT |
2d760 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
2d780 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
2d7a0 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
2d7c0 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
2d7e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
2d800 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 | VALUES('before-insert',printf(.t |
2d820 | 72 69 6d 28 31 32 30 30 31 2d 30 31 2d 30 31 2c 20 2d 31 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rim(12001-01-01,.-11),new.a,new. |
2d840 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
2d860 | 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.INSERT.ON.t1.BEGIN.. |
2d880 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 | ...INSERT.INTO.record(x,y).....V |
2d8a0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-insert',printf('%d, |
2d8c0 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
2d8e0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 | D;...CREATE.TRIGGER.r3.BEFORE.UP |
2d900 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
2d920 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
2d940 | 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ore-update',printf('%d,%d,%d/%d, |
2d960 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
2d980 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
2d9a0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
2d9c0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
2d9e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
2da00 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
2da20 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
2da40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
2da60 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
2da80 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
2daa0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
2dac0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
2dae0 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
2db00 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | TE.SET.c=t1.c+1;...SELECT.*.FROM |
2db20 | 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | .record;...DELETE.FROM.record;.. |
2db40 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
2db60 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
2db80 | 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T.c=c+1.WHERE.c<0;...SELECT.*.FR |
2dba0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 81 3a 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c | OM.record;..Q.:...'..CREATE.TABL |
2dbc0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
2dbe0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
2dc00 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
2dc20 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
2dc40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
2dc60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
2dc80 | 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf(.trim(1,1),new.a,new.b,n |
2dca0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
2dcc0 | 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 | r2.AFTER.INSERT.ON.t1.BEGIN.INSE |
2dce0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
2dd00 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c | after-insert',printf(.glob(1,1), |
2dd20 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
2dd40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
2dd60 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
2dd80 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
2dda0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
2ddc0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
2dde0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
2de00 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
2de20 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
2de40 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
2de60 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
2de80 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
2dea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
2dec0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
2dee0 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
2df00 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
2df20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f | NSERT.INTO.t1(a,b).VALUES(1,2).O |
2df40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
2df60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
2df80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
2dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
2dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c;1.WHE |
2dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
2e000 | 0d 00 00 00 07 01 72 00 1b 99 17 4a 12 ed 0e 9e 0a 3a 05 d6 01 72 00 00 00 00 00 00 00 00 00 00 | ......r....J.....:...r.......... |
2e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
2e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 60 81 47 04 00 91 45 20 20 43 52 45 41 | ...................`.G...E..CREA |
2e180 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
2e1a0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
2e1c0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
2e1e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
2e200 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
2e220 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
2e240 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2d 36 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%.-6d,%d',new.a, |
2e260 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
2e280 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
2e2a0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
2e2c0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
2e2e0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
2e300 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
2e320 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
2e340 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
2e360 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
2e380 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
2e3a0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
2e3c0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
2e3e0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
2e400 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
2e420 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
2e440 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
2e460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
2e480 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
2e4a0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
2e4c0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
2e4e0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
2e500 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
2e520 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
2e540 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
2e560 | 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | d;EXPLAIN...INSERT.INTO.t1(a,b). |
2e580 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
2e5a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
2e5c0 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 81 46 04 00 91 45 20 20 | SELECT.*.FROM.record;..`.F...E.. |
2e5e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
2e600 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
2e620 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
2e640 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
2e660 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
2e680 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
2e6a0 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2d 34 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%.-4d,%d',ne |
2e6c0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
2e6e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
2e700 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
2e720 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
2e740 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
2e760 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
2e780 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
2e7a0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
2e7c0 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
2e7e0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
2e800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
2e820 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
2e840 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
2e860 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
2e880 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
2e8a0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
2e8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
2e8e0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
2e900 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
2e920 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
2e940 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
2e960 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
2e980 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
2e9a0 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
2e9c0 | 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ecord;EXPLAIN...INSERT.INTO.t1(a |
2e9e0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
2ea00 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
2ea20 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 81 45 04 00 | ;...SELECT.*.FROM.record;..`.E.. |
2ea40 | 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .E..CREATE.TABLE.t1(a.INTEGER.PR |
2ea60 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
2ea80 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
2eaa0 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
2eac0 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
2eae0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
2eb00 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2c 31 64 2c 25 64 | 'before-insert',printf('%.,1d,%d |
2eb20 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
2eb40 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
2eb60 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
2eb80 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
2eba0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
2ebc0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
2ebe0 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
2ec00 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
2ec20 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
2ec40 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
2ec60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
2ec80 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
2eca0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
2ecc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
2ece0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
2ed00 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
2ed20 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
2ed40 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
2ed60 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
2ed80 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
2eda0 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
2edc0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
2ede0 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
2ee00 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ELECT.*.FROM.record;...DELETE.FR |
2ee20 | 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | OM.record;EXPLAIN...INSERT.INTO. |
2ee40 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
2ee60 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
2ee80 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b | .c<0;...SELECT.*.FROM.record;..K |
2eea0 | 81 44 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .D......CREATE.TABLE.t1(a.INTEGE |
2eec0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
2eee0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
2ef00 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
2ef20 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
2ef40 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
2ef60 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 73 | UES('before-insert',printf('%.*s |
2ef80 | 2c 25 64 2c 25 64 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 20 45 | ,%d,%d',.sqlite_version()));...E |
2efa0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
2efc0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
2efe0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
2f000 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
2f020 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
2f040 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
2f060 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
2f080 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
2f0a0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
2f0c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
2f0e0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
2f100 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
2f120 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
2f140 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
2f160 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
2f180 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
2f1a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
2f1c0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
2f1e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
2f200 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
2f220 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
2f240 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
2f260 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b | 1;...SELECT.*.FROM..ecor.record; |
2f280 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
2f2a0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
2f2c0 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
2f2e0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 43 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..Y.C...7..CREATE.TA |
2f300 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
2f320 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
2f340 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
2f360 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
2f380 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
2f3a0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
2f3c0 | 74 27 2c 70 72 69 6e 74 66 28 20 74 79 70 65 6f 66 28 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf(.typeof(1),new.a,new.b |
2f3e0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
2f400 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
2f420 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
2f440 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
2f460 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
2f480 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
2f4a0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
2f4c0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
2f4e0 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
2f500 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
2f520 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
2f540 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
2f560 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
2f580 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
2f5a0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
2f5c0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
2f5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
2f600 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
2f620 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
2f640 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
2f660 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
2f680 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
2f6a0 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
2f6c0 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
2f6e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
2f700 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
2f720 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
2f740 | 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 81 42 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..K.B......CREATE.TABLE |
2f760 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
2f780 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
2f7a0 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
2f7c0 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
2f7e0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
2f800 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
2f820 | 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 3c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf(.trim(1<1),new.a,new.b,ne |
2f840 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
2f860 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
2f880 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
2f8a0 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c | S('after-insert',printf(.glob(1, |
2f8c0 | 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | 1),new.a,new.b,new.c));...END;.. |
2f8e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
2f900 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
2f920 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
2f940 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
2f960 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | d',...............old.a,old.b,ol |
2f980 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
2f9a0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
2f9c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
2f9e0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
2fa00 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
2fa20 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
2fa40 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
2fa60 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
2fa80 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
2faa0 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
2fac0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (a,b).VALUES(1,2).ON.CONFLICT(a) |
2fae0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
2fb00 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
2fb20 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
2fb40 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
2fb60 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
2fb80 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 63 81 41 04 00 91 | ECT.*.FROM.record;VACUUM..c.A... |
2fba0 | 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | K..CREATE.TABLE.t1(a.INTEGER.PRI |
2fbc0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
2fbe0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
2fc00 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
2fc20 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
2fc40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
2fc60 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 32 30 30 | before-insert',printf(.trim(1200 |
2fc80 | 45 2d 30 31 2d 30 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | E-01-01,1),new.a,new.b,new.c));. |
2fca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
2fcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
2fce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
2fd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
2fd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
2fd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
2fd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
2fd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
2fda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
2fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
2fde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
2fe00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
2fe20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
2fe40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
2fe60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
2fe80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
2fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
2fec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
2fee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
2ff00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
2ff20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
2ff40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
2ff60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
2ff80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
2ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
2ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
2ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
30000 | 0d 00 00 00 07 01 82 00 1b a3 17 56 12 f9 0e 9c 0a 3f 05 e2 01 82 00 00 00 00 00 00 00 00 00 00 | ...........V.....?.............. |
30020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
300a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
300c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
300e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
30180 | 00 00 88 5c 81 4e 04 00 91 3d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ...\.N...=..CREATE.TABLE.t1(a.IN |
301a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
301c0 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
301e0 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
30200 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
30220 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
30240 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
30260 | 25 64 2c 25 20 20 2d 31 38 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | %d,%..-18%d',new.a,new.b,new.c)) |
30280 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
302a0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
302c0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
302e0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
30300 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
30320 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
30340 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
30360 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
30380 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
303a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
303c0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
303e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
30400 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
30420 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
30440 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
30460 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
30480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
304a0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
304c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
304e0 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
30500 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
30520 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
30540 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
30560 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
30580 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
305a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
305c0 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
305e0 | 3b 0a 88 59 81 4d 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..Y.M...7..CREATE.TABLE.t1(a.IN |
30600 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
30620 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
30640 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
30660 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
30680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
306a0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
306c0 | 25 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %c.%d,%d',new.a,new.b,new.c));.. |
306e0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
30700 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
30720 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
30740 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%c.%d,%d',new.a |
30760 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
30780 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
307a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
307c0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
307e0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
30800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
30820 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
30840 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
30860 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
30880 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
308a0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
308c0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
308e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
30900 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
30920 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
30940 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
30960 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
30980 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
309a0 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
309c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
309e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
30a00 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
30a20 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
30a40 | 59 81 4c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | Y.L...7..CREATE.TABLE.t1(a.INTEG |
30a60 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
30a80 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
30aa0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
30ac0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
30ae0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
30b00 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 63 ac | LUES('before-insert',printf('%c. |
30b20 | 25 64 2c 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e | %d,%d',.julianday(1,1,1)));...EN |
30b40 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
30b60 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
30b80 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
30ba0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
30bc0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
30be0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
30c00 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
30c20 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
30c40 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
30c60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
30c80 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
30ca0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
30cc0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
30ce0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
30d00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
30d20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
30d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
30d60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
30d80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
30da0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
30dc0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
30de0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
30e00 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
30e20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
30e40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
30e60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
30e80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 4b | <0;...SELECT.*.FROM.record;..Y.K |
30ea0 | 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...7..CREATE.TABLE.t1(a.INTEGER. |
30ec0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
30ee0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
30f00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
30f20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
30f40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
30f60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 53 2c 25 64 2c | S('before-insert',printf('%S,%d, |
30f80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
30fa0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
30fc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
30fe0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
31000 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
31020 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
31040 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
31060 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
31080 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
310a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
310c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
310e0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
31100 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
31120 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
31140 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
31160 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
31180 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
311a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
311c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
311e0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
31200 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
31220 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
31240 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
31260 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
31280 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
312a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
312c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
312e0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 4a 04 00 91 | ...SELECT.*.FROM.record;..Y.J... |
31300 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
31320 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
31340 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
31360 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
31380 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
313a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
313c0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 53 2c 25 64 2c 25 64 27 | before-insert',printf('%S,%d,%d' |
313e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
31400 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
31420 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
31440 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
31460 | 70 72 69 6e 74 66 28 27 25 53 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%S,%d,%d',new.a,new.b,ne |
31480 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
314a0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
314c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
314e0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
31500 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
31520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
31540 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
31560 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
31580 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
315a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
315c0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
315e0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
31600 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
31620 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
31640 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
31660 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
31680 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
316a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
316c0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
316e0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
31700 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
31720 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
31740 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 49 04 00 91 17 20 20 | SELECT.*.FROM.record;..I.I...... |
31760 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
31780 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
317a0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
317c0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
317e0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
31800 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
31820 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 2c 64 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%,d%d,%d',ne |
31840 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
31860 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
31880 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
318a0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
318c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
318e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
31900 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
31920 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
31940 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
31960 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
31980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
319a0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
319c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
319e0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
31a00 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
31a20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
31a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
31a60 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
31a80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
31aa0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
31ac0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
31ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 63 | ).VALUES(1,2).....ON.CONFLICT(.c |
31b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
31b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
31b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
31b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
31b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
31ba0 | 64 3b 0a 88 59 81 48 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.H...7..CREATE.TABLE.t1(a.I |
31bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
31be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
31c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
31c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
31c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
31c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
31c80 | 27 25 25 59 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%%Y%.*%d',new.a,new.b,new.c));. |
31ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
31cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
31ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
31d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
31d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
31d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
31d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
31d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
31da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
31dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
31de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
31e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
31e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
31e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
31e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
31e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
31ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
31ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
31ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
31f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
31f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
31f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
31f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
31f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
31fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
31fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
31fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
32000 | 0d 00 00 00 07 01 52 00 1b 97 17 3a 12 dd 0e 80 0a 23 05 b2 01 52 00 00 00 00 00 00 00 00 00 00 | ......R....:.....#...R.......... |
32020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
320a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
320c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
320e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
32140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 5c 81 55 04 00 91 3d 20 20 43 52 45 41 | ...................\.U...=..CREA |
32160 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
32180 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
321a0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
321c0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
321e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
32200 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
32220 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%.*%d',new.a, |
32240 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
32260 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
32280 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
322a0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
322c0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
322e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
32300 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
32320 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
32340 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
32360 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
32380 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
323a0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
323c0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
323e0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
32400 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
32420 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
32440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
32460 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
32480 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
324a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 2d 31 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | a,b).VALUES(1,.-12);...DELETE.FR |
324c0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
324e0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
32500 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
32520 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
32540 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
32560 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
32580 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
325a0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 81 54 04 00 91 5f 20 20 43 52 45 41 | CT.*.FROM.record;..m.T..._..CREA |
325c0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
325e0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
32600 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
32620 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
32640 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
32660 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
32680 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%.*%d',new.a, |
326a0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
326c0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
326e0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
32700 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
32720 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
32740 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
32760 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
32780 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
327a0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 | 'before-update',printf('%d,%.*%d |
327c0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
327e0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
32800 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
32820 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
32840 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
32860 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
32880 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
328a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
328c0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
328e0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
32900 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 | a,b).VALUES(1,22001-01-01);...DE |
32920 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
32940 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
32960 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
32980 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
329a0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
329c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 | b).VALUES(1,22001-01-01).....ON. |
329e0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
32a00 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
32a20 | 64 3b 0a 88 59 81 53 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.S...7..CREATE.TABLE.t1(a.I |
32a40 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
32a60 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
32a80 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
32aa0 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
32ac0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
32ae0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
32b00 | 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%.*%d',new.a,new.b,new.c));. |
32b20 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
32b40 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
32b60 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
32b80 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%.*%d',new. |
32ba0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
32bc0 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
32be0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
32c00 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
32c20 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
32c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
32c60 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
32c80 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
32ca0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
32cc0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
32ce0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
32d00 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
32d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
32d40 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
32d60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
32d80 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
32da0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
32dc0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
32de0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
32e00 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
32e20 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
32e40 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
32e60 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
32e80 | 88 59 81 52 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .Y.R...7..CREATE.TABLE.t1(a.INTE |
32ea0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
32ec0 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
32ee0 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
32f00 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
32f20 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
32f40 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
32f60 | 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%.*%d',new.a,new.b,new.c));...E |
32f80 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
32fa0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
32fc0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
32fe0 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 6a 73 6f 6e 5f 73 65 74 28 31 2c 31 2c 31 29 2c 6e | nsert',printf(.json_set(1,1,1),n |
33000 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
33020 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
33040 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
33060 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
33080 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
330a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
330c0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
330e0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
33100 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
33120 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
33140 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
33160 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
33180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
331a0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
331c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
331e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
33200 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
33220 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
33240 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
33260 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
33280 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
332a0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
332c0 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 | c<0;...SELECT.*.FROM.record;..Y. |
332e0 | 51 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | Q...7..CREATE.TABLE.t1(a.INTEGER |
33300 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
33320 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
33340 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
33360 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
33380 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
333a0 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 | ES('before-insert',printf('%d,%. |
333c0 | 2a 25 64 27 2c 6e 65 77 2e 61 2c 2d 75 6e 69 63 6f 64 65 28 31 29 29 29 3b 0a 20 20 45 4e 44 3b | *%d',new.a,-unicode(1)));...END; |
333e0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
33400 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
33420 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
33440 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
33460 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
33480 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
334a0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
334c0 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
334e0 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
33500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
33520 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
33540 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
33560 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
33580 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
335a0 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
335c0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
335e0 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
33600 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
33620 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,c).VALUES(1,2);...D |
33640 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
33660 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
33680 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
336a0 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
336c0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
336e0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
33700 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
33720 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 50 04 00 | ;...SELECT.*.FROM.record;..Y.P.. |
33740 | 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .7..CREATE.TABLE.t1(a.INTEGER.PR |
33760 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
33780 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
337a0 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
337c0 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
337e0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
33800 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 | 'before-insert',printf('%d,%.*%d |
33820 | 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',.julianday(1,1,1)));...END;... |
33840 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
33860 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
33880 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
338a0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
338c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
338e0 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
33900 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
33920 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
33940 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
33960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
33980 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
339a0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
339c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
339e0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
33a00 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
33a20 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
33a40 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
33a60 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
33a80 | 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,c).VALUES(1,2);...DELE |
33aa0 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
33ac0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
33ae0 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
33b00 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ELECT.*.FROM.record;...DELETE.FR |
33b20 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
33b40 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
33b60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 | DO.UPDATE.SET.c=c+1.WHERE.c<0;.. |
33b80 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 65 81 4f 04 00 91 4f 20 | .SELECT.*.FROM.record;..e.O...O. |
33ba0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
33bc0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
33be0 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
33c00 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
33c20 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
33c40 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
33c60 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 59 25 64 27 | fore-insert',printf('%d,%.*%Y%d' |
33c80 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
33ca0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
33cc0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
33ce0 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
33d00 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
33d20 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
33d40 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
33d60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
33d80 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
33da0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
33dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
33de0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
33e00 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
33e20 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
33e40 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
33e60 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
33e80 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
33ea0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
33ec0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
33ee0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
33f00 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
33f20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
33f40 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
33f60 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
33f80 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
33fa0 | 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 35 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | VALUES(1,22001501-01).....ON.CON |
33fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
33fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
34000 | 0d 00 00 00 07 01 1c 00 1b 8c 17 2c 12 bb 0e 51 09 ea 05 83 01 1c 00 00 00 00 00 00 00 00 00 00 | ...........,...Q................ |
34020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
340a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
340c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
340e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
34100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 63 81 5c | .............................c.\ |
34120 | 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...K..CREATE.TABLE.t1(a.INTEGER. |
34140 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
34160 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
34180 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
341a0 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
341c0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
341e0 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a | S('before-insert',printf('%d,%.* |
34200 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
34220 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
34240 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
34260 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
34280 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
342a0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
342c0 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
342e0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
34300 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
34320 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
34340 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
34360 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
34380 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
343a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
343c0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
343e0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
34400 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
34420 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
34440 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
34460 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
34480 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
344a0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
344c0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
344e0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
34500 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
34520 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 00 20 20 20 4f 4e 20 | b).VALUES(1,22001-01-01).....ON. |
34540 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
34560 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
34580 | 64 3b 0a 88 63 81 5b 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..c.[...K..CREATE.TABLE.t1(a.I |
345a0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
345c0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
345e0 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
34600 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
34620 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
34640 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
34660 | 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%.*%d',new.a,new.b,new.c));. |
34680 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
346a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
346c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
346e0 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
34700 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
34720 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
34740 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
34760 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
34780 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
347a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
347c0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
347e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
34800 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
34820 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
34840 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
34860 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
34880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
348a0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
348c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
348e0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
34900 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
34920 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
34940 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
34960 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
34980 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 2f 2d 30 31 2d 30 31 29 0a | O.t1(a,b).VALUES(1,2200/-01-01). |
349a0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
349c0 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
349e0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 5a 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..c.Z...K..CREATE.TABLE |
34a00 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
34a20 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
34a40 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
34a60 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
34a80 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
34aa0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
34ac0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%.*%d',new.a,new.b,ne |
34ae0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
34b00 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
34b20 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
34b40 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
34b60 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
34b80 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
34ba0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
34bc0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
34be0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
34c00 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
34c20 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
34c40 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
34c60 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
34c80 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
34ca0 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
34cc0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
34ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
34d00 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
34d20 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
34d40 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
34d60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
34d80 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
34da0 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
34dc0 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELETE.FROM.record;...INS |
34de0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 2a 31 35 | ERT.INTO.t1(a,b).VALUES(1,220*15 |
34e00 | 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | 01-01).....ON.CONFLICT(a).DO.UPD |
34e20 | 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 | ATE.SET.c=c+1.WHERE.c<0;...SELEC |
34e40 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 66 81 59 04 00 91 51 20 20 43 52 45 41 54 | T.*.FROM.record;..f.Y...Q..CREAT |
34e60 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
34e80 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
34ea0 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
34ec0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
34ee0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
34f00 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
34f20 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%.*%d',new.a,n |
34f40 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
34f60 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
34f80 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
34fa0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
34fc0 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
34fe0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
35000 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
35020 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
35040 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
35060 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
35080 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
350a0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
350c0 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
350e0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
35100 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
35120 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
35140 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
35160 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
35180 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
351a0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
351c0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
351e0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
35200 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
35220 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
35240 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
35260 | 2c 32 32 20 2d 31 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,22.-1001-01-01).....ON.CONFLICT |
35280 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c | (a).DO.UPDATE.SET.c=c+1.WHERE.c< |
352a0 | 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 81 58 04 | 0;...SELECT.*.FROM.record;..m.X. |
352c0 | 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .._..CREATE.TABLE.t1(a.INTEGER.P |
352e0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
35300 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
35320 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
35340 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
35360 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
35380 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 | ('before-insert',printf('%d,%.*% |
353a0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
353c0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
353e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
35400 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
35420 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
35440 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
35460 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
35480 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
354a0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
354c0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
354e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
35500 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
35520 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 | ...CREATE.TRIGGER.r4.AFTER.UPDAT |
35540 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
35560 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | cord(x,y).........VALUES('after- |
35580 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
355a0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
355c0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
355e0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 | a,new.b,new.c));...END;...INSERT |
35600 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 32 30 30 31 2d 30 31 2d | .INTO.t1(a,b).VALUES(1,12001-01- |
35620 | 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | 01);...DELETE.FROM.record;...INS |
35640 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
35660 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
35680 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
356a0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
356c0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 | NTO.t1(a,b).VALUES(1,22001-01-01 |
356e0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
35700 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
35720 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5c 81 57 04 00 91 3d 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..\.W...=..CREATE.TAB |
35740 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
35760 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
35780 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
357a0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
357c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
357e0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
35800 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%.*%d',new.a,new.b, |
35820 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
35840 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
35860 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
35880 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
358a0 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
358c0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
358e0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
35900 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
35920 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
35940 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
35960 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
35980 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
359a0 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
359c0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
359e0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
35a00 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
35a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
35a40 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
35a60 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
35a80 | 41 4c 55 45 53 28 31 2c 20 2d 31 36 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ALUES(1,.-16);...DELETE.FROM.rec |
35aa0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
35ac0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
35ae0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
35b00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
35b20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
35b40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
35b60 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
35b80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 70 81 56 04 00 91 65 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..p.V...e..CREATE.TAB |
35ba0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
35bc0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
35be0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
35c00 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
35c20 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
35c40 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
35c60 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%.*%d',new.a,new.b, |
35c80 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
35ca0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
35cc0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
35ce0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
35d00 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
35d20 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
35d40 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
35d60 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
35d80 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
35da0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
35dc0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
35de0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
35e00 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
35e20 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
35e40 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
35e60 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
35e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
35ea0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
35ec0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
35ee0 | 41 4c 55 45 53 28 31 2c 20 2d 31 32 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 | ALUES(1,.-122001-01-01);...DELET |
35f00 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
35f20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
35f40 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
35f60 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
35f80 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
35fa0 | 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | VALUES(1,22001-01-01).....ON.CON |
35fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
35fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
36000 | 0d 00 00 00 07 00 f7 00 1b 99 17 32 12 c1 0e 50 09 df 05 68 00 f7 00 00 00 00 00 00 00 00 00 00 | ...........2...P...h............ |
36020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
36040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
36060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
36080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
360a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
360c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
360e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 6d 81 63 04 00 91 5f 20 | ........................m.c..._. |
36100 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
36120 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
36140 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
36160 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
36180 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
361a0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
361c0 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e | fore-insert',printf('%d,%.*%d',n |
361e0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
36200 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
36220 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
36240 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
36260 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
36280 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
362a0 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
362c0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
362e0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
36300 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
36320 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
36340 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
36360 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
36380 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
363a0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
363c0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
363e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
36400 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
36420 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
36440 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 36 30 31 29 3b | O.t1(a,b).VALUES(1,22001-01601); |
36460 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
36480 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
364a0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
364c0 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
364e0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
36500 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 | t1(a,b).VALUES(1,22001-01-01)... |
36520 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
36540 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
36560 | 72 65 63 6f 72 64 3b 0a 88 73 81 62 04 00 91 6b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;..s.b...k..CREATE.TABLE.t |
36580 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
365a0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
365c0 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
365e0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
36600 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
36620 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
36640 | 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%.*%d',new.a,new.b,new. |
36660 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | c));...END;...CREATE.TRIGGER.r2. |
36680 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
366a0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.record(x,y).....VALUES( |
366c0 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | 'after-insert',printf('%d,%d,%d' |
366e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
36700 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
36720 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
36740 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
36760 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
36780 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
367a0 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
367c0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
367e0 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
36800 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
36820 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
36840 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
36860 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
36880 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
368a0 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
368c0 | 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | S(1,22001-01-01);...DELETE.FROM. |
368e0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
36900 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
36920 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
36940 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
36960 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
36980 | 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 1,22001-01-01).....ON.CONFLICT(a |
369a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
369c0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 | ...SELECT.*.FROM.record;VACUUM.. |
369e0 | 6d 81 61 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | m.a..._..CREATE.TABLE.t1(a.INTEG |
36a00 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
36a20 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
36a40 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
36a60 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
36a80 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
36aa0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
36ac0 | 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %.*%d',new.a,new.b,new.c));...EN |
36ae0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
36b00 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
36b20 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
36b40 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
36b60 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
36b80 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
36ba0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
36bc0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
36be0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
36c00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
36c20 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
36c40 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
36c60 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
36c80 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
36ca0 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
36cc0 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
36ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
36d00 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
36d20 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 | SERT.INTO.t1(a,b).VALUES(1,22001 |
36d40 | 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | -01-01);...DELETE.FROM.record;.. |
36d60 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
36d80 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
36da0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
36dc0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
36de0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 32 30 30 31 2d 30 | RT.INTO.t1(a,b).VALUES(1,12001-0 |
36e00 | 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | 1-01).....ON.CONFLICT(a).DO.UPDA |
36e20 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
36e40 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 81 60 04 00 91 5f 20 20 43 52 45 41 54 45 | .*.FROM.record;..m.`..._..CREATE |
36e60 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
36e80 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
36ea0 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
36ec0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
36ee0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
36f00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
36f20 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%.*%d',new.a,ne |
36f40 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
36f60 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
36f80 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
36fa0 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
36fc0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
36fe0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
37000 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
37020 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
37040 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
37060 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
37080 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
370a0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
370c0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
370e0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
37100 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
37120 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
37140 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
37160 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
37180 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
371a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 30 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 | b).VALUES(1,20001-01-01);...DELE |
371c0 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
371e0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
37200 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
37220 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ELECT.*.FROM.record;...DELETE.FR |
37240 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
37260 | 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f | .VALUES(1,22001-01-01).....ON.CO |
37280 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
372a0 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
372c0 | 0a 88 6d 81 5f 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..m._..._..CREATE.TABLE.t1(a.INT |
372e0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
37300 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
37320 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
37340 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
37360 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
37380 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
373a0 | 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%.*%d',new.a,new.b,new.c));... |
373c0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
373e0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
37400 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
37420 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
37440 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
37460 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
37480 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
374a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
374c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
374e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
37500 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
37520 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
37540 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
37560 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
37580 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
375a0 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
375c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
375e0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
37600 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(a,b).VALUES(1,2); |
37620 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
37640 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
37660 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
37680 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
376a0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
376c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 32 30 30 31 2d 30 31 2d 30 31 30 30 31 | t1(a,b).VALUES(1,222001-01-01001 |
376e0 | 35 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | 501-01).....ON.CONFLICT(a).DO.UP |
37700 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
37720 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 5e 04 00 91 4b 20 20 43 52 45 41 | CT.*.FROM.record;..c.^...K..CREA |
37740 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
37760 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
37780 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
377a0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
377c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
377e0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
37800 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%.*%d',new.a, |
37820 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
37840 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
37860 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
37880 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
378a0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
378c0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
378e0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
37900 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
37920 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
37940 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
37960 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
37980 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
379a0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
379c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
379e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
37a00 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
37a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
37a40 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
37a60 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
37a80 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
37aa0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
37ac0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
37ae0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
37b00 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
37b20 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
37b40 | 31 2c 32 32 30 30 31 35 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 1,22001501-01).....ON.CONFLICT(a |
37b60 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
37b80 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 5d 04 00 91 | ...SELECT.*.FROM.record;..c.]... |
37ba0 | 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | K..CREATE.TABLE.t1(a.INTEGER.PRI |
37bc0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
37be0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
37c00 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
37c20 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
37c40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
37c60 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 | before-insert',printf('%d,%.*%d' |
37c80 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
37ca0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
37cc0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
37ce0 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
37d00 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
37d20 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
37d40 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
37d60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
37d80 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
37da0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
37dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
37de0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
37e00 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
37e20 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
37e40 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
37e60 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
37e80 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
37ea0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
37ec0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
37ee0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
37f00 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
37f20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
37f40 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
37f60 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
37f80 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
37fa0 | 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 35 30 2f 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | VALUES(1,2200150/-01).....ON.CON |
37fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
37fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
38000 | 0d 00 00 00 07 01 1b 00 1b 8f 17 1e 12 c1 0e 64 09 fd 05 8c 01 1b 00 00 00 00 00 00 00 00 00 00 | ...............d................ |
38020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
380a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
380c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
380e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
38100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 6d 81 6a 04 | ............................m.j. |
38120 | 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .._..CREATE.TABLE.t1(a.INTEGER.P |
38140 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
38160 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
38180 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
381a0 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
381c0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
381e0 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 | ('before-insert',printf('%d,%.*% |
38200 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
38220 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
38240 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
38260 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
38280 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
382a0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
382c0 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
382e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
38300 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
38320 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
38340 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
38360 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
38380 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 | ...CREATE.TRIGGER.r4.AFTER.UPDAT |
383a0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
383c0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | cord(x,y).........VALUES('after- |
383e0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
38400 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
38420 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
38440 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 | a,new.b,new.c));...END;...INSERT |
38460 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 39 32 30 30 31 2d 30 31 2d | .INTO.t1(a,b).VALUES(1,92001-01- |
38480 | 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | 01);...DELETE.FROM.record;...INS |
384a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
384c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
384e0 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
38500 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
38520 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 | NTO.t1(a,b).VALUES(1,22001-01-01 |
38540 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
38560 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
38580 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 81 69 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..m.i..._..CREATE.TAB |
385a0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
385c0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
385e0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
38600 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
38620 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
38640 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
38660 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%.*%d',new.a,new.b, |
38680 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
386a0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
386c0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
386e0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
38700 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
38720 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
38740 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
38760 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
38780 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
387a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
387c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
387e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
38800 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
38820 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
38840 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
38860 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
38880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
388a0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
388c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
388e0 | 41 4c 55 45 53 28 31 2c 36 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | ALUES(1,62001-01-01);...DELETE.F |
38900 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
38920 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
38940 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
38960 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
38980 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
389a0 | 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | UES(1,22001-01-01).....ON.CONFLI |
389c0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
389e0 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 | c<0;...SELECT.*.FROM.record;..c. |
38a00 | 68 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | h...K..CREATE.TABLE.t1(a.INTEGER |
38a20 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
38a40 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
38a60 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
38a80 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
38aa0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
38ac0 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 | ES('before-insert',printf('%d,%. |
38ae0 | 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | *%d',new.a,new.b,new.c));...END; |
38b00 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
38b20 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
38b40 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
38b60 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
38b80 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
38ba0 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
38bc0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
38be0 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
38c00 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
38c20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
38c40 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
38c60 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
38c80 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
38ca0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
38cc0 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
38ce0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
38d00 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
38d20 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
38d40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 36 32 30 30 31 2d 30 | RT.INTO.t1(a,b).VALUES(1,62001-0 |
38d60 | 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | 1-01);...DELETE.FROM.record;...I |
38d80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
38da0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
38dc0 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
38de0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
38e00 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
38e20 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
38e40 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
38e60 | 72 64 3b 0a 88 59 81 67 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..Y.g...7..CREATE.TABLE.t1(a. |
38e80 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
38ea0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
38ec0 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
38ee0 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
38f00 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
38f20 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
38f40 | 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%.*%d',new.a,new.b,new.c)); |
38f60 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
38f80 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
38fa0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
38fc0 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
38fe0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
39000 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
39020 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
39040 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
39060 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
39080 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
390a0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
390c0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
390e0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
39100 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
39120 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
39140 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
39160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
39180 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
391a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
391c0 | 36 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 6);...DELETE.FROM.record;...INSE |
391e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 36 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,6)..... |
39200 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
39220 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
39240 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
39260 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
39280 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
392a0 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
392c0 | 0a 88 59 81 66 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..Y.f...7..CREATE.TABLE.t1(a.INT |
392e0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
39300 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
39320 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
39340 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
39360 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
39380 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
393a0 | 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%.*%d',new.a,new.b,new.c));... |
393c0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
393e0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
39400 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
39420 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
39440 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
39460 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
39480 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
394a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
394c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
394e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
39500 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
39520 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
39540 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
39560 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
39580 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
395a0 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
395c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
395e0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
39600 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 36 29 3b | INSERT.INTO.t1(a,b).VALUES(1,6); |
39620 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
39640 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
39660 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
39680 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
396a0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
396c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
396e0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
39700 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d | .c<0;...SELECT.*.FROM.record;..m |
39720 | 81 65 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .e..._..CREATE.TABLE.t1(a.INTEGE |
39740 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
39760 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
39780 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
397a0 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
397c0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
397e0 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
39800 | 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | .*%d',new.a,new.b,new.c));...END |
39820 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
39840 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
39860 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
39880 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
398a0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
398c0 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
398e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
39900 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
39920 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
39940 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
39960 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
39980 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
399a0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
399c0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
399e0 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
39a00 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
39a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
39a40 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 | ew.a,new.b,new.c));...END;...INS |
39a60 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 35 32 30 30 31 2d | ERT.INTO.t1(a,b).VALUES(1,52001- |
39a80 | 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | 01-01);...DELETE.FROM.record;... |
39aa0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
39ac0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
39ae0 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
39b00 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
39b20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 | T.INTO.t1(a,b).VALUES(1,22001-01 |
39b40 | 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | -01).....ON.CONFLICT(a).DO.UPDAT |
39b60 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
39b80 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 81 64 04 00 91 5f 20 20 43 52 45 41 54 45 20 | *.FROM.record;..m.d..._..CREATE. |
39ba0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
39bc0 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
39be0 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
39c00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
39c20 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
39c40 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
39c60 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%.*%d',new.a,new |
39c80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
39ca0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
39cc0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
39ce0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
39d00 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
39d20 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
39d40 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
39d60 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
39d80 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
39da0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
39dc0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
39de0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
39e00 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
39e20 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
39e40 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
39e60 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
39e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
39ea0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
39ec0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
39ee0 | 29 20 56 41 4c 55 45 53 28 31 2c 34 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 | ).VALUES(1,42001-01-01);...DELET |
39f00 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
39f20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
39f40 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
39f60 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
39f80 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
39fa0 | 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | VALUES(1,22001-01-01).....ON.CON |
39fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
39fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
3a000 | 0d 00 00 00 07 01 34 00 1b a3 17 46 12 e4 0e 7d 0a 16 05 a5 01 34 00 00 00 00 00 00 00 00 00 00 | ......4....F...}.....4.......... |
3a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 6d 81 71 04 00 91 5f 20 20 43 52 | .....................m.q..._..CR |
3a140 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
3a160 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
3a180 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
3a1a0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
3a1c0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
3a1e0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
3a200 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 65 64 27 2c 6e 65 77 2e | e-insert',printf('%d,%.*ed',new. |
3a220 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
3a240 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
3a260 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
3a280 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
3a2a0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
3a2c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
3a2e0 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
3a300 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
3a320 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
3a340 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
3a360 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
3a380 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
3a3a0 | 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r4.AFTER.UPDATE.ON.t1 |
3a3c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
3a3e0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 | y).........VALUES('after-update' |
3a400 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
3a420 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
3a440 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
3a460 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ,new.c));...END;...INSERT.INTO.t |
3a480 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 30 30 31 2d 30 31 2d 30 31 32 29 3b 0a 20 20 | 1(a,b).VALUES(1,2001-01-012);... |
3a4a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
3a4c0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
3a4e0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b | FLICT(a).DO.UPDATE.SET.c=t1.c+1; |
3a500 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 | ...SELECT.*.FROM.record;...DELET |
3a520 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
3a540 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f | a,b).VALUES(1,22001-01-01).....O |
3a560 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
3a580 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
3a5a0 | 6f 72 64 3b 0a 88 6d 81 70 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..m.p..._..CREATE.TABLE.t1(a |
3a5c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
3a5e0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
3a600 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
3a620 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
3a640 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
3a660 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
3a680 | 66 28 27 25 64 2c 25 20 2a 65 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%.*ed',new.a,new.b,new.c)) |
3a6a0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
3a6c0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
3a6e0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
3a700 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
3a720 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
3a740 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
3a760 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
3a780 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
3a7a0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
3a7c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
3a7e0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
3a800 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
3a820 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
3a840 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
3a860 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
3a880 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
3a8a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
3a8c0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
3a8e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
3a900 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
3a920 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
3a940 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
3a960 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
3a980 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
3a9a0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 32 30 30 31 2d 30 | NTO.t1(a,b).VALUES(1,220012001-0 |
3a9c0 | 31 2d 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | 1-01-01-01).....ON.CONFLICT(a).D |
3a9e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
3aa00 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 6f 04 00 91 4b 20 20 | SELECT.*.FROM.record;..c.o...K.. |
3aa20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
3aa40 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
3aa60 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
3aa80 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
3aaa0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
3aac0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
3aae0 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 65 64 27 2c 6e 65 | ore-insert',printf('%d,%.*ed',ne |
3ab00 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
3ab20 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
3ab40 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
3ab60 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
3ab80 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
3aba0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
3abc0 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
3abe0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
3ac00 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
3ac20 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
3ac40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
3ac60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
3ac80 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
3aca0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
3acc0 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
3ace0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
3ad00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
3ad20 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
3ad40 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
3ad60 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
3ad80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
3ada0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
3adc0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
3ade0 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
3ae00 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
3ae20 | 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | UES(1,22001-01-01).....ON.CONFLI |
3ae40 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
3ae60 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 | c<0;...SELECT.*.FROM.record;..c. |
3ae80 | 6e 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | n...K..CREATE.TABLE.t1(a.INTEGER |
3aea0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
3aec0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
3aee0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
3af00 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
3af20 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
3af40 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 | ES('before-insert',printf('%d,%. |
3af60 | 2a 63 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | *cd',new.a,new.b,new.c));...END; |
3af80 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
3afa0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
3afc0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
3afe0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
3b000 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
3b020 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
3b040 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
3b060 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
3b080 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
3b0a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
3b0c0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
3b0e0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
3b100 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
3b120 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
3b140 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
3b160 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
3b180 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
3b1a0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
3b1c0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
3b1e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
3b200 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
3b220 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
3b240 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
3b260 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
3b280 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e | ,b).VALUES(1,22001-01-01).....ON |
3b2a0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
3b2c0 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
3b2e0 | 72 64 3b 0a 88 5e 81 6d 04 00 91 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..^.m...A..CREATE.TABLE.t1(a. |
3b300 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
3b320 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
3b340 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
3b360 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
3b380 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
3b3a0 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
3b3c0 | 28 27 25 64 2c 25 20 2a 51 55 45 52 59 25 64 27 2c 6e 65 77 2e 61 2c 20 75 6e 69 63 6f 64 65 28 | ('%d,%.*QUERY%d',new.a,.unicode( |
3b3e0 | 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | 1)));...END;...CREATE.TRIGGER.r2 |
3b400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
3b420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
3b440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
3b460 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
3b480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
3b4a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
3b4c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
3b4e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
3b500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
3b520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
3b540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
3b560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
3b580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
3b5a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
3b5c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
3b5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
3b600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
3b620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,c).VALU |
3b640 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
3b660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
3b680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
3b6a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
3b6c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
3b6e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
3b700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
3b720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
3b740 | 63 6f 72 64 3b 0a 88 59 81 6c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.l...7..CREATE.TABLE.t1( |
3b760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
3b780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
3b7a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
3b7c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
3b7e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
3b800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
3b820 | 74 66 28 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2f 6e 65 77 2e 63 29 | tf('%d,%.*%d',new.a,new.b/new.c) |
3b840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
3b860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
3b880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
3b8a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
3b8c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
3b8e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
3b900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
3b920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
3b940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
3b960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
3b980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
3b9a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
3b9c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
3b9e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
3ba00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
3ba20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
3ba40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
3ba60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
3ba80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
3baa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
3bac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
3bae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
3bb00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
3bb20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
3bb40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
3bb60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
3bb80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
3bba0 | 64 3b 0a 88 59 81 6b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.k...7..CREATE.TABLE.t1(a.I |
3bbc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
3bbe0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
3bc00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
3bc20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
3bc40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
3bc60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
3bc80 | 27 25 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%.*%d',new.a,new.b,new.c));. |
3bca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
3bcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
3bce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
3bd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
3bd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
3bd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
3bd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
3bd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
3bda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
3bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
3bde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
3be00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
3be20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
3be40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
3be60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
3be80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
3bea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
3bec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
3bee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,c).VALUES(1,2 |
3bf00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
3bf20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,c).VALUES(1,2).....O |
3bf40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
3bf60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
3bf80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
3bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
3bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
3bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
3c000 | 0d 00 00 00 07 01 67 00 1b 99 17 4c 12 ef 0e 92 0a 21 05 c4 01 67 00 00 00 00 00 00 00 00 00 00 | ......g....L.....!...g.......... |
3c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3c160 | 00 00 00 00 00 00 00 88 59 81 78 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ........Y.x...7..CREATE.TABLE.t1 |
3c180 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
3c1a0 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
3c1c0 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
3c1e0 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
3c200 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
3c220 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
3c240 | 6e 74 66 28 27 25 64 2c 25 2d 33 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%-3%d',new.a,new.b,new.c |
3c260 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
3c280 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
3c2a0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
3c2c0 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
3c2e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
3c300 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
3c320 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
3c340 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
3c360 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
3c380 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
3c3a0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
3c3c0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
3c3e0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
3c400 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
3c420 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
3c440 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
3c460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
3c480 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
3c4a0 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
3c4c0 | 28 31 2c 36 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,6);...DELETE.FROM.record;...I |
3c4e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
3c500 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
3c520 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
3c540 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
3c560 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
3c580 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
3c5a0 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
3c5c0 | 72 64 3b 0a 88 59 81 77 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..Y.w...7..CREATE.TABLE.t1(a. |
3c5e0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
3c600 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
3c620 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
3c640 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
3c660 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
3c680 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
3c6a0 | 28 27 25 64 2c 25 2d 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%-*%d',new.a,new.b,new.c)); |
3c6c0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
3c6e0 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
3c700 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
3c720 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
3c740 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
3c760 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
3c780 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
3c7a0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
3c7c0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
3c7e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
3c800 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
3c820 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
3c840 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
3c860 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
3c880 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
3c8a0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
3c8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
3c8e0 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
3c900 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,c).VALUES(1, |
3c920 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
3c940 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
3c960 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
3c980 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
3c9a0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
3c9c0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
3c9e0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
3ca00 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
3ca20 | 0a 88 6d 81 76 04 00 91 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..m.v..._..CREATE.TABLE.t1(a.INT |
3ca40 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
3ca60 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
3ca80 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
3caa0 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
3cac0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
3cae0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
3cb00 | 64 2c 25 2d 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%-*%d',new.a,new.b,new.c));... |
3cb20 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
3cb40 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
3cb60 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
3cb80 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
3cba0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
3cbc0 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
3cbe0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
3cc00 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
3cc20 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
3cc40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
3cc60 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
3cc80 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
3cca0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
3ccc0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
3cce0 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
3cd00 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
3cd20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
3cd40 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
3cd60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 | INSERT.INTO.t1(a,b).VALUES(1,220 |
3cd80 | 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | 01-01-01);...DELETE.FROM.record; |
3cda0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
3cdc0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
3cde0 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
3ce00 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
3ce20 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 | SERT.INTO.t1(a,b).VALUES(1,22001 |
3ce40 | 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | -01-01).....ON.CONFLICT(a).DO.UP |
3ce60 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
3ce80 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 75 04 00 91 37 20 20 43 52 45 41 | CT.*.FROM.record;..Y.u...7..CREA |
3cea0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
3cec0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
3cee0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
3cf00 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
3cf20 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
3cf40 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
3cf60 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 38 35 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%.85d',new.a, |
3cf80 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
3cfa0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
3cfc0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
3cfe0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
3d000 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
3d020 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
3d040 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
3d060 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
3d080 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
3d0a0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
3d0c0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
3d0e0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
3d100 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
3d120 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
3d140 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
3d160 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
3d180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
3d1a0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
3d1c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
3d1e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
3d200 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
3d220 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
3d240 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
3d260 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
3d280 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
3d2a0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
3d2c0 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
3d2e0 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 81 74 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y.t...7..CREATE. |
3d300 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
3d320 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
3d340 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
3d360 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
3d380 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
3d3a0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
3d3c0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 38 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%.8%d',new.a,new |
3d3e0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
3d400 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
3d420 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
3d440 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
3d460 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
3d480 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
3d4a0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
3d4c0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
3d4e0 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
3d500 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
3d520 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
3d540 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
3d560 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
3d580 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
3d5a0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
3d5c0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
3d5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
3d600 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
3d620 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
3d640 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
3d660 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
3d680 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
3d6a0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
3d6c0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
3d6e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
3d700 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
3d720 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
3d740 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 73 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..I.s......CREATE.TAB |
3d760 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
3d780 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
3d7a0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
3d7c0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
3d7e0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
3d800 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
3d820 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 38 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%.8%d',new.a,new.b, |
3d840 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
3d860 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
3d880 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
3d8a0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
3d8c0 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
3d8e0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
3d900 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
3d920 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
3d940 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
3d960 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
3d980 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
3d9a0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
3d9c0 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
3d9e0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
3da00 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
3da20 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
3da40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
3da60 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
3da80 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
3daa0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
3dac0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
3dae0 | 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ,2).....ON.CONFLICT(.c=t1.c+1;.. |
3db00 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
3db20 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
3db40 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
3db60 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
3db80 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 72 04 00 91 | ...SELECT.*.FROM.record;..c.r... |
3dba0 | 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | K..CREATE.TABLE.t1(a.INTEGER.PRI |
3dbc0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
3dbe0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
3dc00 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
3dc20 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
3dc40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
3dc60 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2e 65 64 27 | before-insert',printf('%d,%..ed' |
3dc80 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
3dca0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
3dcc0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
3dce0 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
3dd00 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
3dd20 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
3dd40 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
3dd60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
3dd80 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
3dda0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
3ddc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
3dde0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
3de00 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
3de20 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
3de40 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
3de60 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
3de80 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
3dea0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
3dec0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
3dee0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
3df00 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
3df20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
3df40 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
3df60 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
3df80 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
3dfa0 | 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | VALUES(1,22001-01-01).....ON.CON |
3dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
3dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
3e000 | 0d 00 00 00 07 01 71 00 1b a3 17 46 12 e9 0e 9c 0a 3f 05 d8 01 71 00 00 00 00 00 00 00 00 00 00 | ......q....F.....?...q.......... |
3e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
3e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 63 81 7f 04 00 91 4b 20 20 43 52 45 41 54 | ..................c.....K..CREAT |
3e180 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
3e1a0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
3e1c0 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
3e1e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
3e200 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
3e220 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
3e240 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 30 2a 65 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%0*ed',new.a,n |
3e260 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
3e280 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
3e2a0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
3e2c0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
3e2e0 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
3e300 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
3e320 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
3e340 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
3e360 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
3e380 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
3e3a0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
3e3c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
3e3e0 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
3e400 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
3e420 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
3e440 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
3e460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
3e480 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
3e4a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
3e4c0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
3e4e0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
3e500 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
3e520 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
3e540 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
3e560 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
3e580 | 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,22001-01-01).....ON.CONFLICT(a) |
3e5a0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
3e5c0 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 81 7e 04 00 91 4b | ..SELECT.*.FROM.record;..c.~...K |
3e5e0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
3e600 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
3e620 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
3e640 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
3e660 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
3e680 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
3e6a0 | 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2e 2a 65 64 27 2c | efore-insert',printf('%d,%.*ed', |
3e6c0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
3e6e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.INSERT.ON. |
3e700 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
3e720 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
3e740 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
3e760 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
3e780 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
3e7a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
3e7c0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
3e7e0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
3e800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
3e820 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
3e840 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
3e860 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
3e880 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
3e8a0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
3e8c0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
3e8e0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
3e900 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
3e920 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
3e940 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
3e960 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
3e980 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
3e9a0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
3e9c0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
3e9e0 | 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ALUES(1,22001-01-01).....ON.CONF |
3ea00 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
3ea20 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
3ea40 | 59 81 7d 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | Y.}...7..CREATE.TABLE.t1(a.INTEG |
3ea60 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
3ea80 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
3eaa0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
3eac0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
3eae0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
3eb00 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
3eb20 | 25 2d 38 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %-8%d',new.a,new.b,new.c));...EN |
3eb40 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
3eb60 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
3eb80 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
3eba0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
3ebc0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
3ebe0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
3ec00 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
3ec20 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
3ec40 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
3ec60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
3ec80 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
3eca0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
3ecc0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
3ece0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
3ed00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
3ed20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
3ed40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
3ed60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
3ed80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
3eda0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
3edc0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
3ede0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
3ee00 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
3ee20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
3ee40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
3ee60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
3ee80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 81 7c | <0;...SELECT.*.FROM.record;..I.| |
3eea0 | 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t1(a.INTEGER. |
3eec0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
3eee0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
3ef00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
3ef20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
3ef40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
3ef60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2d 38 | S('before-insert',printf('%d,%-8 |
3ef80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
3efa0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
3efc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
3efe0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
3f000 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
3f020 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
3f040 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
3f060 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
3f080 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
3f0a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
3f0c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
3f0e0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
3f100 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
3f120 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
3f140 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
3f160 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
3f180 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
3f1a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
3f1c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
3f1e0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
3f200 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
3f220 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
3f240 | 49 43 54 28 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | ICT(.c=t1.c+1;...SELECT.*.FROM.r |
3f260 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
3f280 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
3f2a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
3f2c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
3f2e0 | 20 72 65 63 6f 72 64 3b 0a 88 59 81 7b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.{...7..CREATE.TABLE. |
3f300 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
3f320 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
3f340 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
3f360 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
3f380 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
3f3a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
3f3c0 | 72 69 6e 74 66 28 27 25 64 2c 25 2d 36 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%-6%d',new.a,new.b,new |
3f3e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
3f400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
3f420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
3f440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
3f460 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
3f480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
3f4a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
3f4c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
3f4e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
3f500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
3f520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
3f540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
3f560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
3f580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
3f5a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
3f5c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
3f5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
3f600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
3f620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
3f640 | 45 53 28 31 2c 36 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,6);...DELETE.FROM.record;.. |
3f660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
3f680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
3f6a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
3f6c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
3f6e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
3f700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
3f720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
3f740 | 63 6f 72 64 3b 0a 88 59 81 7a 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.z...7..CREATE.TABLE.t1( |
3f760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
3f780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
3f7a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
3f7c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
3f7e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
3f800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
3f820 | 74 66 28 27 25 64 2c 25 2d 35 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%-5%d',new.a,new.b,new.c) |
3f840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
3f860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
3f880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
3f8a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
3f8c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
3f8e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
3f900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
3f920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
3f940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
3f960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
3f980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
3f9a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
3f9c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
3f9e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
3fa00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
3fa20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
3fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
3fa60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
3fa80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
3faa0 | 31 2c 36 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,6);...DELETE.FROM.record;...IN |
3fac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
3fae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
3fb00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
3fb20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
3fb40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
3fb60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
3fb80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
3fba0 | 64 3b 0a 88 59 81 79 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.y...7..CREATE.TABLE.t1(a.I |
3fbc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
3fbe0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
3fc00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
3fc20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
3fc40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
3fc60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
3fc80 | 27 25 64 2c 25 2d 34 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%-4%d',new.a,new.b,new.c));. |
3fca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
3fcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
3fce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
3fd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
3fd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
3fd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
3fd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
3fd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
3fda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
3fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
3fde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
3fe00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
3fe20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
3fe40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
3fe60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
3fe80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
3fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
3fec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
3fee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 36 | ..INSERT.INTO.t1(a,b).VALUES(1,6 |
3ff00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
3ff20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
3ff40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
3ff60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
3ff80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
3ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
3ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
3ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
40000 | 0d 00 00 00 07 01 6e 00 1b a3 17 46 12 e2 0e 85 0a 28 05 cb 01 6e 00 00 00 00 00 00 00 00 00 00 | ......n....F.....(...n.......... |
40020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
400a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
400c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
400e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
40160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 82 06 04 00 91 37 20 20 43 52 45 41 54 45 20 54 | ...............Y.....7..CREATE.T |
40180 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
401a0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 | .int,.c.DEFAULT.0);...CREATE.TAB |
401c0 | 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | LE.record(x.TEXT,.y.TEXT);...CRE |
401e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
40200 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
40220 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
40240 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 72 74 72 69 6d 28 31 2c 31 | rt',printf('%d,%d,%d',.rtrim(1,1 |
40260 | 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | ),new.c));...END;...CREATE.TRIGG |
40280 | 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.INSERT.ON.t1.BEGIN.. |
402a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 | ...INSERT.INTO.record(x,y).....V |
402c0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-insert',printf('%d, |
402e0 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
40300 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 | D;...CREATE.TRIGGER.r3.BEFORE.UP |
40320 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
40340 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
40360 | 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ore-update',printf('%d,%d,%d/%d, |
40380 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
403a0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
403c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
403e0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
40400 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
40420 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
40440 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
40460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
40480 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
404a0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
404c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
404e0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
40500 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
40520 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | TE.SET.c=t1.c+1;...SELECT.*.FROM |
40540 | 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | .record;...DELETE.FROM.record;.. |
40560 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
40580 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
405a0 | 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T.c=c+1.WHERE.c<0;...SELECT.*.FR |
405c0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 05 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c | OM.record;..Y.....7..CREATE.TABL |
405e0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
40600 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
40620 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
40640 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
40660 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
40680 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
406a0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e | ,printf('%d,%d,%d',.round(1,1),n |
406c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
406e0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
40700 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
40720 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
40740 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
40760 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
40780 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
407a0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
407c0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
407e0 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
40800 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
40820 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
40840 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
40860 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
40880 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
408a0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
408c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
408e0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
40900 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
40920 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
40940 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
40960 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
40980 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
409a0 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
409c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
409e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
40a00 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
40a20 | 72 65 63 6f 72 64 3b 0a 88 59 82 04 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;..Y.....7..CREATE.TABLE.t |
40a40 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
40a60 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
40a80 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
40aa0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
40ac0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
40ae0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
40b00 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 | intf('%d,%d,%d',.julianday(1,1,1 |
40b20 | 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | )));...END;...CREATE.TRIGGER.r2. |
40b40 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
40b60 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.record(x,y).....VALUES( |
40b80 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | 'after-insert',printf('%d,%d,%d' |
40ba0 | 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,.sqlite_version()));...END;...C |
40bc0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
40be0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
40c00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
40c20 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
40c40 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
40c60 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
40c80 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
40ca0 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
40cc0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
40ce0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
40d00 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
40d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
40d40 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
40d60 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
40d80 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
40da0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
40dc0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
40de0 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
40e00 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
40e20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
40e40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
40e60 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
40e80 | 6f 72 64 3b 0a 88 59 82 03 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..Y.....7..CREATE.TABLE.t1(a |
40ea0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
40ec0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
40ee0 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
40f00 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
40f20 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
40f40 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
40f60 | 66 28 27 25 64 2c 25 64 2c 25 20 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%.',new.a,new.b,new.c)) |
40f80 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
40fa0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
40fc0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
40fe0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
41000 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
41020 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
41040 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
41060 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
41080 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
410a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
410c0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
410e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
41100 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
41120 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
41140 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
41160 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
41180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
411a0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
411c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(c,b).VALUES(1 |
411e0 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
41200 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
41220 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
41240 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
41260 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
41280 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
412a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
412c0 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
412e0 | 3b 0a 88 60 82 02 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..`.....E..CREATE.TABLE.t1(a.IN |
41300 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
41320 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
41340 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
41360 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
41380 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
413a0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
413c0 | 25 64 2c 25 64 2c 25 20 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%.',new.a,new.b,new.c));.. |
413e0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
41400 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
41420 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
41440 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
41460 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
41480 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
414a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
414c0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
414e0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
41500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
41520 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
41540 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
41560 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
41580 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
415a0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
415c0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
415e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
41600 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
41620 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
41640 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 | ;...DELETE.FROM.record;EXPLAIN.. |
41660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
41680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
416a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
416c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
416e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
41700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
41720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
41740 | 63 6f 72 64 3b 0a 88 59 82 01 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.....7..CREATE.TABLE.t1( |
41760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
41780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
417a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
417c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
417e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
41800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
41820 | 74 66 28 27 25 64 2c 25 58 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%X*%d',new.a,new.b,new.c) |
41840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
41860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
41880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
418a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
418c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
418e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
41900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
41920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
41940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
41960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
41980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
419a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
419c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
419e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
41a00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
41a20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
41a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
41a60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
41a80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,c).VALUES( |
41aa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
41ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
41ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
41b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
41b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
41b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
41b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
41b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
41ba0 | 64 3b 0a 88 59 82 00 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.....7..CREATE.TABLE.t1(a.I |
41bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
41be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
41c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
41c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
41c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
41c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
41c80 | 27 25 64 2c 25 31 38 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%18%d',new.a,new.b,new.c));. |
41ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
41cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
41ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
41d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
41d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
41d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
41d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
41d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
41da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
41dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
41de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
41e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
41e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
41e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
41e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
41e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
41ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
41ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
41ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
41f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
41f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
41f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
41f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
41f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
41fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
41fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
41fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
42000 | 0d 00 00 00 07 01 c3 00 1b c1 17 74 13 27 0e da 0a 87 06 2a 01 c3 00 00 00 00 00 00 00 00 00 00 | ...........t.'.....*............ |
42020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
420a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
420c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
420e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
42180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
421a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
421c0 | 00 00 00 88 63 82 0d 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ....c.....K..CREATE.TABLE.t1(a.I |
421e0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
42200 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
42220 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
42240 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
42260 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
42280 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
422a0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 20 67 6c 6f | '%d,%d,%d',new.a,new.b,new.c.glo |
422c0 | 62 28 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | b(1,1)));...END;...CREATE.TRIGGE |
422e0 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
42300 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
42320 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
42340 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
42360 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
42380 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
423a0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
423c0 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
423e0 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
42400 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
42420 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
42440 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
42460 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
42480 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
424a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
424c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
424e0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
42500 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
42520 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
42540 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
42560 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
42580 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
425a0 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
425c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
425e0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
42600 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
42620 | 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 0c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..Y.....7..CREATE.TABLE |
42640 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
42660 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
42680 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
426a0 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
426c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
426e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
42700 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
42720 | 77 2e 61 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.a));...END;...CREATE.TRIGGER.r |
42740 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
42760 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
42780 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
427a0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
427c0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
427e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
42800 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
42820 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
42840 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
42860 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
42880 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
428a0 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
428c0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
428e0 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
42900 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
42920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
42940 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
42960 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
42980 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
429a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
429c0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
429e0 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
42a00 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELETE.FROM.record;...INS |
42a20 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
42a40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
42a60 | 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | c+1.WHERE.c<0;...SELECT.*.FROM.r |
42a80 | 65 63 6f 72 64 3b 0a 88 4f 82 0b 04 00 91 23 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ecord;..O.....#..CREATE.TABLE.t1 |
42aa0 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
42ac0 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
42ae0 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
42b00 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
42b20 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
42b40 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
42b60 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 61 | ntf('%d,%d,%d',new.a,new.b,new.a |
42b80 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
42ba0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
42bc0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
42be0 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
42c00 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
42c20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
42c40 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
42c60 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
42c80 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
42ca0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
42cc0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
42ce0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
42d00 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
42d20 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
42d40 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
42d60 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
42d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
42da0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
42dc0 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
42de0 | 28 31 20 67 6c 6f 62 28 31 2c 31 29 2c 32 29 3b 0a 20 20 54 45 20 46 52 4f 4d 20 20 49 4e 54 4f | (1.glob(1,1),2);...TE.FROM..INTO |
42e00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
42e20 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
42e40 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
42e60 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
42e80 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
42ea0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
42ec0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 0a 04 00 | ;...SELECT.*.FROM.record;..I.... |
42ee0 | 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
42f00 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
42f20 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
42f40 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
42f60 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
42f80 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
42fa0 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-insert',printf('%d,%d,%d |
42fc0 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2c 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new,b,new.c));...END;... |
42fe0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
43000 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
43020 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
43040 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
43060 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
43080 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
430a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
430c0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
430e0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
43100 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 28 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old(b,old.c,new.a,new.b, |
43120 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
43140 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
43160 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
43180 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
431a0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
431c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
431e0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
43200 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
43220 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
43240 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
43260 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
43280 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
432a0 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELETE.FROM.record;...INS |
432c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
432e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
43300 | 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | c+1.WHERE.c<0;...SELECT.*.FROM.r |
43320 | 65 63 6f 72 64 3b 0a 88 49 82 09 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ecord;..I........CREATE.TABLE.t1 |
43340 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
43360 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
43380 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
433a0 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
433c0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
433e0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
43400 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2c 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new,b,new.c |
43420 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
43440 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
43460 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
43480 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
434a0 | 6e 65 77 2c 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new,a,new.b,new.c));...END;...CR |
434c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
434e0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
43500 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
43520 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
43540 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
43560 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
43580 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
435a0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
435c0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
435e0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
43600 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
43620 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
43640 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
43660 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
43680 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | (1,2);...DELETEINSERT.INTO.t1(a, |
436a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
436c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
436e0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
43700 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
43720 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
43740 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
43760 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 08 04 00 91 17 20 20 43 52 | LECT.*.FROM.record;..I........CR |
43780 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
437a0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
437c0 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
437e0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
43800 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
43820 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
43840 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2c | e-insert',printf('%d,%d,%d',new, |
43860 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
43880 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
438a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
438c0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
438e0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
43900 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
43920 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
43940 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
43960 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
43980 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | %d/%d,%d,%d',...............old. |
439a0 | 61 2c 6f 6c 64 28 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old(b,old.c,new.a,new.b,new.c) |
439c0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
439e0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
43a00 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
43a20 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
43a40 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
43a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
43a80 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
43aa0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
43ac0 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
43ae0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
43b00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
43b20 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
43b40 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
43b60 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
43b80 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
43ba0 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
43bc0 | 0a 88 3b 82 07 04 00 90 7b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..;.....{..CREATE.TABLE.t1(a.INT |
43be0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
43c00 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
43c20 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
43c40 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
43c60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
43c80 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
43ca0 | 64 2c 25 64 2c 25 64 27 2c 41 42 4f 52 54 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | d,%d,%d',ABORTnew.a,new.b,new.c) |
43cc0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
43ce0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
43d00 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
43d20 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
43d40 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
43d60 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
43d80 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
43da0 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
43dc0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
43de0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
43e00 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 65 77 2e 63 29 29 3b 0a 20 20 | d.a,old.b,old.c,new.a,ew.c));... |
43e20 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
43e40 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
43e60 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
43e80 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
43ea0 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
43ec0 | 20 20 20 20 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ....d.c,new.a,new.b,new.c));...E |
43ee0 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
43f00 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
43f20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f | NSERT.INTO.t1(a,b).VALUES(1,2).O |
43f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
43f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
43f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
43fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
43fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
43fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
44000 | 0d 00 00 00 07 01 a1 00 1b b1 17 64 13 17 0e ba 0a 5d 06 00 01 a1 00 00 00 00 00 00 00 00 00 00 | ...........d.....].............. |
44020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
440a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
440c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
440e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
44180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
441a0 | 00 88 5b 82 14 04 00 91 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..[.....;..CREATE.TABLE.t1(a.INT |
441c0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
441e0 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
44200 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
44220 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
44240 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
44260 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
44280 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
442a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
442c0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
442e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
44300 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 61 66 66 69 6e 69 74 79 28 31 29 2c 43 55 52 52 | insert',printf(.affinity(1),CURR |
44320 | 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | ENT_TIMESTAMP));...END;...CREATE |
44340 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
44360 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
44380 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
443a0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
443c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
443e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
44400 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
44420 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
44440 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
44460 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
44480 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
444a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
444c0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
444e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
44500 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
44520 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
44540 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
44560 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
44580 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
445a0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
445c0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
445e0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
44600 | 88 59 82 13 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .Y.....7..CREATE.TABLE.t1(a.INTE |
44620 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
44640 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
44660 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
44680 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
446a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
446c0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
446e0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
44700 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
44720 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
44740 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 20 73 75 62 73 74 72 28 | .record(x,y).....VALUES(.substr( |
44760 | 31 2c 31 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | 1,1,1),printf('%d,%d,%d',new.a,n |
44780 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
447a0 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
447c0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
447e0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
44800 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
44820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
44840 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
44860 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
44880 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
448a0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
448c0 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
448e0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
44900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
44920 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
44940 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
44960 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
44980 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
449a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
449c0 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
449e0 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
44a00 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
44a20 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
44a40 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 | c<0;...SELECT.*.FROM.record;..Y. |
44a60 | 12 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | ....7..CREATE.TABLE.t1(a.INTEGER |
44a80 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
44aa0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
44ac0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
44ae0 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
44b00 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
44b20 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
44b40 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
44b60 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 44 45 4c 45 54 | ...CREATE.TRIGGER.r2.AFTER.DELET |
44b80 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
44ba0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
44bc0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
44be0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
44c00 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
44c20 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
44c40 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
44c60 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
44c80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 | ..................."a","b",old.b |
44ca0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
44cc0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
44ce0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
44d00 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
44d20 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
44d40 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
44d60 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
44d80 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
44da0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
44dc0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
44de0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
44e00 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
44e20 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
44e40 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
44e60 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
44e80 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
44ea0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 11 04 00 | ;...SELECT.*.FROM.record;..Y.... |
44ec0 | 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .7..CREATE.TABLE.t1(a.INTEGER.PR |
44ee0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
44f00 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
44f20 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
44f40 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
44f60 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
44f80 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-insert',printf('%d,%d,%d |
44fa0 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 2b 0a 20 20 | ',new.a,new.b,new.c));...END+... |
44fc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
44fe0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
45000 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
45020 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
45040 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
45060 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
45080 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
450a0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
450c0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
450e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
45100 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
45120 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
45140 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
45160 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
45180 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
451a0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
451c0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
451e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
45200 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
45220 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
45240 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
45260 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
45280 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ELECT.*.FROM.record;...DELETE.FR |
452a0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
452c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
452e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 | DO.UPDATE.SET.c=c+1.WHERE.c<0;.. |
45300 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 10 04 00 91 17 20 | .SELECT.*.FROM.record;..I....... |
45320 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
45340 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
45360 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
45380 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
453a0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
453c0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
453e0 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fore-insert',printf('%d,%d,%d',n |
45400 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 20 0a 20 3b 45 4e 44 3b 0a 20 20 43 52 41 | ew.a,new.b,new.c))...;END;...CRA |
45420 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
45440 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
45460 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
45480 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
454a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
454c0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
454e0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
45500 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
45520 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
45540 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
45560 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
45580 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
455a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
455c0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
455e0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
45600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
45620 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
45640 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
45660 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
45680 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
456a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
456c0 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
456e0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
45700 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
45720 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
45740 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
45760 | 72 64 3b 0a 88 49 82 0f 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..I........CREATE.TABLE.t1(a. |
45780 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
457a0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
457c0 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
457e0 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
45800 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
45820 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
45840 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 20 | ('%d,%d,%d',new.a,new.b,new.c)). |
45860 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | ...END;...CRAFTER.INSERT.ON.t1.B |
45880 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
458a0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
458c0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
458e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
45900 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
45920 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
45940 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
45960 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
45980 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
459a0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
459c0 | 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r4.AFTER.UPDATE.ON.t1 |
459e0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
45a00 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 | y).........VALUES('after-update' |
45a20 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
45a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
45a60 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
45a80 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ,new.c));...END;...INSERT.INTO.t |
45aa0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | 1(a,b).VALUES(1,2);...DELETE.FRO |
45ac0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
45ae0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
45b00 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 | O.UPDATE.SET.c=t1.c+1;...SELECT. |
45b20 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | *.FROM.record;...DELETE.FROM.rec |
45b40 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
45b60 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
45b80 | 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 | ATE.SET.c=c+1.WHERE.c<0;...SELEC |
45ba0 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 82 0e 04 00 91 1b 20 20 43 52 45 41 54 | T.*.FROM.record;..K........CREAT |
45bc0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
45be0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
45c00 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
45c20 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
45c40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
45c60 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
45c80 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
45ca0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 20 0a 20 20 20 3b 45 4e 44 3b 0a 20 20 43 52 41 46 54 45 52 | ew.b,new.c)).....;END;...CRAFTER |
45cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
45ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
45d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
45d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
45d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
45d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
45d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
45da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
45dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
45de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
45e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
45e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
45e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
45e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
45e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
45ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
45ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
45ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
45f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
45f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
45f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
45f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
45f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
45fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
45fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
45fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
46000 | 0d 00 00 00 07 01 3e 00 1b 9e 17 32 12 d0 0e 65 0a 06 05 9d 01 3e 00 00 00 00 00 00 00 00 00 00 | ......>....2...e.....>.......... |
46020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
46040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
46060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
46080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
460a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
460c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
460e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
46100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
46120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 5b | ...............................[ |
46140 | 82 1b 04 00 91 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .....;..CREATE.TABLE.t1(a.INTEGE |
46160 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
46180 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
461a0 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
461c0 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
461e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
46200 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
46220 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
46240 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
46260 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
46280 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
462a0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 45 4e 54 | ert',printf('%.*g,%d,%d',CURRENT |
462c0 | 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | _TIMESTAMP));...END;...CREATE.TR |
462e0 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
46300 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
46320 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
46340 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
46360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
46380 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
463a0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
463c0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
463e0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
46400 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
46420 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
46440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
46460 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
46480 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(9,2);. |
464a0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
464c0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
464e0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
46500 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
46520 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
46540 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
46560 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
46580 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 65 82 | c<0;...SELECT.*.FROM.record;..e. |
465a0 | 1a 04 00 91 4f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | ....O..CREATE.TABLE.t1(a.INTEGER |
465c0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
465e0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
46600 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
46620 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
46640 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
46660 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
46680 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
466a0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
466c0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
466e0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
46700 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | rt',printf('%.*c.%d,%d',new.a,ne |
46720 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
46740 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
46760 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
46780 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
467a0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
467c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
467e0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
46800 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
46820 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
46840 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
46860 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
46880 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
468a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
468c0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
468e0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
46900 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
46920 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 32 30 30 31 2d 30 31 2d 30 31 2c 32 29 | TO.t1(a,b).VALUES(12001-01-01,2) |
46940 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
46960 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
46980 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
469a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
469c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
469e0 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
46a00 | 63 6f 72 64 3b 0a 88 5b 82 19 04 00 91 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..[.....;..CREATE.TABLE.t1( |
46a20 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
46a40 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
46a60 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
46a80 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
46aa0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
46ac0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
46ae0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
46b00 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
46b20 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
46b40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
46b60 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 63 ac 25 64 2c 25 64 27 | fter-insert',printf('%.*c.%d,%d' |
46b80 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
46ba0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
46bc0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
46be0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
46c00 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
46c20 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
46c40 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
46c60 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
46c80 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
46ca0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
46cc0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
46ce0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
46d00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
46d20 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
46d40 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
46d60 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
46d80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
46da0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
46dc0 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
46de0 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
46e00 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
46e20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
46e40 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
46e60 | 6f 72 64 3b 0a 88 67 82 18 04 00 91 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..g.....S..CREATE.TABLE.t1(a |
46e80 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
46ea0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
46ec0 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
46ee0 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
46f00 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
46f20 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
46f40 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
46f60 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
46f80 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
46fa0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
46fc0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 63 ac 25 64 2c 25 64 27 2c | ter-insert',printf('%.*c.%d,%d', |
46fe0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
47000 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
47020 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
47040 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
47060 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
47080 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
470a0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
470c0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
470e0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
47100 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
47120 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
47140 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
47160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
47180 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
471a0 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
471c0 | 28 20 72 61 6e 64 6f 6d 28 29 20 2d 31 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (.random().-11,2);...DELETE.FROM |
471e0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
47200 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
47220 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
47240 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
47260 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
47280 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
472a0 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
472c0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5e 82 17 04 00 91 41 20 20 43 52 45 41 54 45 | .*.FROM.record;..^.....A..CREATE |
472e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
47300 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
47320 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
47340 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
47360 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
47380 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
473a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
473c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
473e0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
47400 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
47420 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
47440 | 20 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | .*c.%d,%d',new.a,new.b,new.c));. |
47460 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
47480 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
474a0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
474c0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
474e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
47500 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
47520 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
47540 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
47560 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
47580 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
475a0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
475c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
475e0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
47600 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
47620 | 61 2c 62 29 20 56 41 4c 55 45 53 28 20 2d 33 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | a,b).VALUES(.-31,2);...DELETE.FR |
47640 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
47660 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
47680 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
476a0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
476c0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
476e0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
47700 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
47720 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 68 82 16 04 00 91 55 20 20 43 52 45 41 | CT.*.FROM.record;..h.....U..CREA |
47740 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
47760 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
47780 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
477a0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
477c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
477e0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
47800 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
47820 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
47840 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
47860 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
47880 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
478a0 | 27 25 20 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | '%.*c.%d,%d',new.a,new.b,new.c)) |
478c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
478e0 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
47900 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
47920 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
47940 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
47960 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
47980 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
479a0 | 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r4.AFTER.UPDATE.ON.t1 |
479c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
479e0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 | y).........VALUES('after-update' |
47a00 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
47a20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
47a40 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
47a60 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ,new.c));...END;...INSERT.INTO.t |
47a80 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 2d 31 31 32 30 30 31 2d 30 31 2d 30 31 2c 32 29 3b | 1(a,b).VALUES(.-112001-01-01,2); |
47aa0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
47ac0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
47ae0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
47b00 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
47b20 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
47b40 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
47b60 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
47b80 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5e | .c<0;...SELECT.*.FROM.record;..^ |
47ba0 | 82 15 04 00 91 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .....A..CREATE.TABLE.t1(a.INTEGE |
47bc0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
47be0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
47c00 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
47c20 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
47c40 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
47c60 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
47c80 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
47ca0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
47cc0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
47ce0 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
47d00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | ert',printf('%.*c.%d,%d',new.a,n |
47d20 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
47d40 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
47d60 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
47d80 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
47da0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
47dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
47de0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
47e00 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
47e20 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
47e40 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
47e60 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
47e80 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
47ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
47ec0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
47ee0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 2d 31 31 2c 32 | NSERT.INTO.t1(a,b).VALUES(.-11,2 |
47f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
47f20 | 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(c,b).VALUES(1,2).....O |
47f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
47f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
47f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
47fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
47fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
47fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
48000 | 0d 00 00 00 07 01 53 00 1b 9e 17 3f 12 e0 0e 6a 0a 0d 05 b0 01 53 00 00 00 00 00 00 00 00 00 00 | ......S....?...j.....S.......... |
48020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
48040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
48060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
48080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
480a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
480c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
480e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
48100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
48120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
48140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 82 22 04 00 91 37 20 20 43 52 45 | ....................Y."...7..CRE |
48160 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
48180 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
481a0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
481c0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
481e0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
48200 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
48220 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
48240 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
48260 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
48280 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
482a0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
482c0 | 28 27 25 63 ac 25 58 2c 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b | ('%c.%X,%d',.julianday(1,1,1))); |
482e0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
48300 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
48320 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
48340 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
48360 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
48380 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
483a0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
483c0 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
483e0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
48400 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
48420 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
48440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
48460 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
48480 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
484a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
484c0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
484e0 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
48500 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
48520 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
48540 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
48560 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
48580 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
485a0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 21 04 00 91 37 20 20 43 52 45 41 54 45 | .*.FROM.record;..Y.!...7..CREATE |
485c0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
485e0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
48600 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
48620 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
48640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
48660 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
48680 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
486a0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
486c0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
486e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
48700 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
48720 | 58 2c 25 64 2c 25 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | X,%d,%d',.round(1,1),new.c));... |
48740 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
48760 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
48780 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
487a0 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
487c0 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
487e0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
48800 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
48820 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
48840 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
48860 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
48880 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
488a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
488c0 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
488e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
48900 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
48920 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
48940 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
48960 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | DATE.SET.c=t1.c+1;...SELECT.*.FR |
48980 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | OM.record;...DELETE.FROM.record; |
489a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
489c0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
489e0 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
48a00 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 20 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..Y.....7..CREATE.TA |
48a20 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
48a40 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
48a60 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
48a80 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
48aa0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
48ac0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
48ae0 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
48b00 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
48b20 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
48b40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
48b60 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 53 2c 25 | LUES('after-insert',printf('%S,% |
48b80 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
48ba0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
48bc0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
48be0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
48c00 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
48c20 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
48c40 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
48c60 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
48c80 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
48ca0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
48cc0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
48ce0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
48d00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
48d20 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
48d40 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
48d60 | 56 41 4c 55 45 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(9,2);...DELETE.FROM.recor |
48d80 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
48da0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
48dc0 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
48de0 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
48e00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
48e20 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
48e40 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
48e60 | 4d 20 72 65 63 6f 72 64 3b 0a 88 72 82 1f 04 00 91 69 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..r.....i..CREATE.TABLE |
48e80 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
48ea0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
48ec0 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
48ee0 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
48f00 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
48f20 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
48f40 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
48f60 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
48f80 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
48fa0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
48fc0 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 53 2c 25 64 2c 25 | S('after-insert',printf('%S,%d,% |
48fe0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
49000 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
49020 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
49040 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
49060 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
49080 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
490a0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
490c0 | 6e 65 77 2e 63 29 29 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | new.c))......................... |
490e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
49100 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
49120 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
49140 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
49160 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
49180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
491a0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
491c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
491e0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
49200 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
49220 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
49240 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
49260 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
49280 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
492a0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
492c0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c ff ff 00 00 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SEL....*.FROM.record;. |
492e0 | 88 5b 82 1e 04 00 91 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .[.....;..CREATE.TABLE.t1(a.INTE |
49300 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
49320 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
49340 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
49360 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
49380 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
493a0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
493c0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
493e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
49400 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
49420 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
49440 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 30 2a 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 45 | nsert',printf('%0*g,%d,%d',CURRE |
49460 | 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | NT_TIMESTAMP));...END;...CREATE. |
49480 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
494a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
494c0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
494e0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
49500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
49520 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
49540 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
49560 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
49580 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
495a0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
495c0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
495e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
49600 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
49620 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
49640 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
49660 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
49680 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
496a0 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
496c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
496e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
49700 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
49720 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
49740 | 5b 82 1d 04 00 91 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | [.....;..CREATE.TABLE.t1(a.INTEG |
49760 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
49780 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
497a0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
497c0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
497e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
49800 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
49820 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
49840 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
49860 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
49880 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
498a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 2e 2a 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 45 4e | sert',printf('%.*g,%d,%d',CURREN |
498c0 | 54 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | T_TIMESTAMP));...END;...CREATE.T |
498e0 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
49900 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
49920 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
49940 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
49960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
49980 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
499a0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
499c0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
499e0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
49a00 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
49a20 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
49a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
49a60 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
49a80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(a,b).VALUES(1,2); |
49aa0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
49ac0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
49ae0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
49b00 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
49b20 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
49b40 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
49b60 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
49b80 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5e | .c<0;...SELECT.*.FROM.record;..^ |
49ba0 | 82 1c 04 00 91 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .....A..CREATE.TABLE.t1(a.INTEGE |
49bc0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
49be0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
49c00 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
49c20 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
49c40 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
49c60 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
49c80 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
49ca0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
49cc0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
49ce0 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
49d00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 2e 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | ert',printf('%.*c.%d,%d',new.a,n |
49d20 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
49d40 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
49d60 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
49d80 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
49da0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
49dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
49de0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
49e00 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
49e20 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
49e40 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
49e60 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
49e80 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
49ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
49ec0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
49ee0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 2d 31 31 2c 32 | NSERT.INTO.t1(a,b).VALUES(.-11,2 |
49f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
49f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
49f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
49f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
49f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
49fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
49fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
49fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
4a000 | 0d 00 00 00 07 01 83 00 1b a3 17 46 12 e9 0e 8c 0a 2f 05 d0 01 83 00 00 00 00 00 00 00 00 00 00 | ...........F...../.............. |
4a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4a180 | 00 00 00 88 49 82 29 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ....I.)......CREATE.TABLE.t1(a.I |
4a1a0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
4a1c0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
4a1e0 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
4a200 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
4a220 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
4a240 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
4a260 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
4a280 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
4a2a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
4a2c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
4a2e0 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 72 6f 75 | r-insert',printf('%d,%d,%d',.rou |
4a300 | 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | nd(1,1),new.c));...END;...CREATE |
4a320 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
4a340 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4a360 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
4a380 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2e 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d'..... |
4a3a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
4a3c0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
4a3e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
4a400 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
4a420 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
4a440 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
4a460 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
4a480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 28 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old(a,old.b,ol |
4a4a0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
4a4c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
4a4e0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
4a500 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
4a520 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
4a540 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .c+1;...SELd;...DELETE.FROM.reco |
4a560 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
4a580 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
4a5a0 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
4a5c0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5b 82 28 04 00 91 3b 20 20 43 52 45 41 54 45 | .*.FROM.record;..[.(...;..CREATE |
4a5e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
4a600 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
4a620 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
4a640 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
4a660 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
4a680 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
4a6a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
4a6c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
4a6e0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
4a700 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
4a720 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
4a740 | 64 2c 25 64 2c 25 20 2a 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a | d,%d,%.*d',.round(1,1),new.c));. |
4a760 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
4a780 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
4a7a0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
4a7c0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
4a7e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
4a800 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
4a820 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
4a840 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
4a860 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
4a880 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
4a8a0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
4a8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4a8e0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
4a900 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
4a920 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
4a940 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
4a960 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
4a980 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
4a9a0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
4a9c0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
4a9e0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
4aa00 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
4aa20 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 27 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y.'...7..CREATE. |
4aa40 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
4aa60 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
4aa80 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
4aaa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
4aac0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
4aae0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
4ab00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
4ab20 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
4ab40 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
4ab60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
4ab80 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
4aba0 | 2c 25 64 2c 25 20 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%.',new.a,new.b,new.c));...E |
4abc0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
4abe0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
4ac00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
4ac20 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
4ac40 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
4ac60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
4ac80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
4aca0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
4acc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
4ace0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
4ad00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
4ad20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
4ad40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
4ad60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 | c));...END;...INSERT.INTO.t1(c,b |
4ad80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
4ada0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
4adc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
4ade0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
4ae00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
4ae20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
4ae40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
4ae60 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
4ae80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 26 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.&...7..CREATE.TAB |
4aea0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
4aec0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
4aee0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
4af00 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
4af20 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
4af40 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
4af60 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
4af80 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
4afa0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
4afc0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
4afe0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 63 | UES('after-insert',printf('%d,%c |
4b000 | ac 25 64 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 20 45 4e 44 3b | .%d',.sqlite_version()));...END; |
4b020 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
4b040 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
4b060 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
4b080 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
4b0a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
4b0c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
4b0e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
4b100 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
4b120 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
4b140 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
4b160 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
4b180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
4b1a0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
4b1c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
4b1e0 | 41 4c 55 45 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(9,2);...DELETE.FROM.record |
4b200 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
4b220 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
4b240 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
4b260 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
4b280 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
4b2a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
4b2c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
4b2e0 | 20 72 65 63 6f 72 64 3b 0a 88 59 82 25 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.%...7..CREATE.TABLE. |
4b300 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
4b320 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
4b340 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
4b360 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
4b380 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
4b3a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
4b3c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
4b3e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
4b400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
4b420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
4b440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 63 ac 25 64 | ('after-insert',printf('%d,%c.%d |
4b460 | 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',.sqlite_version()));...END;... |
4b480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
4b4a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
4b4c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
4b4e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
4b500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
4b520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
4b540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
4b560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
4b580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
4b5a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
4b5c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
4b5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
4b600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
4b620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
4b640 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
4b660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
4b680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
4b6a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
4b6c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
4b6e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
4b700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
4b720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
4b740 | 63 6f 72 64 3b 0a 88 59 82 24 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.$...7..CREATE.TABLE.t1( |
4b760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
4b780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
4b7a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
4b7c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
4b7e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
4b800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
4b820 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
4b840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
4b860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
4b880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
4b8a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 63 ac 25 63 27 2c 20 | fter-insert',printf('%d,%c.%c',. |
4b8c0 | 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | sqlite_version()));...END;...CRE |
4b8e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
4b900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
4b920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
4b940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
4b960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
4b980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
4b9a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
4b9c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
4b9e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
4ba00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
4ba20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
4ba40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
4ba60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
4ba80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
4baa0 | 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 9,2);...DELETE.FROM.record;...IN |
4bac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
4bae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
4bb00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
4bb20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
4bb40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
4bb60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
4bb80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
4bba0 | 64 3b 0a 88 59 82 23 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.#...7..CREATE.TABLE.t1(a.I |
4bbc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
4bbe0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
4bc00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
4bc20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
4bc40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
4bc60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
4bc80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
4bca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
4bcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
4bce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
4bd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 63 ac 25 64 2c 25 64 27 2c 20 6a 75 6c | r-insert',printf('%c.%d,%d',.jul |
4bd20 | 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | ianday(1,1,1)));...END;...CREATE |
4bd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
4bd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4bd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
4bda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
4bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
4bde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
4be00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
4be20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
4be40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
4be60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
4be80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
4bea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
4bec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
4bee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(9,2 |
4bf00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
4bf20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
4bf40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
4bf60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
4bf80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
4bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
4bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
4bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
4c000 | 0d 00 00 00 07 01 73 00 1b b3 17 66 12 f5 0e 91 0a 34 05 d7 01 73 00 00 00 00 00 00 00 00 00 00 | ......s....f.....4...s.......... |
4c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 60 82 30 04 00 91 45 20 20 43 52 45 | ....................`.0...E..CRE |
4c180 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
4c1a0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
4c1c0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
4c1e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
4c200 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
4c220 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
4c240 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
4c260 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
4c280 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
4c2a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
4c2c0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
4c2e0 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
4c300 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
4c320 | 52 45 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.DELETE.ON.t1.BEGIN.....INSERT |
4c340 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
4c360 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
4c380 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
4c3a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
4c3c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
4c3e0 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
4c400 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4c420 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
4c440 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
4c460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4c480 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
4c4a0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
4c4c0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
4c4e0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
4c500 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
4c520 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
4c540 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
4c560 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
4c580 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
4c5a0 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
4c5c0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 41 4e 41 4c 59 5a 45 0a 88 59 82 2f 04 00 91 37 20 | .*.FROM.record;ANALYZE..Y./...7. |
4c5e0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
4c600 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
4c620 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
4c640 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
4c660 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
4c680 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
4c6a0 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fore-insert',printf('%d,%d,%d',n |
4c6c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
4c6e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
4c700 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
4c720 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
4c740 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
4c760 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
4c780 | 42 45 46 4f 52 45 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.DELETE.ON.t1.BEGIN.....IN |
4c7a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
4c7c0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
4c7e0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
4c800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
4c820 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
4c840 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.DELETE.ON |
4c860 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
4c880 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
4c8a0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
4c8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4c8e0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
4c900 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
4c920 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
4c940 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
4c960 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
4c980 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
4c9a0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
4c9c0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
4c9e0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
4ca00 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
4ca20 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 2e 04 00 91 37 20 20 43 52 | LECT.*.FROM.record;..Y.....7..CR |
4ca40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
4ca60 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
4ca80 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
4caa0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
4cac0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
4cae0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
4cb00 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | e-insert',printf('%d,%d,%d',new. |
4cb20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
4cb40 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
4cb60 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
4cb80 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
4cba0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
4cbc0 | 3b 0a 20 20 45 4e 44 2b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END+...CREATE.TRIGGER.r3.BEF |
4cbe0 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
4cc00 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
4cc20 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
4cc40 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
4cc60 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
4cc80 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
4cca0 | 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r4.AFTER.UPDATE.ON.t1 |
4ccc0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
4cce0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 | y).........VALUES('after-update' |
4cd00 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
4cd20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4cd40 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
4cd60 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ,new.c));...END;...INSERT.INTO.t |
4cd80 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | 1(a,b).VALUES(1,2);...DELETE.FRO |
4cda0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
4cdc0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
4cde0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 | O.UPDATE.SET.c=t1.c+1;...SELECT. |
4ce00 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | *.FROM.record;...DELETE.FROM.rec |
4ce20 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
4ce40 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
4ce60 | 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 | ATE.SET.c=c+1.WHERE.c<0;...SELEC |
4ce80 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 82 2d 04 00 91 45 20 20 43 52 45 41 54 | T.*.FROM.record;..`.-...E..CREAT |
4cea0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
4cec0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
4cee0 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
4cf00 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
4cf20 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
4cf40 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
4cf60 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
4cf80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
4cfa0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
4cfc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
4cfe0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
4d000 | 25 64 2c 25 64 2c 25 64 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 29 3b 0a 20 | %d,%d,%d',.sqlite_version()));.. |
4d020 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
4d040 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
4d060 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
4d080 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
4d0a0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
4d0c0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
4d0e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
4d100 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
4d120 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
4d140 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
4d160 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
4d180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4d1a0 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
4d1c0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | w.c));...END;EXPLAIN...INSERT.IN |
4d1e0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
4d200 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
4d220 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
4d240 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
4d260 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
4d280 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
4d2a0 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
4d2c0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
4d2e0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6d 82 2c 04 00 91 5f 20 20 43 | ELECT.*.FROM.record;..m.,..._..C |
4d300 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
4d320 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
4d340 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
4d360 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
4d380 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
4d3a0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
4d3c0 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | re-insert',printf('%d,%d,%d',new |
4d3e0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
4d400 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
4d420 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4d440 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
4d460 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 20 6c | tf('%d,%d,%d',.sqlite_version(.l |
4d480 | 6f 61 64 5f 65 78 74 65 6e 73 69 6f 6e 28 31 2c 31 29 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | oad_extension(1,1))));...END;... |
4d4a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
4d4c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
4d4e0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
4d500 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
4d520 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
4d540 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
4d560 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
4d580 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
4d5a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
4d5c0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
4d5e0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
4d600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
4d620 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
4d640 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
4d660 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
4d680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
4d6a0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
4d6c0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
4d6e0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
4d700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
4d720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
4d740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
4d760 | 63 6f 72 64 3b 0a 88 49 82 2b 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I.+......CREATE.TABLE.t1( |
4d780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
4d7a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
4d7c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
4d7e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
4d800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
4d820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
4d840 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
4d860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
4d880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
4d8a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
4d8c0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 | fter-insert',printf('%d,%d,%d',. |
4d8e0 | 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | round(1,1),new.c));...END;...CRE |
4d900 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
4d920 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
4d940 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
4d960 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2e 0a | te',printf('%d,%d,%d/%d,%d,%d'.. |
4d980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
4d9a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
4d9c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
4d9e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
4da00 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
4da20 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2e 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update'.printf('%d,%d |
4da40 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
4da60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
4da80 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
4daa0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
4dac0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
4dae0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
4db00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
4db20 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | =t1.c+1;...SELd;...DELETE.FROM.r |
4db40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
4db60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
4db80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
4dba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 2a 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.*......CRE |
4dbc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
4dbe0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
4dc00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
4dc20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
4dc40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
4dc60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
4dc80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
4dca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
4dcc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
4dce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
4dd00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
4dd20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',.round(1,1),new.c)); |
4dd40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
4dd60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
4dd80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
4dda0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
4ddc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d'..................... |
4dde0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
4de00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
4de20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
4de40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4de60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
4de80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2e 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d'...... |
4dea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4dec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
4dee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
4df00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
4df20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
4df40 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
4df60 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 | .UPDATE.SET.c=t1.c+1;...SELd;... |
4df80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
4dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
4dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
4dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
4e000 | 0d 00 00 00 07 01 b6 00 1b a3 17 3f 12 f2 0e 9d 0a 50 06 03 01 b6 00 00 00 00 00 00 00 00 00 00 | ...........?.....P.............. |
4e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
4e1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 82 37 04 00 91 17 20 20 | .......................I.7...... |
4e1c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
4e1e0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
4e200 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
4e220 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
4e240 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
4e260 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
4e280 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
4e2a0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
4e2c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
4e2e0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
4e300 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
4e320 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
4e340 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
4e360 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
4e380 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 53 45 4c | ERT.INTO.record(x,y).........SEL |
4e3a0 | 45 43 54 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | ECT('before-update',printf('%d,% |
4e3c0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
4e3e0 | 20 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..group_concat(1,1),old.b,old.c, |
4e400 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
4e420 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
4e440 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
4e460 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
4e480 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
4e4a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4e4c0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
4e4e0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
4e500 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
4e520 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
4e540 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
4e560 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b | .DO.UPDATE.SET.c=t1.c+1;...SELd; |
4e580 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
4e5a0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
4e5c0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
4e5e0 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
4e600 | 64 3b 0a 88 49 82 36 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..I.6......CREATE.TABLE.t1(a.I |
4e620 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
4e640 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
4e660 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
4e680 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
4e6a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
4e6c0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
4e6e0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
4e700 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
4e720 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
4e740 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
4e760 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
4e780 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
4e7a0 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
4e7c0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4e7e0 | 29 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........SELECT('before-update' |
4e800 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
4e820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 72 6f 75 70 5f 63 6f 6e 63 61 | .....................group_conca |
4e840 | 74 28 31 2c 31 29 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | t(1,1),old.c,new.a,new.b,new.c)) |
4e860 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
4e880 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
4e8a0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
4e8c0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
4e8e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
4e900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
4e920 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
4e940 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
4e960 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
4e980 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
4e9a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
4e9c0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .c+1;...SELd;...DELETE.FROM.reco |
4e9e0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
4ea00 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
4ea20 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
4ea40 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 35 04 00 91 17 20 20 43 52 45 41 54 45 | .*.FROM.record;..I.5......CREATE |
4ea60 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
4ea80 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
4eaa0 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
4eac0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
4eae0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
4eb00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
4eb20 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
4eb40 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
4eb60 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
4eb80 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
4eba0 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
4ebc0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
4ebe0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
4ec00 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
4ec20 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 28 27 62 | TO.record(x,y).........SELECT('b |
4ec40 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
4ec60 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
4ec80 | 20 20 20 20 20 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 3f 29 2c 6e 65 77 2e 61 2c | ......json_group_array(?),new.a, |
4eca0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
4ecc0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
4ece0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
4ed00 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
4ed20 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
4ed40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
4ed60 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
4ed80 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
4eda0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
4edc0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
4ede0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
4ee00 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c | DATE.SET.c=t1.c+1;...SELd;...DEL |
4ee20 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
4ee40 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
4ee60 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
4ee80 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 82 | c<0;...SELECT.*.FROM.record;..Q. |
4eea0 | 34 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | 4...'..CREATE.TABLE.t1(a.INTEGER |
4eec0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
4eee0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
4ef00 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
4ef20 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
4ef40 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
4ef60 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
4ef80 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
4efa0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
4efc0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
4efe0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
4f000 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
4f020 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
4f040 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
4f060 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
4f080 | 20 20 20 20 53 45 4c 45 43 54 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....SELECT('before-update',print |
4f0a0 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
4f0c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 | ...................."a","b""a"," |
4f0e0 | 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | b",old.b,old.c,new.a,new.b,new.c |
4f100 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
4f120 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
4f140 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
4f160 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
4f180 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
4f1a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
4f1c0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
4f1e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
4f200 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
4f220 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
4f240 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
4f260 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | t1.c+1;...SELd;...DELETE.FROM.re |
4f280 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
4f2a0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
4f2c0 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
4f2e0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 33 04 00 91 17 20 20 43 52 45 41 | CT.*.FROM.record;..I.3......CREA |
4f300 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
4f320 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
4f340 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
4f360 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
4f380 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
4f3a0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
4f3c0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
4f3e0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
4f400 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
4f420 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
4f440 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
4f460 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
4f480 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
4f4a0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
4f4c0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 28 | INTO.record(x,y).........SELECT( |
4f4e0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
4f500 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
4f520 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
4f540 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
4f560 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
4f580 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
4f5a0 | 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........SELECT('after-update',p |
4f5c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
4f5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
4f600 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
4f620 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
4f640 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
4f660 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
4f680 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
4f6a0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 | UPDATE.SET.c=t1.c+1;...SELd;...D |
4f6c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
4f6e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
4f700 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
4f720 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
4f740 | 60 82 32 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | `.2...E..CREATE.TABLE.t1(a.INTEG |
4f760 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
4f780 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
4f7a0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
4f7c0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
4f7e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
4f800 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
4f820 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
4f840 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
4f860 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
4f880 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
4f8a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
4f8c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
4f8e0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.DELETE.ON.t1.BEGI |
4f900 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
4f920 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
4f940 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
4f960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
4f980 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
4f9a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
4f9c0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
4f9e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
4fa00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
4fa20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
4fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
4fa60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
4fa80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
4faa0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e | .DELETE.FROM.record;EXPLAIN...IN |
4fac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
4fae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
4fb00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
4fb20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
4fb40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
4fb60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
4fb80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
4fba0 | 64 3b 0a 88 59 82 31 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.1...7..CREATE.TABLE.t1(a.I |
4fbc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
4fbe0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
4fc00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
4fc20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
4fc40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
4fc60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
4fc80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
4fca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
4fcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
4fce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
4fd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
4fd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
4fd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.DELETE.ON.t1. |
4fd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
4fd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
4fda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
4fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
4fde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
4fe00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
4fe20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
4fe40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
4fe60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
4fe80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
4fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
4fec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
4fee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
4ff00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
4ff20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
4ff40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
4ff60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
4ff80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
4ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
4ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
4ffe0 | 52 45 20 63 7c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c|0;...SELECT.*.FROM.record;. |
50000 | 0d 00 00 00 07 01 b5 00 1b b3 17 66 13 19 0e cc 0a 6f 06 12 01 b5 00 00 00 00 00 00 00 00 00 00 | ...........f.....o.............. |
50020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
500a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
500c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
500e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
50180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
501a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 82 3e 04 00 91 37 20 20 43 | ......................Y.>...7..C |
501c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
501e0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
50200 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
50220 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
50240 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
50260 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
50280 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | re-insert',printf('%d,%d,%d',new |
502a0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
502c0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
502e0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
50300 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
50320 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
50340 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
50360 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
50380 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
503a0 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 63 ac 25 64 | ES('before-update',printf('%c.%d |
503c0 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
503e0 | 20 20 20 20 20 20 20 20 20 20 20 22 e1 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | ...........".","b",old.b,old.c,n |
50400 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
50420 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
50440 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
50460 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
50480 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
504a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
504c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
504e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
50500 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
50520 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
50540 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
50560 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
50580 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
505a0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
505c0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
505e0 | 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c;1.WHERE.c<0;...SELE |
50600 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 3d 04 00 91 37 20 20 43 52 45 41 | CT.*.FROM.record;..Y.=...7..CREA |
50620 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
50640 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
50660 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
50680 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
506a0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
506c0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
506e0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
50700 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
50720 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
50740 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
50760 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
50780 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
507a0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
507c0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
507e0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
50800 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 63 ac 25 64 2c 25 64 | 'before-update',printf('%c.%d,%d |
50820 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
50840 | 20 20 20 20 20 20 20 20 22 e1 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ........".","b",old.b,old.c,new. |
50860 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
50880 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
508a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
508c0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
508e0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
50900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
50920 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
50940 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
50960 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
50980 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
509a0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
509c0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
509e0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
50a00 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
50a20 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
50a40 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
50a60 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 3c 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y.<...7..CREATE. |
50a80 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
50aa0 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
50ac0 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
50ae0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
50b00 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
50b20 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
50b40 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
50b60 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
50b80 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
50ba0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
50bc0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
50be0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
50c00 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
50c20 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
50c40 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
50c60 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 32 30 30 31 2d 30 31 2d 30 31 | fore-update',printf('%2001-01-01 |
50c80 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
50ca0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
50cc0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
50ce0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
50d00 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
50d20 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
50d40 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
50d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
50d80 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
50da0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
50dc0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
50de0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
50e00 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
50e20 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
50e40 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
50e60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
50e80 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
50ea0 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
50ec0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 3b 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..I.;......CREATE.TAB |
50ee0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
50f00 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
50f20 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
50f40 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
50f60 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
50f80 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
50fa0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
50fc0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
50fe0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
51000 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
51020 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
51040 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
51060 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
51080 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
510a0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 28 27 62 65 66 6f 72 | ecord(x,y).........SELECT('befor |
510c0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 29 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf)'%d,%d,%d/%d,%d |
510e0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
51100 | 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | .."a","b",old.b,old.c,new.a,new. |
51120 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
51140 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
51160 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
51180 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
511a0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
511c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
511e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
51200 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
51220 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
51240 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
51260 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
51280 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SET.c=t1.c+1;...SELd;...DELETE. |
512a0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
512c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
512e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
51300 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 3a 04 00 91 | ...SELECT.*.FROM.record;..I.:... |
51320 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
51340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
51360 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
51380 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
513a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
513c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
513e0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
51400 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
51420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
51440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
51460 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
51480 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
514a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
514c0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
514e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
51500 | 53 45 4c 45 43 54 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | SELECT('before-update',printf('% |
51520 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 3c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d'<.............. |
51540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
51560 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
51580 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
515a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
515c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
515e0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
51600 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
51620 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
51640 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
51660 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
51680 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
516a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
516c0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
516e0 | 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | Ld;...DELETE.FROM.record;...INSE |
51700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
51720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
51740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
51760 | 63 6f 72 64 3b 0a 88 49 82 39 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I.9......CREATE.TABLE.t1( |
51780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
517a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
517c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
517e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
51800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
51820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
51840 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
51860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
51880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
518a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
518c0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
518e0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
51900 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
51920 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
51940 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........SELECT('before-upda |
51960 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 2b | te',printf('%d,%d,%d/%d,%d,%d',+ |
51980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c | ............................"a", |
519a0 | 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | "b",old.b,old.c,new.a,new.b,new. |
519c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
519e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
51a00 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
51a20 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
51a40 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
51a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
51a80 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
51aa0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
51ac0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
51ae0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
51b00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
51b20 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | =t1.c+1;...SELd;...DELETE.FROM.r |
51b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
51b60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
51b80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
51ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 38 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.8......CRE |
51bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
51be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
51c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
51c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
51c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
51c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
51c80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
51ca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
51cc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
51ce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
51d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
51d20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
51d40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
51d60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
51d80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 53 45 4c 45 43 54 | .INTO.record(x,y).........SELECT |
51da0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
51dc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 2b 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',+................... |
51de0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
51e00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
51e20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
51e40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
51e60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
51e80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
51ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
51ec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
51ee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
51f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
51f20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
51f40 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
51f60 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 | .UPDATE.SET.c=t1.c+1;...SELd;... |
51f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
51fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
51fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
51fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
52000 | 0d 00 00 00 07 01 d8 00 1b a3 17 69 13 0c 0e bf 0a 72 06 25 01 d8 00 00 00 00 00 00 00 00 00 00 | ...........i.....r.%............ |
52020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
520a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
520c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
520e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
52180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
521a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
521c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 82 45 04 00 91 17 | .........................I.E.... |
521e0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
52200 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
52220 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
52240 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
52260 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
52280 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
522a0 | 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | efore-insert',printf('%d,%d,%d', |
522c0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
522e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.INSERT.ON. |
52300 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
52320 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
52340 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
52360 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
52380 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
523a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
523c0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
523e0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
52400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e | ................old.a,o,d.b,old. |
52420 | 63 ac 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c.new.a,new.b,new.c));...END;... |
52440 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
52460 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
52480 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
524a0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
524c0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
524e0 | 20 20 20 20 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 2c 6e 65 77 2e 61 2c 6e | .....last_insert_rowid(),new.a,n |
52500 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
52520 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
52540 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
52560 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
52580 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
525a0 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
525c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
525e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
52600 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
52620 | 6f 72 64 3b 0a 88 49 82 44 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..I.D......CREATE.TABLE.t1(a |
52640 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
52660 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
52680 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
526a0 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
526c0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
526e0 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
52700 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
52720 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
52740 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
52760 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
52780 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
527a0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
527c0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
527e0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
52800 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
52820 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
52840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
52860 | 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,o,d.b,old.c,new.a,new.b,new.c |
52880 | a9 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | .);...END;...CREATE.TRIGGER.r4.A |
528a0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
528c0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
528e0 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
52900 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
52920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
52940 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
52960 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
52980 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
529a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
529c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
529e0 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | t1.c+1;...SELd;...DELETE.FROM.re |
52a00 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
52a20 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
52a40 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
52a60 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 43 04 00 91 17 20 20 43 52 45 41 | CT.*.FROM.record;..I.C......CREA |
52a80 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
52aa0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
52ac0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
52ae0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
52b00 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
52b20 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
52b40 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
52b60 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
52b80 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
52ba0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
52bc0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
52be0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
52c00 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
52c20 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
52c40 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
52c60 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
52c80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
52ca0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,o,d.b,old.c,new. |
52cc0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
52ce0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
52d00 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
52d20 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
52d40 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
52d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
52d80 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
52da0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
52dc0 | 62 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | b,b).VALUES(1,2);...DELETE.FROM. |
52de0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
52e00 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
52e20 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 | UPDATE.SET.c=t1.c+1;...SELd;...D |
52e40 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
52e60 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
52e80 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
52ea0 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
52ec0 | 49 82 42 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | I.B......CREATE.TABLE.t1(a.INTEG |
52ee0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
52f00 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
52f20 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
52f40 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
52f60 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
52f80 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
52fa0 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
52fc0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
52fe0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
53000 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
53020 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
53040 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
53060 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
53080 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
530a0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
530c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
530e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 | .......................old.a,o,d |
53100 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
53120 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
53140 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
53160 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
53180 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
531a0 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
531c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,o,d.b,old.c, |
531e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
53200 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
53220 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
53240 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
53260 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
53280 | 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | ;...SELd;...DELETE.FROM.record;. |
532a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
532c0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
532e0 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
53300 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 41 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.A...7..CREATE.TAB |
53320 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
53340 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
53360 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
53380 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
533a0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
533c0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
533e0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
53400 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
53420 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
53440 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
53460 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
53480 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
534a0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
534c0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
534e0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
53500 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
53520 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
53540 | 20 20 20 20 6f 6c 64 2e 61 2c 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f | ....old.a,.sqlite_compileoption_ |
53560 | 75 73 65 64 28 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | used(1)));...END;...CREATE.TRIGG |
53580 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
535a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
535c0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
535e0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
53600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
53620 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
53640 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
53660 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
53680 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
536a0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
536c0 | 20 53 45 54 20 61 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.a=t1.c+1;...SELECT.*.FROM.r |
536e0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
53700 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
53720 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
53740 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
53760 | 20 72 65 63 6f 72 64 3b 0a 88 36 82 40 04 00 90 71 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..6.@...q..CREATE.TABLE. |
53780 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
537a0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
537c0 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
537e0 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
53800 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
53820 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
53840 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
53860 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
53880 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
538a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
538c0 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
538e0 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
53900 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
53920 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
53940 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
53960 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
53980 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
539a0 | 20 6f 20 67 6c 6f 62 28 31 2c 31 29 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 65 77 2e 63 29 29 3b | .o.glob(1,1),old.c,new.a,ew.c)); |
539c0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
539e0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
53a00 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
53a20 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
53a40 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
53a60 | 20 20 20 20 20 20 20 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | .......d.c,new.a,new.b,new.c));. |
53a80 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
53aa0 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
53ac0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
53ae0 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ).ON.CONFLICT(a).DO.UPDATE.SET.c |
53b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
53b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
53b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
53b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
53b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
53ba0 | 64 3b 0a 88 59 82 3f 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.?...7..CREATE.TABLE.t1(a.I |
53bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
53be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
53c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
53c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
53c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
53c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
53c80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
53ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
53cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
53ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
53d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
53d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
53d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
53d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
53d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
53da0 | 2c 70 72 69 6e 74 66 28 27 25 63 ac 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%c.%d,%d/%d,%d,%d',.... |
53dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 e1 80 ff ff ff 22 | ........................."....." |
53de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
53e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
53e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
53e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
53e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
53e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
53ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
53ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
53ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
53f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
53f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
53f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
53f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
53f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
53fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
53fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
53fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
54000 | 0d 00 00 00 07 01 e0 00 1b 99 17 69 13 1a 0e ca 0a 7d 06 30 01 e0 00 00 00 00 00 00 00 00 00 00 | ...........i.....}.0............ |
54020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
540a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
540c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
540e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
54180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
541a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
541c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
541e0 | 88 4c 82 4c 04 00 91 1d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .L.L......CREATE.TABLE.t1(a.INTE |
54200 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
54220 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
54240 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
54260 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
54280 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
542a0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
542c0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
542e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
54300 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
54320 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
54340 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
54360 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
54380 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
543a0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
543c0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
543e0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
54400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
54420 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
54440 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
54460 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
54480 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
544a0 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2e 2a 63 6f 6e 25 64 | fter-update',printf('%d,%.*con%d |
544c0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
544e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
54500 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
54520 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 2d 31 32 | NSERT.INTO.t1(a,b).VALUES(1,.-12 |
54540 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
54560 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
54580 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
545a0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
545c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
545e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e | O.t1(a,b).VALUES(1,2).....ON.CdN |
54600 | 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | FLICT(a).DO1.WHERE.c<0;...SELECT |
54620 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 4b 04 00 91 17 20 20 43 52 45 41 54 45 | .*.FROM.record;..I.K......CREATE |
54640 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
54660 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
54680 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
546a0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
546c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
546e0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
54700 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
54720 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
54740 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
54760 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
54780 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
547a0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
547c0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
547e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
54800 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
54820 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
54840 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
54860 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
54880 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
548a0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
548c0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
548e0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
54900 | 6e 74 66 28 27 25 64 2c 25 21 51 55 45 52 59 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%!QUERYd,%d,%d',........ |
54920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
54940 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
54960 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
54980 | 63 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | c).VALUES(1,2);...DELETE.FROM.re |
549a0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
549c0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
549e0 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | DATE.SET.c=t1.c+1;...SELECT.*.FR |
54a00 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | OM.record;...DELETE.FROM.record; |
54a20 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
54a40 | 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 | 2).....ON.CdNFLICT(a).DO1.WHERE. |
54a60 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 | c<0;...SELECT.*.FROM.record;..I. |
54a80 | 4a 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | J......CREATE.TABLE.t1(a.INTEGER |
54aa0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
54ac0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
54ae0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
54b00 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
54b20 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
54b40 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
54b60 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
54b80 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
54ba0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
54bc0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
54be0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
54c00 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
54c20 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
54c40 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
54c60 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
54c80 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
54ca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
54cc0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
54ce0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
54d00 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
54d20 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
54d40 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 21 51 55 45 52 59 64 2c 25 64 | r-update',printf('%d,%!QUERYd,%d |
54d60 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
54d80 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
54da0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
54dc0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
54de0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
54e00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
54e20 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
54e40 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
54e60 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
54e80 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CdNFLICT( |
54ea0 | 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | a).DO1.WHERE.c<0;...SELECT.*.FRO |
54ec0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 4c 82 49 04 00 91 1d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..L.I......CREATE.TABLE |
54ee0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
54f00 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
54f20 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
54f40 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
54f60 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
54f80 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
54fa0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
54fc0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
54fe0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
55000 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
55020 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
55040 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
55060 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
55080 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
550a0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
550c0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
550e0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
55100 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
55120 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
55140 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
55160 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
55180 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
551a0 | 64 2c 25 20 2d 31 2e 51 55 45 52 59 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | d,%.-1.QUERYd,%d,%d',........... |
551c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
551e0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
55200 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 | );...END;...INSERT.INTO.t1(a,c). |
55220 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
55240 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
55260 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
55280 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
552a0 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
552c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
552e0 | 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 | ....ON.CdNFLICT(a).DO1.WHERE.c<0 |
55300 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 82 48 04 00 | ;...SELECT.*.FROM.record;..K.H.. |
55320 | 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
55340 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
55360 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
55380 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
553a0 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
553c0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
553e0 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-insert',printf('%d,%d,%d |
55400 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
55420 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
55440 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
55460 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
55480 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
554a0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
554c0 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
554e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
55500 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
55520 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
55540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
55560 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
55580 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
555a0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
555c0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
555e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 20 2a 2e 2a 73 6f 6e 25 64 2c 25 64 2c | pdate',printf('%d,%.*.*son%d,%d, |
55600 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
55620 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
55640 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
55660 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
55680 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
556a0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
556c0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
556e0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
55700 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
55720 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CdNFLICT(a |
55740 | 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | ).DO1.WHERE.c<0;...SELECT.*.FROM |
55760 | 20 72 65 63 6f 72 64 3b 0a 88 2c 82 47 04 00 90 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..,.G...]..CREATE.TABLE. |
55780 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
557a0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
557c0 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
557e0 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
55800 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
55820 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
55840 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
55860 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
55880 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
558a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
558c0 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
558e0 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
55900 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
55920 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
55940 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
55960 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
55980 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
559a0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
559c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
559e0 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
55a00 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
55a20 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
55a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
55a60 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
55a80 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
55aa0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
55ac0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
55ae0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
55b00 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
55b20 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 39 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.F9OM.record;...I |
55b40 | 4e 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | N).VALUES(1,2).....ON.CONFLICT(a |
55b60 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
55b80 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 63 82 46 04 00 91 | ...SELECT.*.FROM.record;..c.F... |
55ba0 | 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | K..CREATE.TABLE.t1(a.INTEGER.PRI |
55bc0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
55be0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
55c00 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
55c20 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
55c40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
55c60 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
55c80 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
55ca0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
55cc0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
55ce0 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
55d00 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
55d20 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
55d40 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
55d60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
55d80 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
55da0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
55dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
55de0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 20 67 6c 6f 62 28 31 2c 31 29 29 | .c,new.a,new.b,new.c).glob(1,1)) |
55e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
55e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
55e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
55e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
55e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
55ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
55ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
55ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
55f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
55f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
55f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
55f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
55f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
55fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
55fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
55fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
56000 | 0d 00 00 00 07 01 e5 00 1b b3 17 66 13 19 0e cc 0a 7f 06 32 01 e5 00 00 00 00 00 00 00 00 00 00 | ...........f.......2............ |
56020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
560a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
560c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
560e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
56180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
561a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
561c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
561e0 | 00 00 00 00 00 88 49 82 53 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ......I.S......CREATE.TABLE.t1(a |
56200 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
56220 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
56240 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
56260 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
56280 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
562a0 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
562c0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
562e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
56300 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
56320 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
56340 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
56360 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
56380 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
563a0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
563c0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
563e0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
56400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
56420 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
56440 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
56460 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
56480 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
564a0 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2e 73 | ES('after-update',printf('%d,%.s |
564c0 | 6f 6e 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | on/%d,%d,%d',................... |
564e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
56500 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
56520 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
56540 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
56560 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
56580 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
565a0 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
565c0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
565e0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
56600 | 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | dNFLICT(a).DO1.WHERE.c<0;...SELE |
56620 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 52 04 00 91 17 20 20 43 52 45 41 | CT.*.FROM.record;..I.R......CREA |
56640 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
56660 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
56680 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
566a0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
566c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
566e0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
56700 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
56720 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
56740 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
56760 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
56780 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
567a0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
567c0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
567e0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
56800 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
56820 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
56840 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
56860 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
56880 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
568a0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
568c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
568e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
56900 | 72 69 6e 74 66 28 27 25 64 2c 25 2e 51 55 45 52 59 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%.QUERYd,%d,%d',...... |
56920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
56940 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
56960 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
56980 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
569a0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
569c0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
569e0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
56a00 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
56a20 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
56a40 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 | 1,2).....ON.CdNFLICT(a).DO1.WHER |
56a60 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
56a80 | 49 82 51 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | I.Q......CREATE.TABLE.t1(a.INTEG |
56aa0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
56ac0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
56ae0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
56b00 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
56b20 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
56b40 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
56b60 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
56b80 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
56ba0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
56bc0 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
56be0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
56c00 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
56c20 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
56c40 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
56c60 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
56c80 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
56ca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
56cc0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
56ce0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
56d00 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
56d20 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
56d40 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2e 39 63 6f 6e 25 64 2c | ter-update',printf('%d,%.9con%d, |
56d60 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
56d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
56da0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
56dc0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
56de0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
56e00 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
56e20 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
56e40 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
56e60 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
56e80 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CdNFLIC |
56ea0 | 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | T(a).DO1.WHERE.c<0;...SELECT.*.F |
56ec0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 50 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..I.P......CREATE.TAB |
56ee0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
56f00 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
56f20 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
56f40 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
56f60 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
56f80 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
56fa0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
56fc0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
56fe0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
57000 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
57020 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
57040 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
57060 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
57080 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
570a0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
570c0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
570e0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
57100 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
57120 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
57140 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
57160 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
57180 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
571a0 | 27 25 64 2c 25 2e 37 63 6f 6e 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%.7con%d,%d,%d',............ |
571c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
571e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
57200 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
57220 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
57240 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
57260 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
57280 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
572a0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
572c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
572e0 | 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b | ...ON.CdNFLICT(a).DO1.WHERE.c<0; |
57300 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 4f 04 00 91 | ...SELECT.*.FROM.record;..I.O... |
57320 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
57340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
57360 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
57380 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
573a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
573c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
573e0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
57400 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
57420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
57440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
57460 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
57480 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
574a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
574c0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
574e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
57500 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
57520 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
57540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
57560 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
57580 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
575a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
575c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
575e0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2e 35 63 6f 6e 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%.5con%d,%d,%d' |
57600 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
57620 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
57640 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
57660 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
57680 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
576a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
576c0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
576e0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
57700 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
57720 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CdNFLICT(a).D |
57740 | 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | O1.WHERE.c<0;...SELECT.*.FROM.re |
57760 | 63 6f 72 64 3b 0a 88 49 82 4e 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I.N......CREATE.TABLE.t1( |
57780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
577a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
577c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
577e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
57800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
57820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
57840 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
57860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
57880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
578a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
578c0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
578e0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
57900 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
57920 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
57940 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
57960 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
57980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
579a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
579c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
579e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
57a00 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
57a20 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 2e | UES('after-update',printf('%d,%. |
57a40 | 2a 73 6f 6e 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | *son%d,%d,%d',.................. |
57a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
57a80 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
57aa0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
57ac0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
57ae0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
57b00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
57b20 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
57b40 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
57b60 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
57b80 | 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | CdNFLICT(a).DO1.WHERE.c<0;...SEL |
57ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 4d 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.M......CRE |
57bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
57be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
57c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
57c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
57c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
57c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
57c80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
57ca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
57cc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
57ce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
57d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
57d20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
57d40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
57d60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
57d80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
57da0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
57dc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
57de0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
57e00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
57e20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
57e40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
57e60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
57e80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 2e 2a 63 6f 6e 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%.*con%d,%d,%d',..... |
57ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
57ec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
57ee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
57f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 36 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,6);...DELETE.FROM |
57f20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
57f40 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
57f60 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
57f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
57fa0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
57fc0 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 | (1,2).....ON.CdNFLICT(a).DO1.WHE |
57fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
58000 | 0d 00 00 00 07 01 93 00 1b b3 17 56 13 03 0e aa 0a 4d 05 f0 01 93 00 00 00 00 00 00 00 00 00 00 | ...........V.....M.............. |
58020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
580a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
580c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
580e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
58180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 82 5a 04 00 91 37 20 20 43 52 45 | ....................Y.Z...7..CRE |
581a0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
581c0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
581e0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
58200 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
58220 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
58240 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
58260 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
58280 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
582a0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
582c0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
582e0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
58300 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
58320 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
58340 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
58360 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
58380 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
583a0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
583c0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
583e0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
58400 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
58420 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
58440 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
58460 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
58480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
584a0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
584c0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
584e0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
58500 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
58520 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
58540 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
58560 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
58580 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
585a0 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
585c0 | 54 45 20 53 45 54 20 63 3d 63 2b 20 72 6f 75 6e 64 28 31 2c 31 29 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+.round(1,1);...SELECT |
585e0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 59 04 00 91 37 20 20 43 52 45 41 54 45 | .*.FROM.record;..Y.Y...7..CREATE |
58600 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
58620 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
58640 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
58660 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
58680 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
586a0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
586c0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
586e0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
58700 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
58720 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
58740 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
58760 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
58780 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
587a0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
587c0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
587e0 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
58800 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
58820 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
58840 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
58860 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
58880 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
588a0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
588c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
588e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
58900 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
58920 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
58940 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
58960 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
58980 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
589a0 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | DATE.SET.c=t1.c+1;...SELECT.*.FR |
589c0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | OM.record;...DELETE.FROM.record; |
589e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 61 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,a).VALUES(1, |
58a00 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
58a20 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
58a40 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 58 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..Y.X...7..CREATE.TA |
58a60 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
58a80 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
58aa0 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
58ac0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
58ae0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
58b00 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
58b20 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
58b40 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
58b60 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
58b80 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
58ba0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
58bc0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
58be0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
58c00 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
58c20 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
58c40 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
58c60 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
58c80 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
58ca0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
58cc0 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
58ce0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
58d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
58d20 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
58d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
58d60 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
58d80 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
58da0 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
58dc0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
58de0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
58e00 | 45 20 53 45 54 20 61 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.a=t1.c+1;...SELECT.*.FROM. |
58e20 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
58e40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
58e60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
58e80 | 20 61 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .a=c+1.WHERE.c<0;...SELECT.*.FRO |
58ea0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 55 82 57 04 00 91 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..U.W.../..CREATE.TABLE |
58ec0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
58ee0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
58f00 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
58f20 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
58f40 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
58f60 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
58f80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
58fa0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
58fc0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
58fe0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
59000 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
59020 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
59040 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
59060 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
59080 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
590a0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
590c0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
590e0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
59100 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
59120 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
59140 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
59160 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
59180 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
591a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
591c0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
591e0 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
59200 | 55 45 53 28 31 20 67 6c 6f 62 28 31 2c 31 29 49 53 4e 55 4c 4c 2c 32 29 3b 0a 20 20 54 45 20 46 | UES(1.glob(1,1)ISNULL,2);...TE.F |
59220 | 52 4f 4d 20 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | ROM..INTO.t1(a,b).VALUES(1,2)... |
59240 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
59260 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
59280 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
592a0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
592c0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
592e0 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
59300 | 64 3b 0a 88 4f 82 56 04 00 91 23 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..O.V...#..CREATE.TABLE.t1(a.I |
59320 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
59340 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
59360 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
59380 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
593a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
593c0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
593e0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
59400 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
59420 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
59440 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
59460 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
59480 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
594a0 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
594c0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
594e0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
59500 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
59520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
59540 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
59560 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
59580 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
595a0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
595c0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
595e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
59600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
59620 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
59640 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 20 67 | ..INSERT.INTO.t1(a,b).VALUES(1.g |
59660 | 6c 6f 62 28 20 40 31 29 2c 32 29 3b 0a 20 20 54 45 20 46 52 4f 4d 20 20 49 4e 54 4f 20 74 31 28 | lob(.@1),2);...TE.FROM..INTO.t1( |
59680 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
596a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
596c0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
596e0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
59700 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
59720 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
59740 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 55 04 00 91 37 20 20 | SELECT.*.FROM.record;..Y.U...7.. |
59760 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
59780 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
597a0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
597c0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
597e0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
59800 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
59820 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
59840 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
59860 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
59880 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
598a0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
598c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
598e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
59900 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
59920 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
59940 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
59960 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
59980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
599a0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
599c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
599e0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
59a00 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
59a20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
59a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
59a60 | 20 20 20 20 20 22 61 22 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | ....."a".a,old.b,old.c,new.a,new |
59a80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
59aa0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
59ac0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
59ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
59b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
59b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
59b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
59b60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
59b80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
59ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 54 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.T......CRE |
59bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
59be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
59c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
59c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
59c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
59c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
59c80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
59ca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
59cc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
59ce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
59d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
59d20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
59d40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
59d60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
59d80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
59da0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
59dc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
59de0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
59e00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
59e20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
59e40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
59e60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
59e80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
59ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
59ec0 | 20 20 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 2c | ...sqlite_compileoption_used(1), |
59ee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
59f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
59f20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
59f40 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
59f60 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 | .UPDATE.SET.c=.strftime(1,1,1,1) |
59f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .FROM.recor.record;...INSERT.INT |
59fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
59fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
59fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
5a000 | 0d 00 00 00 07 01 60 00 1b a3 17 46 12 e9 0e 8c 0a 2f 05 cb 01 60 00 00 00 00 00 00 00 00 00 00 | ......`....F...../...`.......... |
5a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5a160 | 88 67 82 61 04 00 91 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .g.a...S..CREATE.TABLE.t1(a.INTE |
5a180 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
5a1a0 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
5a1c0 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
5a1e0 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
5a200 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
5a220 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
5a240 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
5a260 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
5a280 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
5a2a0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
5a2c0 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
5a2e0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
5a300 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
5a320 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
5a340 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
5a360 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
5a380 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
5a3a0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
5a3c0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
5a3e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
5a400 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
5a420 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
5a440 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
5a460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
5a480 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
5a4a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
5a4c0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
5a4e0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
5a500 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
5a520 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 | 1;...SELECT.*.FROM.record;EXPLAI |
5a540 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 | N...DELETE.FROM.record;EXPLAIN.. |
5a560 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
5a580 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
5a5a0 | 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T.c=c+1.WHERE.c<0;...SELECT.*.FR |
5a5c0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 82 60 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c | OM.record;..`.`...E..CREATE.TABL |
5a5e0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
5a600 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
5a620 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
5a640 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
5a660 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
5a680 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
5a6a0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
5a6c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
5a6e0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
5a700 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
5a720 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
5a740 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
5a760 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
5a780 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
5a7a0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
5a7c0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
5a7e0 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
5a800 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
5a820 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
5a840 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
5a860 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
5a880 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
5a8a0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
5a8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
5a8e0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
5a900 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
5a920 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
5a940 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
5a960 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
5a980 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
5a9a0 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 | cord;...DELETE.FROM.record;EXPLA |
5a9c0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | IN...INSERT.INTO.t1(a,b).VALUES( |
5a9e0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
5aa00 | 45 20 53 45 54 20 61 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.a=c+1.WHERE.c<0;...SELECT. |
5aa20 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 5f 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y._...7..CREATE. |
5aa40 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
5aa60 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
5aa80 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
5aaa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
5aac0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
5aae0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
5ab00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
5ab20 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
5ab40 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
5ab60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
5ab80 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
5aba0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
5abc0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
5abe0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
5ac00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
5ac20 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
5ac40 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
5ac60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
5ac80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
5aca0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
5acc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
5ace0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
5ad00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
5ad20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
5ad40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
5ad60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
5ad80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
5ada0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
5adc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
5ade0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
5ae00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
5ae20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 62 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(b,b).VALUES(1,2 |
5ae40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
5ae60 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
5ae80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 5e 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.^...7..CREATE.TAB |
5aea0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
5aec0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
5aee0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
5af00 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
5af20 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
5af40 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
5af60 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
5af80 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
5afa0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
5afc0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
5afe0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
5b000 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
5b020 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
5b040 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
5b060 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
5b080 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
5b0a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
5b0c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
5b0e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
5b100 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
5b120 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
5b140 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
5b160 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
5b180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
5b1a0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
5b1c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
5b1e0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
5b200 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
5b220 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
5b240 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
5b260 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
5b280 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
5b2a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 28 | ...ON.CONFLICT(a).DO.UPDATE.SET( |
5b2c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
5b2e0 | 20 72 65 63 6f 72 64 3b 0a 88 59 82 5d 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.]...7..CREATE.TABLE. |
5b300 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
5b320 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
5b340 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
5b360 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
5b380 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
5b3a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
5b3c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
5b3e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
5b400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
5b420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
5b440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
5b460 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
5b480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
5b4a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
5b4c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
5b4e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
5b500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
5b520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
5b540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
5b560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
5b580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
5b5a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
5b5c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
5b5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
5b600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
5b620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
5b640 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
5b660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
5b680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
5b6a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
5b6c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
5b6e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
5b700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
5b720 | 2b 31 20 57 48 45 52 45 40 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE@c<0;...SELECT.*.FROM.re |
5b740 | 63 6f 72 64 3b 0a 88 59 82 5c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.\...7..CREATE.TABLE.t1( |
5b760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
5b780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
5b7a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
5b7c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
5b7e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
5b800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
5b820 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
5b840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
5b860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
5b880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
5b8a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
5b8c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
5b8e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
5b900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
5b920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
5b940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
5b960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
5b980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
5b9a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
5b9c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
5b9e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
5ba00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
5ba20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
5ba40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
5ba60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
5ba80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
5baa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
5bac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
5bae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
5bb00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
5bb20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
5bb40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
5bb60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
5bb80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 61 2c 62 6f 72 | WHERE.c<0;...SELECT.*.FROM.a,bor |
5bba0 | 64 3b 0a 88 59 82 5b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.[...7..CREATE.TABLE.t1(a.I |
5bbc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
5bbe0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
5bc00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
5bc20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
5bc40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
5bc60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
5bc80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
5bca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
5bcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
5bce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
5bd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
5bd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
5bd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
5bd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
5bd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
5bda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
5bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
5bde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
5be00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
5be20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
5be40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
5be60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
5be80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
5bea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
5bec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
5bee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
5bf00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
5bf20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
5bf40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
5bf60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
5bf80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
5bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
5bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 00 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
5bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
5c000 | 0d 00 00 00 07 01 39 00 1b 9c 17 38 12 cd 0e 70 0a 05 05 96 01 39 00 00 00 00 00 00 00 00 00 00 | ......9....8...p.....9.......... |
5c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 82 68 04 00 91 | ..........................Y.h... |
5c140 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
5c160 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
5c180 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
5c1a0 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
5c1c0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
5c1e0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
5c200 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
5c220 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
5c240 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
5c260 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
5c280 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
5c2a0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
5c2c0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
5c2e0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
5c300 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
5c320 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
5c340 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
5c360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
5c380 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
5c3a0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
5c3c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
5c3e0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
5c400 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
5c420 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
5c440 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
5c460 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 52 45 50 4c 41 43 45 20 49 | new.b,new.c));...END;..REPLACE.I |
5c480 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
5c4a0 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;..REPLACE.INTO.t1( |
5c4c0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
5c4e0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
5c500 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
5c520 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
5c540 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
5c560 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
5c580 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6b 82 67 04 00 91 5b 20 20 | SELECT.*.FROM.record;..k.g...[.. |
5c5a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
5c5c0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
5c5e0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
5c600 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
5c620 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
5c640 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
5c660 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
5c680 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
5c6a0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
5c6c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
5c6e0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
5c700 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
5c720 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
5c740 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
5c760 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
5c780 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
5c7a0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
5c7c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
5c7e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
5c800 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
5c820 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
5c840 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
5c860 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
5c880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
5c8a0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
5c8c0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
5c8e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 45 58 50 4c 41 49 4e 20 51 55 45 | .t1(a,b).VALUES(1,2);EXPLAIN.QUE |
5c900 | 52 59 20 50 4c 41 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | RY.PLAN...DELETE.FROM.record;... |
5c920 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
5c940 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
5c960 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
5c980 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
5c9a0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
5c9c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
5c9e0 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
5ca00 | 6f 72 64 3b 0a 88 67 82 66 04 00 91 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..g.f...S..CREATE.TABLE.t1(a |
5ca20 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
5ca40 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
5ca60 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
5ca80 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
5caa0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
5cac0 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
5cae0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
5cb00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
5cb20 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
5cb40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
5cb60 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
5cb80 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
5cba0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
5cbc0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
5cbe0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
5cc00 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
5cc20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
5cc40 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
5cc60 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
5cc80 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
5cca0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
5ccc0 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
5cce0 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
5cd00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
5cd20 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
5cd40 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
5cd60 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 | ,2);...DELETE.FROM.record;EXPLAI |
5cd80 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | N...INSERT.INTO.t1(a,b).VALUES(1 |
5cda0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
5cdc0 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
5cde0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c | ecord;...DELETE.FROM.record;EXPL |
5ce00 | 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | AIN...INSERT.INTO.t1(a,b).VALUES |
5ce20 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
5ce40 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
5ce60 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 65 04 00 91 37 20 20 43 52 45 41 54 45 | .*.FROM.record;..Y.e...7..CREATE |
5ce80 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
5cea0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
5cec0 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
5cee0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
5cf00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
5cf20 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
5cf40 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
5cf60 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
5cf80 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
5cfa0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
5cfc0 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
5cfe0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
5d000 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
5d020 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
5d040 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
5d060 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
5d080 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
5d0a0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
5d0c0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
5d0e0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
5d100 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
5d120 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
5d140 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
5d160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
5d180 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
5d1a0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
5d1c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
5d1e0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
5d200 | 45 53 28 31 2c 3f 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,?).....ON.CONFLICT(a).DO.UP |
5d220 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | DATE.SET.c=t1.c+1;...SELECT.*.FR |
5d240 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | OM.record;...DELETE.FROM.record; |
5d260 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
5d280 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
5d2a0 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
5d2c0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 67 82 64 04 00 91 53 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..g.d...S..CREATE.TA |
5d2e0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
5d300 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
5d320 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
5d340 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
5d360 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
5d380 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
5d3a0 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
5d3c0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
5d3e0 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
5d400 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
5d420 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
5d440 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
5d460 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
5d480 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
5d4a0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
5d4c0 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
5d4e0 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
5d500 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
5d520 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
5d540 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
5d560 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
5d580 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
5d5a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
5d5c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
5d5e0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
5d600 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
5d620 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
5d640 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
5d660 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
5d680 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 45 58 50 4c 41 49 4e 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=t1.c+1;EXPLAIN...SELECT. |
5d6a0 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | *.FROM.record;...DELETE.FROM.rec |
5d6c0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
5d6e0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
5d700 | 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 45 58 50 4c 41 49 4e 0a | ATE.SET.c=c+1.WHERE.c<0;EXPLAIN. |
5d720 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 82 63 04 00 91 45 | ..SELECT.*.FROM.record;..`.c...E |
5d740 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
5d760 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
5d780 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
5d7a0 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
5d7c0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
5d7e0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
5d800 | 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | efore-insert',printf('%d,%d,%d', |
5d820 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
5d840 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.INSERT.ON. |
5d860 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
5d880 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
5d8a0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
5d8c0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
5d8e0 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
5d900 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
5d920 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
5d940 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
5d960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
5d980 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
5d9a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
5d9c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
5d9e0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
5da00 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
5da20 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
5da40 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
5da60 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
5da80 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
5daa0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
5dac0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
5dae0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 45 58 50 4c 41 49 | a).DO.UPDATE.SET.c=t1.c+1;EXPLAI |
5db00 | 4e 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | N...SELECT.*.FROM.record;...DELE |
5db20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
5db40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
5db60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
5db80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 82 62 | <0;...SELECT.*.FROM.record;..`.b |
5dba0 | 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...E..CREATE.TABLE.t1(a.INTEGER. |
5dbc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
5dbe0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
5dc00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
5dc20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
5dc40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
5dc60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
5dc80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
5dca0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
5dcc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
5dce0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
5dd00 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
5dd20 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
5dd40 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
5dd60 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
5dd80 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
5dda0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
5ddc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
5dde0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
5de00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
5de20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
5de40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
5de60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
5de80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
5dea0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
5dec0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
5dee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
5df00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
5df20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
5df40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 45 58 | ICT(a).DO.UPDATE.SET.c=t1.c+1;EX |
5df60 | 50 4c 41 49 4e 0a 20 20 53 45 4c 45 43 54 20 20 27 61 27 27 62 27 72 65 63 6f 72 64 3b 0a 20 20 | PLAIN...SELECT..'a''b'record;... |
5df80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
5dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
5dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
5dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
5e000 | 0d 00 00 00 07 01 8a 00 1b 9c 17 3f 12 db 0e 7e 0a 44 05 e7 01 8a 00 00 00 00 00 00 00 00 00 00 | ...........?...~.D.............. |
5e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
5e180 | 00 00 00 00 00 00 00 00 00 00 88 59 82 6f 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | ...........Y.o...7..CREATE.TABLE |
5e1a0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
5e1c0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
5e1e0 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
5e200 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
5e220 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
5e240 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
5e260 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
5e280 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
5e2a0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
5e2c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
5e2e0 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
5e300 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
5e320 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
5e340 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
5e360 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
5e380 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
5e3a0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 | d',......................"a","b" |
5e3c0 | 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | "a","b",old.b,old.c,new.a,new.b, |
5e3e0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
5e400 | 20 72 34 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.INSERT.ON.t1.BEGIN.... |
5e420 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
5e440 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
5e460 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
5e480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 | ..............sqlite_compileopti |
5e4a0 | 6f 6e 5f 75 73 65 64 28 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | on_used(1),new.a,new.b,new.c));. |
5e4c0 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(a,b).VAL |
5e4e0 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
5e500 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
5e520 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
5e540 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | ET.c=t1.c+1;...SELECT.*.FROM.rec |
5e560 | 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ord;...DELETE.FROM.record;...INS |
5e580 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
5e5a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
5e5c0 | 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | c+1.WHERE.c<0;...SELECT.*.FROM.r |
5e5e0 | 65 63 6f 72 64 3b 0a 88 59 82 6e 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ecord;..Y.n...7..CREATE.TABLE.t1 |
5e600 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
5e620 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
5e640 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
5e660 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
5e680 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
5e6a0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
5e6c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
5e6e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
5e700 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
5e720 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
5e740 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
5e760 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
5e780 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
5e7a0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
5e7c0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
5e7e0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
5e800 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 66 66 69 6e 69 74 | .........................affinit |
5e820 | 79 28 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | y(1),old.b,old.c,new.a,new.b,new |
5e840 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
5e860 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
5e880 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
5e8a0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
5e8c0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
5e8e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
5e900 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
5e920 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
5e940 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
5e960 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
5e980 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
5e9a0 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
5e9c0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
5e9e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
5ea00 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
5ea20 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
5ea40 | 72 64 3b 0a 88 36 82 6d 04 00 90 71 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..6.m...q..CREATE.TABLE.t1(a. |
5ea60 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
5ea80 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
5eaa0 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
5eac0 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
5eae0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
5eb00 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
5eb20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
5eb40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
5eb60 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
5eb80 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
5eba0 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
5ebc0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
5ebe0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
5ec00 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
5ec20 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
5ec40 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
5ec60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 73 6f 6e 5f 6f 62 | .........................json_ob |
5ec80 | 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 2c 6e 65 77 2e 61 2c 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ject(1,1,1,1),new.a,ew.c));...EN |
5eca0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
5ecc0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
5ece0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
5ed00 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
5ed20 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
5ed40 | 20 20 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | ..d.c,new.a,new.b,new.c));...END |
5ed60 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
5ed80 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
5eda0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 | ERT.INTO.t1(a,b).VALUES(1,2).ON. |
5edc0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
5ede0 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
5ee00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
5ee20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
5ee40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
5ee60 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 | .c<0;...SELECT.*.FROM.record;..Y |
5ee80 | 82 6c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .l...7..CREATE.TABLE.t1(a.INTEGE |
5eea0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
5eec0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
5eee0 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
5ef00 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
5ef20 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
5ef40 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
5ef60 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
5ef80 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
5efa0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
5efc0 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
5efe0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
5f000 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
5f020 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
5f040 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
5f060 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
5f080 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
5f0a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e | ...................."a","b",old. |
5f0c0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
5f0e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
5f100 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
5f120 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
5f140 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
5f160 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
5f180 | 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | ..........."a","b",old.b,old.c,n |
5f1a0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 | ew.a,new.b,new.c));...END;...INS |
5f1c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 | ERT.INTO.t1(a,b).VALUES(1,2);... |
5f1e0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
5f200 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
5f220 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b | FLICT(a).DO.UPDATE.SET.c=t1.c+1; |
5f240 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 | ...SELECT.*.FROM.record;...DELET |
5f260 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
5f280 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
5f2a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c | (a).DO.UPDATE.SET.c=c+1.WHERE.c< |
5f2c0 | 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 82 6b 04 | 0;...SELECT.*.FROM.record;..`.k. |
5f2e0 | 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..E..CREATE.TABLE.t1(a.INTEGER.P |
5f300 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
5f320 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
5f340 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
5f360 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
5f380 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
5f3a0 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-insert',printf('%d,%d,% |
5f3c0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
5f3e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
5f400 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
5f420 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
5f440 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
5f460 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
5f480 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
5f4a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
5f4c0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
5f4e0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
5f500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f | ................."a","b",old.b,o |
5f520 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
5f540 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 | ...CREATE.TRIGGER.r4.AFTER.UPDAT |
5f560 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
5f580 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | cord(x,y).........VALUES('after- |
5f5a0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
5f5c0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
5f5e0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
5f600 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 | a,new.b,new.c));...END;...INSERT |
5f620 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c | .INTO.t1(a,b).VALUES(1,2);...DEL |
5f640 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
5f660 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
5f680 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 | CT(a).DO.UPDATE.SET.c=t1.c+1;... |
5f6a0 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | SELECT.*.FROM.record;...DELETE.F |
5f6c0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
5f6e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
5f700 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
5f720 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 41 4e 41 4c 59 5a 45 0a 88 | ..SELECT.*.FROM.record;ANALYZE.. |
5f740 | 59 82 6a 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | Y.j...7..CREATE.TABLE.t1(a.INTEG |
5f760 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
5f780 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
5f7a0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
5f7c0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
5f7e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
5f800 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
5f820 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
5f840 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
5f860 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
5f880 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
5f8a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
5f8c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
5f8e0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
5f900 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
5f920 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
5f940 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
5f960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 | ....................."a","b",old |
5f980 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
5f9a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
5f9c0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
5f9e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
5fa00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
5fa20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
5fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 28 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old(a,old.b,old.c, |
5fa60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
5fa80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
5faa0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
5fac0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
5fae0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
5fb00 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
5fb20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
5fb40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
5fb60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
5fb80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 82 69 | <0;...SELECT.*.FROM.record;..`.i |
5fba0 | 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...E..CREATE.TABLE.t1(a.INTEGER. |
5fbc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
5fbe0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
5fc00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
5fc20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
5fc40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
5fc60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
5fc80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
5fca0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
5fcc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
5fce0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
5fd00 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
5fd20 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
5fd40 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
5fd60 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
5fd80 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
5fda0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
5fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
5fde0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
5fe00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 a0 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
5fe20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
5fe40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
5fe60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
5fe80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
5fea0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
5fec0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
5fee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
5ff00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
5ff20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
5ff40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
5ff60 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
5ff80 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | FROM.record;EXPLAIN...INSERT.INT |
5ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
5ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
5ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
60000 | 0d 00 00 00 07 01 89 00 1b 9d 17 40 12 e3 0e 86 0a 29 05 dc 01 89 00 00 00 00 00 00 00 00 00 00 | ...........@.....).............. |
60020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
600a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
600c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
600e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
60180 | 00 00 00 00 00 00 00 00 00 88 4f 82 76 04 00 91 23 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ..........O.v...#..CREATE.TABLE. |
601a0 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
601c0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
601e0 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
60200 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
60220 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
60240 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
60260 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
60280 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
602a0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
602c0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
602e0 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
60300 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
60320 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
60340 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
60360 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
60380 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
603a0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | ',...............old.a,old.b,old |
603c0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
603e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
60400 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
60420 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
60440 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
60460 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
60480 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
604a0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
604c0 | 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(c,b).VALUES(1,2);...DELET |
604e0 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
60500 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | a,b).VALUES(1,2).ON.CONFLICT(a). |
60520 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
60540 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 20 69 6e 74 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .*.FROM.record.int;...DELETE.FRO |
60560 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
60580 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
605a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
605c0 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 49 82 75 | SELECT.*.FROM.record;VACUUM..I.u |
605e0 | 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t1(a.INTEGER. |
60600 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
60620 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
60640 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
60660 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
60680 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
606a0 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
606c0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
606e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
60700 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
60720 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
60740 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
60760 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
60780 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
607a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
607c0 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
607e0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
60800 | 20 20 20 20 20 62 2c 6e 65 77 2e 63 29 29 20 20 20 20 20 20 6f 6c 64 2e 64 2e 62 2c 6f 6c 64 2e | .....b,new.c))......old.d.b,old. |
60820 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
60840 | 34 20 41 46 54 48 45 4e 54 45 52 20 55 50 44 41 54 45 64 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | 4.AFTHENTER.UPDATEdON.t1.BEGIN.. |
60860 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 07 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record.x,y)...... |
60880 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
608a0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
608c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
608e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
60900 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
60920 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 3f 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.F?OM.record |
60940 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
60960 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 ff 7f ff ff | ,2).....ON.CONFLICT(a).DO.UP.... |
60980 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
609a0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 00 00 00 64 0a 20 20 49 | ecord;...DELETE.FROM.rec...d...I |
609c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
609e0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
60a00 | 63 3d 63 2b 31 20 57 50 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WPERE.c<0;...SELECT.*.FROM |
60a20 | 20 72 65 63 6f 72 64 3b 0a 88 59 82 74 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.t...7..CREATE.TABLE. |
60a40 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
60a60 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
60a80 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
60aa0 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
60ac0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
60ae0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
60b00 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
60b20 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
60b40 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
60b60 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
60b80 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
60ba0 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
60bc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
60be0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
60c00 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
60c20 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
60c40 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 74 72 66 74 69 6d 65 28 31 2c | ',...................strftime(1, |
60c60 | 31 2c 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | 1,1,1),old.b,old.c,new.a,new.b,n |
60c80 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
60ca0 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
60cc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
60ce0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
60d00 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
60d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
60d40 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
60d60 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
60d80 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
60da0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
60dc0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
60de0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
60e00 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
60e20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
60e40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
60e60 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
60e80 | 63 6f 72 64 3b 0a 88 59 82 73 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.s...7..CREATE.TABLE.t1( |
60ea0 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
60ec0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
60ee0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
60f00 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
60f20 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
60f40 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
60f60 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
60f80 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
60fa0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
60fc0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
60fe0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
61000 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
61020 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
61040 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
61060 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
61080 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
610a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 | ..................json_array(1,1 |
610c0 | 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | ,1),old.b,old.c,new.a,new.b,new. |
610e0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
61100 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
61120 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
61140 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
61160 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
61180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
611a0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
611c0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
611e0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
61200 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
61220 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
61240 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
61260 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
61280 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
612a0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
612c0 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
612e0 | 64 3b 0a 88 59 82 72 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.r...7..CREATE.TABLE.t1(a.I |
61300 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
61320 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
61340 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
61360 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
61380 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
613a0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
613c0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
613e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
61400 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
61420 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
61440 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
61460 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
61480 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
614a0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
614c0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
614e0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
61500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 | .................."a","b""a","b" |
61520 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
61540 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
61560 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
61580 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
615a0 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
615c0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
615e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
61600 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
61620 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
61640 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
61660 | 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(c,b).VALUES(1,2).....O |
61680 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
616a0 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
616c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
616e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
61700 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
61720 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
61740 | 88 59 82 71 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .Y.q...7..CREATE.TABLE.t1(a.INTE |
61760 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
61780 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
617a0 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
617c0 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
617e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
61800 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
61820 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
61840 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
61860 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
61880 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
618a0 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
618c0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
618e0 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
61900 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
61920 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
61940 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
61960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 2c 6f 6c | ..............."a","b""a","b",ol |
61980 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
619a0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
619c0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
619e0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
61a00 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
61a20 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
61a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
61a60 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
61a80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
61aa0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
61ac0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
61ae0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
61b00 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
61b20 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
61b40 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
61b60 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c;1.WHERE. |
61b80 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5f 82 | c<0;...SELECT.*.FROM.record;.._. |
61ba0 | 70 04 00 91 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | p...C..CREATE.TABLE.t1(a.INTEGER |
61bc0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
61be0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
61c00 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
61c20 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
61c40 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
61c60 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
61c80 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
61ca0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
61cc0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
61ce0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
61d00 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
61d20 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
61d40 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
61d60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
61d80 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
61da0 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
61dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 | ............"a","b""a","b",old.b |
61de0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
61e00 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
61e20 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
61e40 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
61e60 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
61e80 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
61ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
61ec0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
61ee0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
61f00 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
61f20 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
61f40 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
61f60 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
61f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
61fa0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
61fc0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
61fe0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a | ;...SELECT.*.FROM.record;VACUUM. |
62000 | 0d 00 00 00 07 01 b1 00 1b a9 17 5a 12 f9 0e aa 0a 5d 06 00 01 b1 00 00 00 00 00 00 00 00 00 00 | ...........Z.....].............. |
62020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
620a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
620c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
620e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
62180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
621a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 4b 82 7d 04 00 91 1b 20 20 43 52 45 41 54 | ..................K.}......CREAT |
621c0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
621e0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.0);...CREATE. |
62200 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
62220 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
62240 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
62260 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
62280 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
622a0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
622c0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
622e0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
62300 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
62320 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
62340 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
62360 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
62380 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
623a0 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
623c0 | 25 64 2c 25 64 2c 25 64 27 41 4e 44 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | %d,%d,%d'AND.............old.a,o |
623e0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
62400 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
62420 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
62440 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
62460 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
62480 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
624a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
624c0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
624e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(c,b).VALUES(1,2); |
62500 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
62520 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 | INTO.t1(a,b).VALUES(1,2).ON.CONF |
62540 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
62560 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
62580 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
625a0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
625c0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
625e0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a | ;...SELECT.*.FROM.record;VACUUM. |
62600 | 88 59 82 7c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .Y.|...7..CREATE.TABLE.t1(a.INTE |
62620 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
62640 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
62660 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
62680 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
626a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
626c0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
626e0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
62700 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
62720 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
62740 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
62760 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
62780 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
627a0 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
627c0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
627e0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
62800 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 2b 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',+...... |
62820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
62840 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
62860 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
62880 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
628a0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
628c0 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
628e0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
62900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
62920 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
62940 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
62960 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
62980 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
629a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
629c0 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
629e0 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
62a00 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
62a20 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
62a40 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 | c<0;...SELECT.*.FROM.record;..I. |
62a60 | 7b 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | {......CREATE.TABLE.t1(a.INTEGER |
62a80 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
62aa0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | );...CREATE.TABLE.record(x.TEXT, |
62ac0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
62ae0 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
62b00 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
62b20 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
62b40 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
62b60 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
62b80 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
62ba0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
62bc0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
62be0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
62c00 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
62c20 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
62c40 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
62c60 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 2b 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',+......... |
62c80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 | .....................old.a,o,d.b |
62ca0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
62cc0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
62ce0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
62d00 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
62d20 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
62d40 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
62d60 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
62d80 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
62da0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
62dc0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
62de0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
62e00 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.c=t1.c+1;. |
62e20 | 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | ..SELd;...DELETE.FROM.record;... |
62e40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
62e60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
62e80 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
62ea0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 82 7a 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..K.z......CREATE.TABLE |
62ec0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
62ee0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
62f00 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
62f20 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
62f40 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
62f60 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
62f80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
62fa0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
62fc0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
62fe0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
63000 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
63020 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
63040 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
63060 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
63080 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
630a0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
630c0 | 64 27 2c 0a 20 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c | d',...strftime(1,1,1,1),old.b,ol |
630e0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
63100 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
63120 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
63140 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
63160 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
63180 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
631a0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
631c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
631e0 | 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(c,b).VALUES(1,2);...DELE |
63200 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
63220 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (a,b).VALUES(1,2).ON.CONFLICT(a) |
63240 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
63260 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
63280 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
632a0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
632c0 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
632e0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 5d 82 79 04 00 91 | ECT.*.FROM.record;VACUUM..].y... |
63300 | 3f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ?..CREATE.TABLE.t1(a.INTEGER.PRI |
63320 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
63340 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
63360 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
63380 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
633a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
633c0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
633e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
63400 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
63420 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
63440 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
63460 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
63480 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
634a0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
634c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
634e0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
63500 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
63520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
63540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
63560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
63580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
635a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
635c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
635e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
63600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
63620 | 20 45 4e 44 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 20 20 49 4e 53 45 52 54 | .END;EXPLAIN.QUERY.PLAN...INSERT |
63640 | 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c | .INTO.t1(c,b).VALUES(1,2);...DEL |
63660 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
63680 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 1(a,b).VALUES(1,2).ON.CONFLICT(a |
636a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 | ).DO.UPDATE.SET.c=t1.c+1;...SELE |
636c0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | CT.*.FROM.record;...DELETE.FROM. |
636e0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
63700 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
63720 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
63740 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 4b 82 78 04 00 | LECT.*.FROM.record;VACUUM..K.x.. |
63760 | 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
63780 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
637a0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
637c0 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
637e0 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
63800 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
63820 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-insert',printf('%d,%d,%d |
63840 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
63860 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
63880 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
638a0 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
638c0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
638e0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
63900 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
63920 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
63940 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
63960 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
63980 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
639a0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
639c0 | 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r4.AFTER.UPDATE.ON.t1.BEGIN.... |
639e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
63a00 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
63a20 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
63a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
63a60 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
63a80 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c | ..END;...INSERT.INTO.t1(c,b).VAL |
63aa0 | 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | UES(1,2);...DELETE.FROM.record;. |
63ac0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(c,b).VALUES(1,2 |
63ae0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ).ON.CONFLICT(a).DO.UPDATE.SET.c |
63b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
63b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
63b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
63b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
63b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
63ba0 | 64 3b 56 41 43 55 55 4d 0a 88 53 82 77 04 00 91 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | d;VACUUM..S.w...+..CREATE.TABLE. |
63bc0 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
63be0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
63c00 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
63c20 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
63c40 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
63c60 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
63c80 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
63ca0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
63cc0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
63ce0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
63d00 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
63d20 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
63d40 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
63d60 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
63d80 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
63da0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
63dc0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | ',...............old.a,old.b,old |
63de0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
63e00 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
63e20 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
63e40 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
63e60 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
63e80 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
63ea0 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
63ec0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
63ee0 | 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(c,b).VALUES(1,2);...DELET |
63f00 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
63f20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | a,b).VALUES(1,2).ON.CONFLICT(a). |
63f40 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
63f60 | 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | .DISTINCT*.FROM.record;...DELETE |
63f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
63fa0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
63fc0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
63fe0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a | ;...SELECT.*.FROM.record;VACUUM. |
64000 | 0d 00 00 00 07 01 85 00 1b b3 17 56 12 f9 0e 9c 0a 2f 05 db 01 85 00 00 00 00 00 00 00 00 00 00 | ...........V...../.............. |
64020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
640a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
640c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
640e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
64180 | 00 00 00 00 00 88 52 83 04 04 00 91 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ......R.....)..CREATE.TABLE.t1(a |
641a0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
641c0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
641e0 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
64200 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
64220 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
64240 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
64260 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
64280 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
642a0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
642c0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
642e0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
64300 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 45 58 50 4c 41 49 4e | w.a,new.b,new.c));...END;EXPLAIN |
64320 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
64340 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
64360 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
64380 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
643a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ,%d',...............old.a,old.b, |
643c0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
643e0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
64400 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
64420 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
64440 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
64460 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
64480 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
644a0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
644c0 | 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(c,b).VALUES(1,2);...DE |
644e0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
64500 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | t1(a,b).VALUES(1,2).ON.CONFLICT( |
64520 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
64540 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
64560 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
64580 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
645a0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
645c0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 50 83 03 04 | ELECT.*.FROM.record;VACUUM..P... |
645e0 | 00 91 25 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..%..CREATE.TABLE.t1(a.INTEGER.P |
64600 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
64620 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
64640 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
64660 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
64680 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
646a0 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-insert',printf('%d,%d,% |
646c0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
646e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
64700 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
64720 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
64740 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
64760 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 20 20 43 52 45 41 54 45 20 | new.c));...END;EXPLAIN...CREATE. |
64780 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
647a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
647c0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
647e0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
64800 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
64820 | 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | o,d.b,old.c,new.a,new.b,new.c)); |
64840 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
64860 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
64880 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
648a0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
648c0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
648e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
64900 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
64920 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
64940 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
64960 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
64980 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
649a0 | 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | c+1;...SELd;...DELETE.FROM.recor |
649c0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
649e0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
64a00 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
64a20 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 69 83 02 04 00 91 57 20 20 43 52 45 41 54 45 20 | *.FROM.record;..i.....W..CREATE. |
64a40 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
64a60 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
64a80 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
64aa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
64ac0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
64ae0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
64b00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
64b20 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
64b40 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
64b60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
64b80 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
64ba0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
64bc0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 b3 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r..BEFORE.U |
64be0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
64c00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
64c20 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
64c40 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
64c60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
64c80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
64ca0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
64cc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
64ce0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
64d00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
64d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
64d40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
64d60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
64d80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
64da0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
64dc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
64de0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
64e00 | 4d 20 72 65 63 6f 72 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 64 3b 0a 20 20 44 45 4c 45 | M.recorew.a,new.b,new.cd;...DELE |
64e20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
64e40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
64e60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
64e80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 01 | <0;...SELECT.*.FROM.record;..Y.. |
64ea0 | 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...7..CREATE.TABLE.t1(a.INTEGER. |
64ec0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
64ee0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
64f00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
64f20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
64f40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
64f60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
64f80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
64fa0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
64fc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
64fe0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
65000 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
65020 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
65040 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
65060 | 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 | .WITH.c(x).AS.(values(1))....... |
65080 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
650a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
650c0 | 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c | ..........."a","b""a","b",old.b, |
650e0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
65100 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
65120 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
65140 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
65160 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
65180 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
651a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
651c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
651e0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
65200 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
65220 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
65240 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
65260 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
65280 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
652a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
652c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
652e0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 00 04 00 91 | ...SELECT.*.FROM.record;..Y..... |
65300 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
65320 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
65340 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
65360 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
65380 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
653a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
653c0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
653e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
65400 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
65420 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
65440 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
65460 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
65480 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
654a0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 | 3.BEFORE.UPDATE.ON.t1.BEGIN...WI |
654c0 | 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 | TH.c(x).AS.(values(1)).......... |
654e0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
65500 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
65520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 | ..............."a","b",old.b,old |
65540 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
65560 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
65580 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
655a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
655c0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
655e0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
65600 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
65620 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
65640 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
65660 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
65680 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
656a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
656c0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
656e0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
65700 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
65720 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
65740 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 82 7f 04 00 91 37 20 20 | SELECT.*.FROM.record;..Y.....7.. |
65760 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
65780 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
657a0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
657c0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
657e0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
65800 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
65820 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
65840 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
65860 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
65880 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
658a0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
658c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
658e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
65900 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
65920 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
65940 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 73 ac 25 | UES('before-update',printf('%s.% |
65960 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
65980 | 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ............"a","b",old.b,old.c, |
659a0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
659c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
659e0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
65a00 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
65a20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
65a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
65a60 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
65a80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
65aa0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
65ac0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
65ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
65b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
65b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
65b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
65b60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
65b80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
65ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 82 7e 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.~......CRE |
65bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
65be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
65c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
65c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
65c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
65c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
65c80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
65ca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
65cc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
65ce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
65d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
65d20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
65d40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
65d60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
65d80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
65da0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
65dc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 49 4e 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 28 61 | d/%d,%d,%d'IN..............old(a |
65de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
65e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
65e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
65e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
65e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
65e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
65ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
65ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
65ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
65f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
65f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
65f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
65f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
65f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
65fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
65fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
65fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
66000 | 0d 00 00 00 07 01 75 00 1b a3 17 46 12 e9 0e 8c 0a 2f 05 d2 01 75 00 00 00 00 00 00 00 00 00 00 | ......u....F...../...u.......... |
66020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
660a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
660c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
660e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
66160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 83 0b 04 00 91 37 20 20 43 | ......................Y.....7..C |
66180 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
661a0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
661c0 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
661e0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
66200 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
66220 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
66240 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | re-insert',printf('%d,%d,%d',new |
66260 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
66280 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
662a0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
662c0 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
662e0 | 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 | tf('%g,%d,%d',CURRENT_TIMESTAMP) |
66300 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
66320 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
66340 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
66360 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
66380 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
663a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
663c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
663e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
66400 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
66420 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
66440 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
66460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
66480 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
664a0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
664c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
664e0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
66500 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
66520 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
66540 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
66560 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
66580 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
665a0 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
665c0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 0a 04 00 91 37 20 20 43 52 45 41 | CT.*.FROM.record;..Y.....7..CREA |
665e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
66600 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
66620 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
66640 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
66660 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
66680 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
666a0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
666c0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
666e0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
66700 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
66720 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
66740 | 27 25 66 2c 25 64 2c 25 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a | '%f,%d,%d',.round(1,1),new.c));. |
66760 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
66780 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
667a0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
667c0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
667e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
66800 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
66820 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
66840 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
66860 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
66880 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
668a0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
668c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
668e0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
66900 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
66920 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
66940 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
66960 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
66980 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
669a0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
669c0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
669e0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
66a00 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
66a20 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 09 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y.....7..CREATE. |
66a40 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
66a60 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
66a80 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
66aa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
66ac0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
66ae0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
66b00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
66b20 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
66b40 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
66b60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
66b80 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 66 | VALUES('after-insert',printf('%f |
66ba0 | 2c 25 64 2c 25 64 27 2c 20 20 63 68 61 6e 67 65 73 28 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',..changes(),new.c));...E |
66bc0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
66be0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
66c00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
66c20 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
66c40 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
66c60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
66c80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
66ca0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
66cc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
66ce0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
66d00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
66d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
66d40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
66d60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
66d80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
66da0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
66dc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
66de0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
66e00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
66e20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
66e40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
66e60 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
66e80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 08 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.....7..CREATE.TAB |
66ea0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
66ec0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
66ee0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
66f00 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
66f20 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
66f40 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
66f60 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
66f80 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
66fa0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
66fc0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
66fe0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 65 2c 25 64 | UES('after-insert',printf('%e,%d |
67000 | 2c 25 64 27 2c 6e 65 77 2e 61 2d 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a-new.b,new.c));...END; |
67020 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
67040 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
67060 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
67080 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
670a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
670c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
670e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
67100 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
67120 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
67140 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
67160 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
67180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
671a0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
671c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
671e0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
67200 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
67220 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
67240 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
67260 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
67280 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
672a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
672c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
672e0 | 20 72 65 63 6f 72 64 3b 0a 88 59 83 07 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.....7..CREATE.TABLE. |
67300 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
67320 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
67340 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
67360 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
67380 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
673a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
673c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
673e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
67400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
67420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
67440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 65 2c 25 64 2c 25 64 | ('after-insert',printf('%e,%d,%d |
67460 | 27 2c 6e 65 77 2e 61 2d 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a-new.b,new.c));...END;... |
67480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
674a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
674c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
674e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
67500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
67520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
67540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
67560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
67580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
675a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
675c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
675e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
67600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
67620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
67640 | 45 53 28 30 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(0,2);...DELETE.FROM.record;.. |
67660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
67680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
676a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
676c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
676e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
67700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
67720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
67740 | 63 6f 72 64 3b 0a 88 59 83 06 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.....7..CREATE.TABLE.t1( |
67760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
67780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
677a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
677c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
677e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
67800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
67820 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
67840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
67860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
67880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
678a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 65 2c 25 64 2c 25 64 27 2c 20 | fter-insert',printf('%e,%d,%d',. |
678c0 | 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | round(1,1),new.c));...END;...CRE |
678e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
67900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
67920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
67940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
67960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
67980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
679a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
679c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
679e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
67a00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
67a20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
67a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
67a60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
67a80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
67aa0 | 30 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 0,2);...DELETE.FROM.record;...IN |
67ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
67ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
67b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
67b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
67b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
67b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
67b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
67ba0 | 64 3b 0a 88 59 83 05 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.....7..CREATE.TABLE.t1(a.I |
67bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
67be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
67c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
67c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
67c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
67c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
67c80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
67ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
67cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
67ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
67d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 71 27 2c 20 72 6f 75 | r-insert',printf('%d,%d,%q',.rou |
67d20 | 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | nd(1,1),new.c));...END;...CREATE |
67d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
67d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
67d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
67da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
67dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
67de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
67e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
67e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
67e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
67e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
67e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
67ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
67ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
67ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
67f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
67f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
67f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
67f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
67f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
67fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
67fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
67fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
68000 | 0d 00 00 00 07 01 92 00 1b a3 17 46 12 e9 0e ab 0a 52 05 f5 01 92 00 00 00 00 00 00 00 00 00 00 | ...........F.....R.............. |
68020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
680a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
680c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
680e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
68180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 5f 83 12 04 00 91 43 20 20 43 52 45 41 | ..................._.....C..CREA |
681a0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
681c0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
681e0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
68200 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
68220 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
68240 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
68260 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
68280 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
682a0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
682c0 | 49 4e 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 | IN.....WITH.c(x).AS.(values(1)). |
682e0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
68300 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
68320 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
68340 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
68360 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
68380 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
683a0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
683c0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
683e0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
68400 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
68420 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
68440 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
68460 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
68480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
684a0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
684c0 | 65 77 2e 63 29 29 3b 53 45 4c 45 43 54 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.c));SELECT...END;...INSERT.IN |
684e0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
68500 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
68520 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
68540 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
68560 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
68580 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
685a0 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
685c0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
685e0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 11 04 00 91 37 20 20 43 | ELECT.*.FROM.record;..Y.....7..C |
68600 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
68620 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
68640 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
68660 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
68680 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
686a0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
686c0 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | re-insert',printf('%d,%d,%d',new |
686e0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
68700 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
68720 | 42 45 47 49 4e 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | BEGIN.....WITH.c(x).AS.(values(1 |
68740 | 29 29 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ))....VALUES('after-insert',prin |
68760 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
68780 | 29 20 3b 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | ).;..END;...CREATE.TRIGGER.r3.BE |
687a0 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
687c0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
687e0 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
68800 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
68820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
68840 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
68860 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
68880 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
688a0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
688c0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
688e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
68900 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
68920 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
68940 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
68960 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
68980 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
689a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
689c0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
689e0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
68a00 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
68a20 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
68a40 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 83 10 04 00 91 2f 20 20 43 52 45 41 | CT.*.FROM.record;..U...../..CREA |
68a60 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
68a80 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
68aa0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
68ac0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
68ae0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
68b00 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
68b20 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
68b40 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
68b60 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
68b80 | 49 4e 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 | IN.....WITH.c(x).AS.(values(1)). |
68ba0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
68bc0 | 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | .datetime(1,1,1),new.b,new.c));. |
68be0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
68c00 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 | E.UPDATE.ON.t1.BEGIN...WITH.c(x) |
68c20 | 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | .AS.(values(1))..........VALUES( |
68c40 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
68c60 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
68c80 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
68ca0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
68cc0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
68ce0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
68d00 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
68d20 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
68d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
68d60 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
68d80 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
68da0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
68dc0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
68de0 | 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | LUES(1,2).ON.CONFLICT(a).DO.UPDA |
68e00 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | TE.SET.c=t1.c+1;...SELECT.*.FROM |
68e20 | 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | .record;...DELETE.FROM.record;.. |
68e40 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
68e60 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
68e80 | 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T.c=c+1.WHERE.c<0;...SELECT.*.FR |
68ea0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 3a 83 0f 04 00 90 79 20 20 43 52 45 41 54 45 20 54 41 42 4c | OM.record;..:.....y..CREATE.TABL |
68ec0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
68ee0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
68f00 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
68f20 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
68f40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
68f60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
68f80 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
68fa0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
68fc0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
68fe0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f ff 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.reco.d(x,y).....VALU |
69000 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
69020 | 25 64 27 2c 6e 65 77 2a 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new*a,new.b,new.c));...END;. |
69040 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
69060 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | E.ON.t1.BEGIN......VALUES('befor |
69080 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
690a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
690c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
690e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
69100 | ff ff ff ff 34 20 41 46 54 45 52 20 55 20 00 41 54 45 20 4f 4e 20 74 31 20 42 45 64 49 4e 0a 20 | ....4.AFTER.U..ATE.ON.t1.BEdIN.. |
69120 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
69140 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
69160 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
69180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
691a0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e e1 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new..,new.b,new.c)) |
691c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
691e0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
69200 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
69220 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
69240 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 00 01 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;.....LECT.*.FROM.r |
69260 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
69280 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
692a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
692c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
692e0 | 20 72 65 63 6f 72 64 3b 0a 88 59 83 0e 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.....7..CREATE.TABLE. |
69300 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
69320 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
69340 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
69360 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
69380 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
693a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
693c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
693e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
69400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
69420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
69440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 | ('after-insert',printf('%q,%d,%d |
69460 | 27 2c 20 6c 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',.ltrim(1,1),new.c));...END;... |
69480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
694a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
694c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
694e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
69500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
69520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
69540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
69560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
69580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
695a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
695c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
695e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
69600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
69620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
69640 | 45 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(9,2);...DELETE.FROM.record;.. |
69660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
69680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
696a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
696c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
696e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
69700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
69720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
69740 | 63 6f 72 64 3b 0a 88 59 83 0d 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.....7..CREATE.TABLE.t1( |
69760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
69780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
697a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
697c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
697e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
69800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
69820 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
69840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
69860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
69880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
698a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6c 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%l,%d,%d',n |
698c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
698e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
69900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
69920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
69940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
69960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
69980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
699a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
699c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
699e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
69a00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
69a20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
69a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
69a60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
69a80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
69aa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
69ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
69ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
69b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
69b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
69b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
69b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
69b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
69ba0 | 64 3b 0a 88 59 83 0c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.....7..CREATE.TABLE.t1(a.I |
69bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
69be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
69c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
69c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
69c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
69c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
69c80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
69ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
69cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
69ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
69d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 | r-insert',printf('%g,%d,%d',CURR |
69d20 | 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | ENT_TIMESTAMP));...END;...CREATE |
69d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
69d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
69d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
69da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
69dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
69de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
69e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
69e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
69e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
69e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
69e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
69ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
69ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
69ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(9,2 |
69f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
69f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
69f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
69f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
69f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
69fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
69fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
69fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
6a000 | 0d 00 00 00 07 01 73 00 1b 89 17 30 12 d7 0e 7e 0a 25 05 cc 01 73 00 00 00 00 00 00 00 00 00 00 | ......s....0...~.%...s.......... |
6a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 55 83 19 04 00 91 2f 20 20 43 52 45 | ....................U...../..CRE |
6a180 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
6a1a0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
6a1c0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
6a1e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
6a200 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
6a220 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
6a240 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
6a260 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
6a280 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
6a2a0 | 47 49 4e 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 | GIN.....WITH.c(x).AS.(values(1)) |
6a2c0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
6a2e0 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
6a300 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
6a320 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 | RE.UPDATE.ON.t1.BEGIN...WITH.c(x |
6a340 | 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | ).AS.(values(1))..........VALUES |
6a360 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
6a380 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
6a3a0 | 20 20 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...json_group_array(1),old.c,new |
6a3c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
6a3e0 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
6a400 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
6a420 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
6a440 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
6a460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6a480 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
6a4a0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
6a4c0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
6a4e0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
6a500 | 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ALUES(1,2).ON.CONFLICT(a).DO.UPD |
6a520 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
6a540 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
6a560 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
6a580 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
6a5a0 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
6a5c0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 83 18 04 00 91 2f 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..U...../..CREATE.TAB |
6a5e0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
6a600 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
6a620 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
6a640 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
6a660 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
6a680 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
6a6a0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
6a6c0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
6a6e0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
6a700 | 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 56 41 4c | .WITH.c(x).AS.(values(1))....VAL |
6a720 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
6a740 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
6a760 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
6a780 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 | TE.ON.t1.BEGIN...WITH.c(x).AS.(v |
6a7a0 | 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | alues(1))..........VALUES('befor |
6a7c0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
6a7e0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
6a800 | 20 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ..json_group_array(1),new.a,new. |
6a820 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
6a840 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
6a860 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
6a880 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
6a8a0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
6a8c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
6a8e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
6a900 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
6a920 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
6a940 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
6a960 | 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ,2).ON.CONFLICT(a).DO.UPDATE.SET |
6a980 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
6a9a0 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
6a9c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
6a9e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
6aa00 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
6aa20 | 6f 72 64 3b 0a 88 55 83 17 04 00 91 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..U...../..CREATE.TABLE.t1(a |
6aa40 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
6aa60 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
6aa80 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
6aaa0 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
6aac0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
6aae0 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
6ab00 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
6ab20 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
6ab40 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 57 49 54 48 20 63 | ER.INSERT.ON.t1.BEGIN.....WITH.c |
6ab60 | 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | (x).AS.(values(1))....VALUES('af |
6ab80 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
6aba0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
6abc0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
6abe0 | 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | 1.BEGIN...WITH.c(x).AS.(values(1 |
6ac00 | 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ))..........VALUES('before-updat |
6ac20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
6ac40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
6ac60 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
6ac80 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
6aca0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 | FTER.UPDATE.ON.t1.BEGIN...WITH.c |
6acc0 | 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | (x).AS.(values(1))..........VALU |
6ace0 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
6ad00 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
6ad20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
6ad40 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
6ad60 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
6ad80 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
6ada0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 | ERT.INTO.t1(a,b).VALUES(1,2).ON. |
6adc0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
6ade0 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
6ae00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
6ae20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
6ae40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
6ae60 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 | .c<0;...SELECT.*.FROM.record;..U |
6ae80 | 83 16 04 00 91 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | ...../..CREATE.TABLE.t1(a.INTEGE |
6aea0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
6aec0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
6aee0 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
6af00 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
6af20 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
6af40 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
6af60 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
6af80 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
6afa0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 | RT.ON.t1.BEGIN.....WITH.c(x).AS. |
6afc0 | 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | (values(1))....VALUES('after-ins |
6afe0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
6b000 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
6b020 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
6b040 | 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 | ...WITH.c(x).AS.(values(1))..... |
6b060 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
6b080 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
6b0a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
6b0c0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
6b0e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
6b100 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
6b120 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 20 73 75 62 | .record(x,y).........VALUES(.sub |
6b140 | 73 74 72 28 31 2c 31 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | str(1,1,1),printf('%d,%d,%d/%d,% |
6b160 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
6b180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
6b1a0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 | ew.a,new.b,new.c));...END;...INS |
6b1c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 | ERT.INTO.t1(a,b).VALUES(1,2);... |
6b1e0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
6b200 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | O.t1(a,b).VALUES(1,2).ON.CONFLIC |
6b220 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
6b240 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ELECT.*.FROM.record;...DELETE.FR |
6b260 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
6b280 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
6b2a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 3b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 | DO.UPDATE.SET.c=c;1.WHERE.c<0;.. |
6b2c0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 83 15 04 00 91 2f 20 | .SELECT.*.FROM.record;..U...../. |
6b2e0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
6b300 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 | RY.KEY,.b.int,.c.DEFAULT.0);...C |
6b320 | 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 | REATE.TABLE.record(x.TEXT,.y.TEX |
6b340 | 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 | T);...CREATE.TRIGGER.r1.BEFORE.I |
6b360 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
6b380 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
6b3a0 | 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fore-insert',printf('%d,%d,%d',n |
6b3c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
6b3e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.INSERT.ON.t |
6b400 | 31 20 42 45 47 49 4e 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 | 1.BEGIN.....WITH.c(x).AS.(values |
6b420 | 28 31 29 29 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | (1))....VALUES('after-insert',pr |
6b440 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
6b460 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
6b480 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 | BEFORE.UPDATE.ON.t1.BEGIN...WITH |
6b4a0 | 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 | .c(x).AS.(values(1))..........VA |
6b4c0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
6b4e0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
6b500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
6b520 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
6b540 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
6b560 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
6b580 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 20 73 75 62 73 74 72 28 31 2c 31 | (x,y).........VALUES(.substr(1,1 |
6b5a0 | 2c 31 29 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | ,1),printf('%d,%d,%d/%d,%d,%d',. |
6b5c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6b5e0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
6b600 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
6b620 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
6b640 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
6b660 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | b).VALUES(1,2).ON.CONFLICT(a).DO |
6b680 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
6b6a0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
6b6c0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
6b6e0 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
6b700 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
6b720 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 83 14 04 00 91 2f 20 20 43 52 45 41 54 45 | .*.FROM.record;..U...../..CREATE |
6b740 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
6b760 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
6b780 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
6b7a0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
6b7c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
6b7e0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | d(x,y).........VALUES('before-in |
6b800 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
6b820 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
6b840 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
6b860 | 0a 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 | .....WITH.c(x).AS.(values(1))... |
6b880 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
6b8a0 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
6b8c0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
6b8e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 | UPDATE.ON.t1.BEGIN...WITH.c(x).A |
6b900 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | S.(values(1))..........VALUES('b |
6b920 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
6b940 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
6b960 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
6b980 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 2b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END+...CREATE.T |
6b9a0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
6b9c0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
6b9e0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
6ba00 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
6ba20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
6ba40 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
6ba60 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
6ba80 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
6baa0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
6bac0 | 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ES(1,2).ON.CONFLICT(a).DO.UPDATE |
6bae0 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
6bb00 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
6bb20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
6bb40 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
6bb60 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
6bb80 | 20 72 65 63 6f 72 64 3b 0a 88 73 83 13 04 00 91 6b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..s.....k..CREATE.TABLE. |
6bba0 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
6bbc0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
6bbe0 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
6bc00 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
6bc20 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
6bc40 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
6bc60 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
6bc80 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
6bca0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 57 49 | .AFTER.INSERT.ON.t1.BEGIN.....WI |
6bcc0 | 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 56 41 4c 55 45 53 | TH.c(x).AS.(values(1))....VALUES |
6bce0 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
6bd00 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
6bd20 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
6bd40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
6bd60 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
6bd80 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
6bda0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
6bdc0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
6bde0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
6be00 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
6be20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 57 49 54 48 20 63 28 78 | INSERT.INTO.record(x,y).WITH.c(x |
6be40 | 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | ).AS.(values(1))..........VALUES |
6be60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
6be80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
6bea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
6bec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
6bee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
6bf00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
6bf20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
6bf40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
6bf60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
6bf80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
6bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
6bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
6bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
6c000 | 0d 00 00 00 07 01 db 00 1b b3 17 66 13 19 0e c2 0a 75 06 28 01 db 00 00 00 00 00 00 00 00 00 00 | ...........f.....u.(............ |
6c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 83 20 04 | ............................I... |
6c1e0 | 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
6c200 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
6c220 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
6c240 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
6c260 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
6c280 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
6c2a0 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-insert',printf('%d,%d,% |
6c2c0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
6c2e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
6c300 | 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | ON.t1.BEGIN.INSERT.INTO.record(x |
6c320 | 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 | ,y).....VALUES('after-insert',pr |
6c340 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
6c360 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | c));...END;...CREATE.TRIGGER.r3. |
6c380 | 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.UPDATE.ON.t1.BEGIN.....IN |
6c3a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
6c3c0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-update',printf('%d, |
6c3e0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
6c400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
6c420 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
6c440 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
6c460 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
6c480 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
6c4a0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
6c4c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6c4e0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 ac 6f 6c 64 2e 63 2c 6e 65 77 | ......old.a,ol.a,old.b.old.c,new |
6c500 | 2e 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | .ad.b,old.c,new.a,new.b,new.c)); |
6c520 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
6c540 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
6c560 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
6c580 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
6c5a0 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e | SET.c=t1.c+1;...SELECT.*.FROM.rN |
6c5c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
6c5e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.S-T.c |
6c600 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
6c620 | 72 65 63 6f 72 64 3b 0a 88 49 83 1f 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;..I........CREATE.TABLE.t |
6c640 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
6c660 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
6c680 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
6c6a0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
6c6c0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
6c6e0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
6c700 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
6c720 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | c));...END;...CREATE.TRIGGER.r2. |
6c740 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 | AFTER.INSERT.ON.t1.BEGIN.INSERT. |
6c760 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
6c780 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
6c7a0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
6c7c0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
6c7e0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
6c800 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
6c820 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
6c840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
6c860 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
6c880 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
6c8a0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
6c8c0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
6c8e0 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
6c900 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
6c920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c | ...................old.a,ol.a,ol |
6c940 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 ae 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | d.b,old.c,new.ad.b,old.c,new.a,n |
6c960 | 65 77 28 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew(b,new.c));...END;...INSERT.IN |
6c980 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
6c9a0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
6c9c0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
6c9e0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
6ca00 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ECT.*.FROM.rNSERT.INTO.t1(a,b).V |
6ca20 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
6ca40 | 20 55 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.S-T.c=c+1.WHERE.c<0;...S |
6ca60 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 1e 04 00 91 17 20 20 43 | ELECT.*.FROM.record;..I........C |
6ca80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
6caa0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
6cac0 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
6cae0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
6cb00 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
6cb20 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
6cb40 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | re-insert',printf('%d,%d,%d',new |
6cb60 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
6cb80 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
6cba0 | 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | BEGIN.INSERT.INTO.record(x,y)... |
6cbc0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
6cbe0 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
6cc00 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
6cc20 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
6cc40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
6cc60 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
6cc80 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
6cca0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
6ccc0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
6cce0 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
6cd00 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
6cd20 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
6cd40 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
6cd60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6cd80 | 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 64 2e 62 3c | old.a,ol.a,old.b,old.c,new.ad.b< |
6cda0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
6cdc0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
6cde0 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
6ce00 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
6ce20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
6ce40 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 | t1.c+1;...SELECT.*.FROM.rNSERT.I |
6ce60 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
6ce80 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.S-T.c=c+1.W |
6cea0 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
6cec0 | 3b 0a 88 53 83 1d 04 00 91 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..S.....+..CREATE.TABLE.t1(a.IN |
6cee0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
6cf00 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
6cf20 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
6cf40 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
6cf60 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
6cf80 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
6cfa0 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
6cfc0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
6cfe0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | INSERT.ON.t1.BEGIN.INSERT.INTO.r |
6d000 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
6d020 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
6d040 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
6d060 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
6d080 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
6d0a0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
6d0c0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
6d0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
6d100 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
6d120 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
6d140 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
6d160 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
6d180 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
6d1a0 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
6d1c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | .............old.a,ol.a,old.b,ol |
6d1e0 | 64 2e 63 2c 6e 65 77 2e 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | d.c,new.ad.b,old.c,new.a,new.b,n |
6d200 | 65 77 2e 63 32 30 30 31 2d 30 31 2d 30 31 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | ew.c2001-01-01));...END;...INSER |
6d220 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
6d240 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
6d260 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
6d280 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
6d2a0 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .SELECT.*.FROM.rNSERT.INTO.t1(a, |
6d2c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
6d2e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.S-T.c=c+1.WHERE.c<0; |
6d300 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 1c 04 00 91 | ...SELECT.*.FROM.record;..I..... |
6d320 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
6d340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
6d360 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
6d380 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
6d3a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
6d3c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
6d3e0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
6d400 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
6d420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
6d440 | 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | .t1.BEGIN.INSERT.INTO.record(x,y |
6d460 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
6d480 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
6d4a0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
6d4c0 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
6d4e0 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
6d500 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
6d520 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
6d540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
6d560 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
6d580 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
6d5a0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
6d5c0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
6d5e0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
6d600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6d620 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | ....old.a,ol.a,old.b,old.c,new.a |
6d640 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
6d660 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
6d680 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
6d6a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
6d6c0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
6d6e0 | 54 20 63 3d 74 31 2e 20 61 2e 62 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 | T.c=t1..a.b...SELECT.*.FROM.rNSE |
6d700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
6d720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.S-T.c=c |
6d740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
6d760 | 63 6f 72 64 3b 0a 88 49 83 1b 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I........CREATE.TABLE.t1( |
6d780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
6d7a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
6d7c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
6d7e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
6d800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
6d820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
6d840 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
6d860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
6d880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e | TER.INSERT.ON.t1.BEGIN.INSERT.IN |
6d8a0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
6d8c0 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
6d8e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
6d900 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
6d920 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
6d940 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
6d960 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
6d980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
6d9a0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
6d9c0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
6d9e0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
6da00 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
6da20 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
6da40 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
6da60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e | .................old.a,ol.a,old. |
6da80 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | b,old.c,new.ad.b,old.c,new.a,new |
6daa0 | 28 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | (b,new.c));...END;...INSERT.INTO |
6dac0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
6dae0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
6db00 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
6db20 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
6db40 | 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.*.FROM.rNSERT.INTO.t1(a,b).VAL |
6db60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
6db80 | 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.S-T.c=c+1.WHERE.c<0;...SEL |
6dba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 1a 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I........CRE |
6dbc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
6dbe0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
6dc00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
6dc20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
6dc40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
6dc60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
6dc80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
6dca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
6dcc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
6dce0 | 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | GIN.INSERT.INTO.record(x,y)..... |
6dd00 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
6dd20 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
6dd40 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
6dd60 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
6dd80 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
6dda0 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
6ddc0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
6dde0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
6de00 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
6de20 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
6de40 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
6de60 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
6de80 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
6dea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
6dec0 | 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 20 22 61 22 2c 22 62 22 2e 62 2c 6f 6c | d.a,ol.a,old.b,old.."a","b".b,ol |
6dee0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
6df00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
6df20 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
6df40 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
6df60 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
6df80 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 | .c+1;...SELECT.*.FROM.rNSERT.INT |
6dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
6dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.S-T.c=c+1.WHE |
6dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
6e000 | 0d 00 00 00 07 01 9c 00 1b b3 17 66 13 19 0e b5 0a 56 05 f9 01 9c 00 00 00 00 00 00 00 00 00 00 | ...........f.....V.............. |
6e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
6e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 83 27 | .............................Y.' |
6e1a0 | 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...7..CREATE.TABLE.t1(a.INTEGER. |
6e1c0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
6e1e0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
6e200 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
6e220 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
6e240 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
6e260 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
6e280 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
6e2a0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
6e2c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
6e2e0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
6e300 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
6e320 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
6e340 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
6e360 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
6e380 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
6e3a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
6e3c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
6e3e0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
6e400 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
6e420 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
6e440 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
6e460 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
6e480 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
6e4a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
6e4c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
6e4e0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
6e500 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
6e520 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
6e540 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.a=t1.c+1;.. |
6e560 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
6e580 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
6e5a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
6e5c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
6e5e0 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 26 04 00 91 | ...SELECT.*.FROM.record;..Y.&... |
6e600 | 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | 7..CREATE.TABLE.t1(a.INTEGER.PRI |
6e620 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
6e640 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
6e660 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
6e680 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
6e6a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
6e6c0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
6e6e0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
6e700 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
6e720 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
6e740 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
6e760 | 70 72 69 6e 74 66 28 27 25 64 2c 25 63 ac 25 64 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f | printf('%d,%c.%d',.sqlite_versio |
6e780 | 6e 28 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | n()));...END;...CREATE.TRIGGER.r |
6e7a0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
6e7c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
6e7e0 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
6e800 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
6e820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
6e840 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
6e860 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
6e880 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
6e8a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
6e8c0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
6e8e0 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
6e900 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
6e920 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
6e940 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
6e960 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
6e980 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
6e9a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
6e9c0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
6e9e0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
6ea00 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
6ea20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
6ea40 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5b 83 25 04 00 91 3b 20 20 | SELECT.*.FROM.record;..[.%...;.. |
6ea60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
6ea80 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
6eaa0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
6eac0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
6eae0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
6eb00 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
6eb20 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
6eb40 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
6eb60 | 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
6eb80 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
6eba0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
6ebc0 | 6e 74 66 28 27 25 20 2a 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 | ntf('%.*g,%d,%d',CURRENT_TIMESTA |
6ebe0 | 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | MP));...END;...CREATE.TRIGGER.r3 |
6ec00 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
6ec20 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
6ec40 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
6ec60 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
6ec80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
6eca0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
6ecc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
6ece0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
6ed00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
6ed20 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
6ed40 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6ed60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
6ed80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ew.b,new.c));...END;...INSERT.IN |
6eda0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | TO.t1(a,b).VALUES(1,2);...DELETE |
6edc0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
6ede0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
6ee00 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
6ee20 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
6ee40 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
6ee60 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
6ee80 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
6eea0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 83 24 04 00 91 45 20 20 43 | ELECT.*.FROM.record;..`.$...E..C |
6eec0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
6eee0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
6ef00 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
6ef20 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
6ef40 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
6ef60 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
6ef80 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | re-insert',printf('%d,%d,%d',new |
6efa0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
6efc0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
6efe0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
6f000 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | ).....VALUES('after-insert',prin |
6f020 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
6f040 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 | );...END;...CREATE.TRIGGER.r3.BE |
6f060 | 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.UPDATE.ON.t1.BEGIN.....INSE |
6f080 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
6f0a0 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
6f0c0 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
6f0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
6f100 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
6f120 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
6f140 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
6f160 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
6f180 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
6f1a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
6f1c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
6f1e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
6f200 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
6f220 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
6f240 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
6f260 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
6f280 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
6f2a0 | 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | cord;EXPLAIN...INSERT.INTO.t1(a, |
6f2c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
6f2e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
6f300 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 23 04 00 91 | ...SELECT.*.FROM.record;..I.#... |
6f320 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
6f340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
6f360 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
6f380 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
6f3a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
6f3c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
6f3e0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
6f400 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
6f420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
6f440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
6f460 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
6f480 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
6f4a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
6f4c0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
6f4e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
6f500 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
6f520 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
6f540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 | .................old.a,o,d.b,old |
6f560 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
6f580 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
6f5a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
6f5c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
6f5e0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
6f600 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
6f620 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
6f640 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
6f660 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
6f680 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
6f6a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
6f6c0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
6f6e0 | 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | Ld;...DELETE.FROM.record;...INSE |
6f700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
6f720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
6f740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
6f760 | 63 6f 72 64 3b 0a 88 49 83 22 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I."......CREATE.TABLE.t1( |
6f780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
6f7a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
6f7c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
6f7e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
6f800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
6f820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
6f840 | 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%d,%d,%d',new.a,new.b,new.c) |
6f860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
6f880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e | TER.INSERT.ON.t1.BEGIN.INSERT.IN |
6f8a0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
6f8c0 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
6f8e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
6f900 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
6f920 | 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 | EGIN...WITH.c(x).AS.(values(1)). |
6f940 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
6f960 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
6f980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
6f9a0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
6f9c0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
6f9e0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 | R.UPDATE.ON.t1.BEGIN...WITH.c(x) |
6fa00 | 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | .AS.(values(1))..........VALUES( |
6fa20 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
6fa40 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
6fa60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e | .................old.a,ol.a,old. |
6fa80 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | b,old.c,new.ad.b,old.c,new.a,new |
6faa0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
6fac0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
6fae0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
6fb00 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
6fb20 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
6fb40 | 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.*.FROM.rNSERT.INTO.t1(a,b).VAL |
6fb60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
6fb80 | 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.S-T.c=c+1.WHERE.c<0;...SEL |
6fba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 21 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.!......CRE |
6fbc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
6fbe0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
6fc00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
6fc20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
6fc40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
6fc60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
6fc80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
6fca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
6fcc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
6fce0 | 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | GIN.INSERT.INTO.record(x,y)..... |
6fd00 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
6fd20 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
6fd40 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
6fd60 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
6fd80 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
6fda0 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
6fdc0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
6fde0 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
6fe00 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
6fe20 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
6fe40 | 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 | N...WITH.c(x).AS.(values(1)).... |
6fe60 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
6fe80 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
6fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 df df 6f 6c | ..............................ol |
6fec0 | 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 64 2e 62 2c 6f 6c | d.a,ol.a,old.b,old.c,new.ad.b,ol |
6fee0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
6ff00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
6ff20 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
6ff40 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
6ff60 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
6ff80 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 | .c+1;...SELECT.*.FROM.rNSERT.INT |
6ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
6ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.S-T.c=c+1.WHE |
6ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
70000 | 0d 00 00 00 07 01 82 00 1b 9c 17 3f 12 e2 0e 85 0a 28 05 cf 01 82 00 00 00 00 00 00 00 00 00 00 | ...........?.....(.............. |
70020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
700a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
700c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
700e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
70180 | 00 00 88 49 83 2e 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ...I........CREATE.TABLE.t1(a.IN |
701a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
701c0 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
701e0 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
70200 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
70220 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
70240 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
70260 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
70280 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
702a0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | INSERT.ON.t1.BEGIN.INSERT.INTO.r |
702c0 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
702e0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
70300 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
70320 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
70340 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
70360 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
70380 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
703a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f ec 64 2e 61 2c 6f 6c 64 2e | ......................o.d.a,old. |
703c0 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
703e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
70400 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
70420 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
70440 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
70460 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
70480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | .............old.a,ol.a,old.b,ol |
704a0 | 64 2e 63 2c 6e 65 77 2e 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | d.c,new.ad.b,old.c,new.a,new.b,n |
704c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
704e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
70500 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
70520 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
70540 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
70560 | 46 52 4f 4d 20 72 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | FROM.rNSERT.INTO.t1(a,b).VALUES( |
70580 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
705a0 | 45 20 53 2d 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.S-T.c=c+1.WHERE.c<0;...SELECT. |
705c0 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 55 83 2d 04 00 91 2f 20 20 43 52 45 41 54 45 20 | *.FROM.record;..U.-.../..CREATE. |
705e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
70600 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
70620 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
70640 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
70660 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
70680 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
706a0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
706c0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
706e0 | 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
70700 | 20 20 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 | ....WITH.c(x).AS.(values(1)).... |
70720 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
70740 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
70760 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
70780 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 | PDATE.ON.t1.BEGIN...WITH.c(x).AS |
707a0 | 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | .(values(1))..........VALUES('be |
707c0 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
707e0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
70800 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
70820 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
70840 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
70860 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
70880 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
708a0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
708c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
708e0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
70900 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
70920 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
70940 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
70960 | 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | S(1,2).ON.CONFLICT(a).DO.UPDATE. |
70980 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
709a0 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
709c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
709e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
70a00 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
70a20 | 72 65 63 6f 72 64 3b 0a 88 59 83 2c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;..Y.,...7..CREATE.TABLE.t |
70a40 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
70a60 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
70a80 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
70aa0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
70ac0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
70ae0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
70b00 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d',new.a,new.b,new. |
70b20 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 | c));...END;...CREATE.TRIGGER.r2. |
70b40 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
70b60 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.record(x,y).....VALUES( |
70b80 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 | 'after-insert',printf('%q,%d,%d' |
70ba0 | 2c 20 6c 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,.ltrim(1,1),new.c));...END;...C |
70bc0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
70be0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
70c00 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
70c20 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
70c40 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
70c60 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
70c80 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
70ca0 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
70cc0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
70ce0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
70d00 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
70d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
70d40 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
70d60 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
70d80 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
70da0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
70dc0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
70de0 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
70e00 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
70e20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
70e40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
70e60 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
70e80 | 6f 72 64 3b 0a 88 59 83 2b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..Y.+...7..CREATE.TABLE.t1(a |
70ea0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
70ec0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
70ee0 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
70f00 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
70f20 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
70f40 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
70f60 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
70f80 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
70fa0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
70fc0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
70fe0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 43 55 | ter-insert',printf('%g,%d,%d',CU |
71000 | 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | RRENT_TIMESTAMP));...END;...CREA |
71020 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
71040 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
71060 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
71080 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
710a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
710c0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
710e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
71100 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
71120 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
71140 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
71160 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
71180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
711a0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
711c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
711e0 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
71200 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
71220 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
71240 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
71260 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
71280 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
712a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
712c0 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
712e0 | 3b 0a 88 59 83 2a 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..Y.*...7..CREATE.TABLE.t1(a.IN |
71300 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
71320 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
71340 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
71360 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
71380 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
713a0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
713c0 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
713e0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
71400 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
71420 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
71440 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 65 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%e,%d,%d',new.a |
71460 | 2d 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | -new.b,new.c));...END;...CREATE. |
71480 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
714a0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
714c0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
714e0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
71500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
71520 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
71540 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
71560 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
71580 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
715a0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
715c0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
715e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
71600 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
71620 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
71640 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
71660 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
71680 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
716a0 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
716c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
716e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
71700 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
71720 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
71740 | 59 83 29 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | Y.)...7..CREATE.TABLE.t1(a.INTEG |
71760 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
71780 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
717a0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
717c0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
717e0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
71800 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
71820 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
71840 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
71860 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
71880 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
718a0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 66 27 2c 6e 65 77 2e 61 3c 6e 65 | sert',printf('%d,%d,%f',new.a<ne |
718c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
718e0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
71900 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
71920 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
71940 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
71960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
71980 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
719a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
719c0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
719e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
71a00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
71a20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
71a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
71a60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
71a80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
71aa0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
71ac0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
71ae0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
71b00 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
71b20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
71b40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
71b60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
71b80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 83 28 | <0;...SELECT.*.FROM.record;..`.( |
71ba0 | 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...E..CREATE.TABLE.t1(a.INTEGER. |
71bc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
71be0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
71c00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
71c20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
71c40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
71c60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
71c80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
71ca0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
71cc0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
71ce0 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
71d00 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
71d20 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
71d40 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
71d60 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
71d80 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
71da0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
71dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
71de0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
71e00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
71e20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
71e40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
71e60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
71e80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
71ea0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
71ec0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
71ee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
71f00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
71f20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
71f40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
71f60 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
71f80 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | FROM.record;EXPLAIN...INSERT.INT |
71fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
71fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
71fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
72000 | 0d 00 00 00 07 01 8e 00 1b 9c 17 4f 12 f2 0e a5 0a 48 05 eb 01 8e 00 00 00 00 00 00 00 00 00 00 | ...........O.....H.............. |
72020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
720a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
720c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
720e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
72180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 59 83 35 04 00 91 37 20 20 43 52 45 41 54 45 20 54 | ...............Y.5...7..CREATE.T |
721a0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
721c0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 | .int,.c.DEFAULT.0);...CREATE.TAB |
721e0 | 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | LE.record(x.TEXT,.y.TEXT);...CRE |
72200 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
72220 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
72240 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
72260 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 66 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%f',new.a,new. |
72280 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
722a0 | 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.INSERT.ON.t1.BEGIN.. |
722c0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 | ...INSERT.INTO.record(x,y).....V |
722e0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-insert',printf('%d, |
72300 | 25 64 2c 25 66 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%f',new.a,new.b,new.c));...EN |
72320 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 | D;...CREATE.TRIGGER.r3.BEFORE.UP |
72340 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
72360 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
72380 | 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ore-update',printf('%d,%d,%d/%d, |
723a0 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
723c0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
723e0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
72400 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
72420 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
72440 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
72460 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
72480 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
724a0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
724c0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
724e0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
72500 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
72520 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
72540 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | TE.SET.c=t1.c+1;...SELECT.*.FROM |
72560 | 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | .record;...DELETE.FROM.record;.. |
72580 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
725a0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
725c0 | 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T.c=c+1.WHERE.c<0;...SELECT.*.FR |
725e0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 34 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c | OM.record;..Y.4...7..CREATE.TABL |
72600 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
72620 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
72640 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
72660 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
72680 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
726a0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
726c0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 49 53 4e 55 4c 4c 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d'ISNULL,new.b,n |
726e0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
72700 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
72720 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
72740 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
72760 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
72780 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
727a0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
727c0 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
727e0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
72800 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
72820 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
72840 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
72860 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
72880 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
728a0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
728c0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
728e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
72900 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
72920 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
72940 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
72960 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
72980 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
729a0 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
729c0 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
729e0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
72a00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
72a20 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
72a40 | 72 65 63 6f 72 64 3b 0a 88 59 83 33 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;..Y.3...7..CREATE.TABLE.t |
72a60 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
72a80 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
72aa0 | 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x.TEXT,.y.TEXT);...CREATE.TR |
72ac0 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
72ae0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
72b00 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
72b20 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 3c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf('%d,%d,%d'<new.a,new.b,new. |
72b40 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | c));...END;...CREATE.TRIGGER.r2. |
72b60 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.INSERT.ON.t1.BEGIN.....INS |
72b80 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 | ERT.INTO.record(x,y).....VALUES( |
72ba0 | 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | 'after-insert',printf('%d,%d,%d' |
72bc0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
72be0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f | REATE.TRIGGER.r3.BEFORE.UPDATE.O |
72c00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
72c20 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 | d(x,y).........VALUES('before-up |
72c40 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
72c60 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
72c80 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
72ca0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
72cc0 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
72ce0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
72d00 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
72d20 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
72d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
72d60 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
72d80 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
72da0 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
72dc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
72de0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
72e00 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
72e20 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
72e40 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
72e60 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
72e80 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
72ea0 | 6f 72 64 3b 0a 88 49 83 32 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..I.2......CREATE.TABLE.t1(a |
72ec0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
72ee0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
72f00 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
72f20 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
72f40 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
72f60 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
72f80 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2e 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d'.new.a,new.b,new.c)) |
72fa0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
72fc0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
72fe0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
73000 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 72 | ter-insert',printf('%d,%d,%d',.r |
73020 | 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | ound(1,1),new.c));...END;...CREA |
73040 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
73060 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
73080 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
730a0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2e 0a 20 | e',printf('%d,%d,%d/%d,%d,%d'... |
730c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
730e0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
73100 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
73120 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
73140 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
73160 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
73180 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
731a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
731c0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
731e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
73200 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
73220 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
73240 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
73260 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | t1.c+1;...SELd;...DELETE.FROM.re |
73280 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
732a0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
732c0 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
732e0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 31 04 00 91 37 20 20 43 52 45 41 | CT.*.FROM.record;..Y.1...7..CREA |
73300 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
73320 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
73340 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
73360 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
73380 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
733a0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
733c0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 3c | insert',printf('%d,%d,%d',new.a< |
733e0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
73400 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
73420 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
73440 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
73460 | 27 25 64 2c 25 64 2c 25 66 27 2c 6e 65 77 2e 61 3c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%f',new.a<new.b,new.c));. |
73480 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
734a0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
734c0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
734e0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
73500 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
73520 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
73540 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
73560 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
73580 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
735a0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
735c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
735e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
73600 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
73620 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
73640 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
73660 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
73680 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
736a0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
736c0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
736e0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
73700 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
73720 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
73740 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 30 04 00 91 17 20 20 43 52 45 41 54 45 20 | *.FROM.record;..I.0......CREATE. |
73760 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
73780 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
737a0 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
737c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
737e0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
73800 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
73820 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
73840 | 2e 62 ac 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b.new.c));...END;...CREATE.TRIG |
73860 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
73880 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
738a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-insert',printf('%d |
738c0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
738e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
73900 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
73920 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
73940 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
73960 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 28 61 2c 6f 6c 64 | ,%d,%d',...............old(a,old |
73980 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
739a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
739c0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
739e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
73a00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
73a20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
73a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
73a60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
73a80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
73aa0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
73ac0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
73ae0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
73b00 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 | ;...SELECT.*.FROM.record;...DELE |
73b20 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
73b40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
73b60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 | T(a).DO.UPDATE.SET.c=c+1.WHERE.c |
73b80 | 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 60 83 2f | <0;...SELECT.*.FROM.record;..`./ |
73ba0 | 04 00 91 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...E..CREATE.TABLE.t1(a.INTEGER. |
73bc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
73be0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
73c00 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
73c20 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
73c40 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
73c60 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
73c80 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 4f 52 20 74 72 75 65 29 3b 0a | %d',new.a,new.b,new.c)OR.true);. |
73ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
73cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
73ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
73d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
73d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
73d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
73d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
73d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
73da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
73dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
73de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
73e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
73e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
73e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
73e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
73e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
73ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
73ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
73ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
73f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
73f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
73f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
73f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
73f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
73fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
73fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
73fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
74000 | 0d 00 00 00 07 01 c2 00 1b a3 17 73 13 16 0e c9 0a 6c 06 1f 01 c2 00 00 00 00 00 00 00 00 00 00 | ...........s.....l.............. |
74020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
740a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
740c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
740e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
74180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
741a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
741c0 | 00 00 88 59 83 3c 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ...Y.<...7..CREATE.TABLE.t1(a.IN |
741e0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
74200 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
74220 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
74240 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
74260 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
74280 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
742a0 | 25 6c 64 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %ld%d,%d',new.a,new.b,new.c));.. |
742c0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
742e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
74300 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
74320 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
74340 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
74360 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
74380 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
743a0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
743c0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
743e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
74400 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
74420 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
74440 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
74460 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
74480 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
744a0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
744c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
744e0 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
74500 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
74520 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
74540 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
74560 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
74580 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
745a0 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
745c0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
745e0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
74600 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
74620 | 49 83 3b 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | I.;......CREATE.TABLE.t1(a.INTEG |
74640 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
74660 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
74680 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
746a0 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
746c0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
746e0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6c 64 | LUES('before-insert',printf('%ld |
74700 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
74720 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
74740 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
74760 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
74780 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
747a0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
747c0 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
747e0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
74800 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
74820 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
74840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
74860 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
74880 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
748a0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
748c0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
748e0 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
74900 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
74920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
74940 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
74960 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
74980 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
749a0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
749c0 | 4e 46 4c 49 43 54 28 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | NFLICT(.c=t1.c+1;...SELECT.*.FRO |
749e0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
74a00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
74a20 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
74a40 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
74a60 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 3a 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.:...7..CREATE.TAB |
74a80 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
74aa0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
74ac0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
74ae0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
74b00 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
74b20 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
74b40 | 27 2c 70 72 69 6e 74 66 28 27 25 6c 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%l,%d,%d',new.a,new.b, |
74b60 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
74b80 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
74ba0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
74bc0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6c 2c 25 64 | UES('after-insert',printf('%l,%d |
74be0 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
74c00 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
74c20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
74c40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
74c60 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
74c80 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
74ca0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
74cc0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
74ce0 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
74d00 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
74d20 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
74d40 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
74d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
74d80 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
74da0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
74dc0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
74de0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
74e00 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
74e20 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
74e40 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
74e60 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
74e80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
74ea0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
74ec0 | 20 72 65 63 6f 72 64 3b 0a 88 49 83 39 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..I.9......CREATE.TABLE. |
74ee0 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
74f00 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
74f20 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
74f40 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
74f60 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
74f80 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
74fa0 | 72 69 6e 74 66 28 27 25 6c 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%l,%d,%d',new.a,new.b,new |
74fc0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
74fe0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
75000 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
75020 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
75040 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
75060 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
75080 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
750a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
750c0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
750e0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
75100 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
75120 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
75140 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
75160 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
75180 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
751a0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
751c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
751e0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
75200 | 20 45 4e 44 3b 0a 20 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;..REPLACE.INTO.t1(a,b).VALU |
75220 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
75240 | 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | REPLACE.INTO.t1(a,b).VALUES(1,2) |
75260 | 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | .....ON.CONFLICT(.c=t1.c+1;...SE |
75280 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | LECT.*.FROM.record;...DELETE.FRO |
752a0 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | M.record;...INSERT.INTO.t1(a,b). |
752c0 | 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | VALUES(1,2).....ON.CONFLICT(a).D |
752e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 | O.UPDATE.SET.c=c+1.WHERE.c<0;... |
75300 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 38 04 00 91 37 20 20 | SELECT.*.FROM.record;..Y.8...7.. |
75320 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
75340 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
75360 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
75380 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
753a0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
753c0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
753e0 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 20 72 | ore-insert',printf('%g,%d,%d',.r |
75400 | 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | ound(1,1),new.c));...END;...CREA |
75420 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
75440 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
75460 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
75480 | 6e 74 66 28 27 25 67 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%g,%d,%d',new.a,new.b,new.c |
754a0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
754c0 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
754e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
75500 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
75520 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
75540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
75560 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
75580 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
755a0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
755c0 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
755e0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
75600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
75620 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
75640 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
75660 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
75680 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
756a0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
756c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
756e0 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
75700 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
75720 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
75740 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
75760 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 2c 83 37 04 00 90 5d 20 20 43 52 45 | ECT.*.FROM.record;..,.7...]..CRE |
75780 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
757a0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
757c0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
757e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
75800 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
75820 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
75840 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 66 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%f,%d,%d',new.a |
75860 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
75880 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
758a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
758c0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 61 | ....VALUES('after-insert',printa |
758e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 3b | ,old.b,old.c,new.a,new.b,new.c); |
75900 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
75920 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
75940 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
75960 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
75980 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
759a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
759c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
759e0 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
75a00 | 42 45 47 49 4e 0a 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | BEGIN........VALUES('after-updat |
75a20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
75a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
75a60 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
75a80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
75aa0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
75ac0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
75ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
75b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
75b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 39 4f 4d 20 72 | T.*.FROM.record;...DELETE.F9OM.r |
75b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | ecord;...IN).VALUES(1,2).....ON. |
75b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
75b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
75ba0 | 64 3b 0a 88 59 83 36 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.6...7..CREATE.TABLE.t1(a.I |
75bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
75be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
75c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
75c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
75c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
75c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
75c80 | 27 25 65 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%e,%d,%d',new.a,new.b,new.c));. |
75ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
75cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
75ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
75d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 65 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%e,%d,%d',new. |
75d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
75d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
75d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
75d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
75da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
75dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
75de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
75e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
75e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
75e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
75e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
75e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
75ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
75ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
75ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
75f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
75f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
75f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
75f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
75f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
75fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
75fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
75fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
76000 | 0d 00 00 00 07 01 a5 00 1b b3 17 66 13 09 0e ac 0a 4f 06 02 01 a5 00 00 00 00 00 00 00 00 00 00 | ...........f.....O.............. |
76020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
760a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
760c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
760e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
76180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
761a0 | 00 00 00 00 00 88 59 83 43 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ......Y.C...7..CREATE.TABLE.t1(a |
761c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
761e0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
76200 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
76220 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
76240 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
76260 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
76280 | 66 28 27 25 70 2c 25 64 2c 25 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 | f('%p,%d,%d',.round(1,1),new.c)) |
762a0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
762c0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
762e0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
76300 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
76320 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
76340 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
76360 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
76380 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
763a0 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
763c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
763e0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
76400 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
76420 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
76440 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
76460 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
76480 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
764a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
764c0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
764e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
76500 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
76520 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
76540 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
76560 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
76580 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
765a0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
765c0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
765e0 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
76600 | 3b 0a 88 49 83 42 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..I.B......CREATE.TABLE.t1(a.IN |
76620 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
76640 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 | ULT.0);...CREATE.TABLE.record(x. |
76660 | 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | TEXT,.y.TEXT);...CREATE.TRIGGER. |
76680 | 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r1.BEFORE.INSERT.ON.t1.BEGIN.... |
766a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
766c0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-insert',printf(' |
766e0 | 25 70 2c 25 64 2c 25 64 27 2c 20 72 6f 75 6e 64 28 31 2c 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %p,%d,%d',.round(1,1),new.c));.. |
76700 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r2.AFTER. |
76720 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
76740 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | TO.record(x,y).....VALUES('after |
76760 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%d,%d,%d',new.a |
76780 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
767a0 | 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r3.BEFORE.UPDATE.ON.t1.B |
767c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
767e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c | .........VALUES('before-update', |
76800 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
76820 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
76840 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
76860 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
76880 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
768a0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
768c0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
768e0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
76900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
76920 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
76940 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
76960 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
76980 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 00 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
769a0 | 20 43 4f 4e 46 4c 49 43 54 28 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | .CONFLICT(.c=t1.c+1;...SELECT.*. |
769c0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
769e0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
76a00 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
76a20 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
76a40 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 41 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y.A...7..CREATE. |
76a60 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
76a80 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
76aa0 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
76ac0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
76ae0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
76b00 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
76b20 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6e 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%n,%d,%d',new.a,new |
76b40 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
76b60 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
76b80 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
76ba0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6e | VALUES('after-insert',printf('%n |
76bc0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
76be0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
76c00 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
76c20 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
76c40 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
76c60 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
76c80 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
76ca0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
76cc0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
76ce0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
76d00 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
76d20 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
76d40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
76d60 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
76d80 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
76da0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(1,2);...DELETE.FROM.rec |
76dc0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
76de0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
76e00 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
76e20 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
76e40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
76e60 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
76e80 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
76ea0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 40 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.@...7..CREATE.TAB |
76ec0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
76ee0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
76f00 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
76f20 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
76f40 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
76f60 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
76f80 | 27 2c 70 72 69 6e 74 66 28 27 25 6e 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%n,%d,%d',new.a,new.b, |
76fa0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
76fc0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
76fe0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
77000 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
77020 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
77040 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
77060 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
77080 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
770a0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
770c0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
770e0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
77100 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
77120 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
77140 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
77160 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
77180 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
771a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
771c0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
771e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
77200 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
77220 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
77240 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
77260 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
77280 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
772a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
772c0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
772e0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
77300 | 20 72 65 63 6f 72 64 3b 0a 88 59 83 3f 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.?...7..CREATE.TABLE. |
77320 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
77340 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
77360 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
77380 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
773a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
773c0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
773e0 | 72 69 6e 74 66 28 27 25 6e 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%n,%d,%d',new.a,new.b,new |
77400 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
77420 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
77440 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
77460 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
77480 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
774a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
774c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
774e0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
77500 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
77520 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
77540 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
77560 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
77580 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
775a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
775c0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
775e0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
77600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
77620 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
77640 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
77660 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
77680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
776a0 | 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
776c0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
776e0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
77700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
77720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
77740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
77760 | 63 6f 72 64 3b 0a 88 49 83 3e 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I.>......CREATE.TABLE.t1( |
77780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
777a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
777c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
777e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
77800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
77820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
77840 | 74 66 28 27 25 6e 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%n,%d,%d',new.a,new.b,new.c) |
77860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
77880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
778a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
778c0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 6a 73 6f 6e 5f 73 65 74 28 31 2c | fter-insert',printf(.json_set(1, |
778e0 | 31 2c 31 29 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | 1,1),new.b,new.c));...END;...CRE |
77900 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
77920 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
77940 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
77960 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
77980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
779a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
779c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
779e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
77a00 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
77a20 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
77a40 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
77a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
77a80 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
77aa0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
77ac0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | 1,2);...DELETEINSERT.INTO.t1(a,b |
77ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
77b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
77b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
77b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
77b60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
77b80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
77ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 3d 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.=......CRE |
77bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
77be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
77c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
77c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
77c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
77c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
77c80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6c 64 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | -insert',printf('%ld%d,%d',new.a |
77ca0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
77cc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
77ce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
77d00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
77d20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
77d40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
77d60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
77d80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
77da0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
77dc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
77de0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
77e00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
77e20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
77e40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
77e60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
77e80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
77ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
77ec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
77ee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
77f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 8a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
77f20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
77f40 | 41 4c 55 45 53 28 31 2c 32 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 63 3d 74 31 | ALUES(1,2).....ON.CONFLICT(.c=t1 |
77f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
77f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
77fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
77fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
77fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
78000 | 0d 00 00 00 07 01 5a 00 1b a3 17 46 12 e9 0e 8c 0a 2f 05 d2 01 5a 00 00 00 00 00 00 00 00 00 00 | ......Z....F...../...Z.......... |
78020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
780a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
780c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
780e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
78140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 74 83 4a 04 00 | ...........................t.J.. |
78160 | 91 6d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .m..CREATE.TABLE.t1(a.INTEGER.PR |
78180 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
781a0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
781c0 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
781e0 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
78200 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
78220 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 72 2c 25 64 2c 25 64 | 'before-insert',printf('%r,%d,%d |
78240 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
78260 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
78280 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
782a0 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
782c0 | 2c 70 72 69 6e 74 66 28 27 25 54 2c 25 44 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%T,%D,%d',new.a,new.b,n |
782e0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
78300 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
78320 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 20 49 4e 53 45 | .DELETE.FROM.t1.WHERE.a=7;..INSE |
78340 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
78360 | 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-update',printf('%d,%d |
78380 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
783a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
783c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
783e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
78400 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
78420 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
78440 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
78460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
78480 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
784a0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
784c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(9,2);...DELETE.FR |
784e0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
78500 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
78520 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
78540 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
78560 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
78580 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
785a0 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
785c0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 49 04 00 91 37 20 20 43 52 45 41 | CT.*.FROM.record;..Y.I...7..CREA |
785e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
78600 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
78620 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
78640 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
78660 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
78680 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
786a0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 72 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2b | insert',printf('%r,%d,%d',new.a+ |
786c0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
786e0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
78700 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
78720 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
78740 | 27 25 54 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%T,%d,%d',new.a,new.b,new.c));. |
78760 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
78780 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
787a0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
787c0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
787e0 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
78800 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
78820 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
78840 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
78860 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
78880 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
788a0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
788c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
788e0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
78900 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
78920 | 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(9,2);...DELETE.FROM. |
78940 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
78960 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
78980 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
789a0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
789c0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
789e0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
78a00 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
78a20 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 48 04 00 91 37 20 20 43 52 45 41 54 45 20 | *.FROM.record;..Y.H...7..CREATE. |
78a40 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
78a60 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
78a80 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
78aa0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
78ac0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
78ae0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
78b00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 72 2c 25 64 2c 25 64 27 2c 20 75 6e 69 63 6f 64 65 28 | ert',printf('%r,%d,%d',.unicode( |
78b20 | 31 29 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | 1),new.c));...END;...CREATE.TRIG |
78b40 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
78b60 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
78b80 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 54 | VALUES('after-insert',printf('%T |
78ba0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
78bc0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
78be0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
78c00 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
78c20 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
78c40 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
78c60 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e | .......old.a,old.b,old.c,new.a,n |
78c80 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
78ca0 | 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r4.AFTER.UPDATE.ON.t1.BEGI |
78cc0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
78ce0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | ......VALUES('after-update',prin |
78d00 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
78d20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
78d40 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
78d60 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | c));...END;...INSERT.INTO.t1(a,b |
78d80 | 29 20 56 41 4c 55 45 53 28 39 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 | ).VALUES(9,2);...DELETE.FROM.rec |
78da0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.INTO.t1(a,b).VALUE |
78dc0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON.CONFLICT(a).DO.UPD |
78de0 | 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | ATE.SET.c=t1.c+1;...SELECT.*.FRO |
78e00 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELETE.FROM.record;. |
78e20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
78e40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
78e60 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
78e80 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 47 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..Y.G...7..CREATE.TAB |
78ea0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
78ec0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
78ee0 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
78f00 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
78f20 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
78f40 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
78f60 | 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%q,%d,%d',new.a,new.b, |
78f80 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
78fa0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
78fc0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
78fe0 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 | UES('after-insert',printf('%q,%d |
79000 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
79020 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
79040 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
79060 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
79080 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
790a0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
790c0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
790e0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
79100 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
79120 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
79140 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
79160 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
79180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
791a0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
791c0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
791e0 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
79200 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
79220 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
79240 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
79260 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
79280 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
792a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
792c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
792e0 | 20 72 65 63 6f 72 64 3b 0a 88 59 83 46 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..Y.F...7..CREATE.TABLE. |
79300 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
79320 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
79340 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
79360 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
79380 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
793a0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 | ........VALUES('before-insert',p |
793c0 | 72 69 6e 74 66 28 27 25 70 2c 25 70 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%p,%p,%d',new.a,new.b,new |
793e0 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | .c));...END;...CREATE.TRIGGER.r2 |
79400 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.INSERT.ON.t1.BEGIN.....IN |
79420 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 | SERT.INTO.record(x,y).....VALUES |
79440 | 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-insert',printf('%d,%d,%d |
79460 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
79480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 | CREATE.TRIGGER.r3.BEFORE.UPDATE. |
794a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
794c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 | rd(x,y).........VALUES('before-u |
794e0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
79500 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
79520 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
79540 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
79560 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
79580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
795a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
795c0 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
795e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
79600 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
79620 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
79640 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
79660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
79680 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
796a0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
796c0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
796e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
79700 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
79720 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
79740 | 63 6f 72 64 3b 0a 88 59 83 45 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..Y.E...7..CREATE.TABLE.t1( |
79760 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
79780 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
797a0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
797c0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
797e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
79800 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
79820 | 74 66 28 27 25 70 2c 25 6f 2c 25 6f 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | tf('%p,%o,%o',new.a,new.b,new.c) |
79840 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
79860 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
79880 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
798a0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
798c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
798e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
79900 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
79920 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
79940 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
79960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
79980 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
799a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
799c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
799e0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
79a00 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
79a20 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
79a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
79a60 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
79a80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
79aa0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
79ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
79ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
79b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
79b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
79b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
79b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
79b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
79ba0 | 64 3b 0a 88 59 83 44 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.D...7..CREATE.TABLE.t1(a.I |
79bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
79be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
79c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
79c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
79c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
79c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
79c80 | 27 25 70 2c 25 6f 2c 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a | '%p,%o,%d',.julianday(1,1,1)));. |
79ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
79cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
79ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
79d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
79d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
79d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
79d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
79d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
79da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
79dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
79de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
79e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
79e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
79e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
79e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
79e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
79ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
79ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
79ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
79f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
79f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
79f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
79f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
79f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
79fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
79fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
79fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
7a000 | 0d 00 00 00 07 01 d3 00 1b a3 17 54 13 07 0e ba 0a 6d 06 20 01 d3 00 00 00 00 00 00 00 00 00 00 | ...........T.....m.............. |
7a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7a1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 83 51 04 00 91 17 20 20 43 52 45 | ....................I.Q......CRE |
7a1e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
7a200 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
7a220 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
7a240 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
7a260 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
7a280 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
7a2a0 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 73 2c 25 64 2c 25 64 27 2c 20 6a 75 6c 69 | -insert',printf('%s,%d,%d',.juli |
7a2c0 | 61 6e 64 61 79 28 20 31 3d 31 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | anday(.1=11)));...END;...CREATE. |
7a2e0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
7a300 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
7a320 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
7a340 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
7a360 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
7a380 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
7a3a0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
7a3c0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
7a3e0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
7a400 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
7a420 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
7a440 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
7a460 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
7a480 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
7a4a0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
7a4c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
7a4e0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
7a500 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
7a520 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
7a540 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
7a560 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
7a580 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
7a5a0 | 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .FROM..ecor.record;...INSERT.INT |
7a5c0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
7a5e0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
7a600 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
7a620 | 88 49 83 50 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .I.P......CREATE.TABLE.t1(a.INTE |
7a640 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
7a660 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
7a680 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
7a6a0 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
7a6c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
7a6e0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 73 | ALUES('before-insert',printf('%s |
7a700 | 2c 25 58 2c 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 | ,%X,%d',.julianday(1,1,1)));...E |
7a720 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
7a740 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
7a760 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
7a780 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
7a7a0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
7a7c0 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
7a7e0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
7a800 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
7a820 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
7a840 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
7a860 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
7a880 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
7a8a0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
7a8c0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
7a8e0 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
7a900 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
7a920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
7a940 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
7a960 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
7a980 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
7a9a0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
7a9c0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
7a9e0 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b | 1;...SELECT.*.FROM..ecor.record; |
7aa00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
7aa20 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
7aa40 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
7aa60 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 4f 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..I.O......CREATE.TA |
7aa80 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
7aaa0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
7aac0 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
7aae0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
7ab00 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
7ab20 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
7ab40 | 74 27 2c 70 72 69 6e 74 66 28 27 25 73 2c 25 58 2c 25 58 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 | t',printf('%s,%X,%X',.julianday( |
7ab60 | 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | 1,1,1)));...END;...CREATE.TRIGGE |
7ab80 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
7aba0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
7abc0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
7abe0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
7ac00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
7ac20 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
7ac40 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
7ac60 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
7ac80 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
7aca0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
7acc0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
7ace0 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
7ad00 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
7ad20 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
7ad40 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
7ad60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
7ad80 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
7ada0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
7adc0 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
7ade0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
7ae00 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
7ae20 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
7ae40 | 01 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .ecor.record;...INSERT.INTO.t1(a |
7ae60 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
7ae80 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
7aea0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 4e 04 00 | ;...SELECT.*.FROM.record;..I.N.. |
7aec0 | 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
7aee0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
7af00 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 | ..CREATE.TABLE.record(x.TEXT,.y. |
7af20 | 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | TEXT);...CREATE.TRIGGER.r1.BEFOR |
7af40 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
7af60 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
7af80 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 73 2c 25 2e 2a 25 64 | 'before-insert',printf('%s,%.*%d |
7afa0 | 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',.julianday(1,1,1)));...END;... |
7afc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
7afe0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
7b000 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
7b020 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
7b040 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
7b060 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
7b080 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
7b0a0 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
7b0c0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
7b0e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
7b100 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
7b120 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
7b140 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
7b160 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
7b180 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
7b1a0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
7b1c0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
7b1e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
7b200 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
7b220 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
7b240 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (a,b).VALUES(1,2).....ON.CONFLIC |
7b260 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 | T(a).DO.UPDATE.SET.c=t1.c+1;...S |
7b280 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ELECT.*.FROM..ecor.record;...INS |
7b2a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 | ERT.INTO.t1(a,b).VALUES(1,2).... |
7b2c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
7b2e0 | 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | c+1.WHERE.c<0;...SELECT.*.FROM.r |
7b300 | 65 63 6f 72 64 3b 0a 88 49 83 4d 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ecord;..I.M......CREATE.TABLE.t1 |
7b320 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
7b340 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
7b360 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y.TEXT);...CREATE.TRI |
7b380 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
7b3a0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
7b3c0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
7b3e0 | 6e 74 66 28 27 25 73 2c 25 20 2a 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 | ntf('%s,%.*%d',.julianday(1,1,1) |
7b400 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
7b420 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
7b440 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
7b460 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
7b480 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
7b4a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
7b4c0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
7b4e0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
7b500 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
7b520 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
7b540 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
7b560 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
7b580 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
7b5a0 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
7b5c0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
7b5e0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
7b600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
7b620 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
7b640 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
7b660 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
7b680 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
7b6a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
7b6c0 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 | c=t1.c+1;...SELECT.*.FROM..ecor. |
7b6e0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
7b700 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
7b720 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 | UPDATE.SET.c=c+1.WHERE.c<0;...SE |
7b740 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 83 4c 04 00 91 1b 20 20 43 52 | LECT.*.FROM.record;..K.L......CR |
7b760 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
7b780 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
7b7a0 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
7b7c0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
7b7e0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
7b800 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
7b820 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 72 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | e-insert',printf('%r,%d,%d',new. |
7b840 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
7b860 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
7b880 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
7b8a0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
7b8c0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
7b8e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
7b900 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
7b920 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
7b940 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
7b960 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | %d/%d,%d,%d',...............old. |
7b980 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
7b9a0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
7b9c0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
7b9e0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
7ba00 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
7ba20 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
7ba40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
7ba60 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
7ba80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(c,b).VALUES(1, |
7baa0 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
7bac0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 | RT.INTO.t1(a,b).VALUES(1,2).ON.C |
7bae0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
7bb00 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
7bb20 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
7bb40 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
7bb60 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
7bb80 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 | c<0;...SELECT.*.FROM.record;VACU |
7bba0 | 55 4d 0a 88 59 83 4b 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | UM..Y.K...7..CREATE.TABLE.t1(a.I |
7bbc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
7bbe0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
7bc00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
7bc20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
7bc40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
7bc60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
7bc80 | 27 25 72 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%r,%d,%d',new.a,new.b,new.c));. |
7bca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
7bcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
7bce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
7bd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 54 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%T,%d,%d',new. |
7bd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
7bd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
7bd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
7bd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
7bda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
7bdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
7bde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
7be00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
7be20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
7be40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
7be60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
7be80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
7bea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
7bec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
7bee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(9,2 |
7bf00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
7bf20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(9,2).....O |
7bf40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
7bf60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
7bf80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
7bfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
7bfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
7bfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
7c000 | 0d 00 00 00 07 01 c5 00 1b b3 17 66 13 19 0e cc 0a 7f 06 32 01 c5 00 00 00 00 00 00 00 00 00 00 | ...........f.......2............ |
7c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7c1c0 | 00 00 00 00 00 88 69 83 58 04 00 91 57 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ......i.X...W..CREATE.TABLE.t1(a |
7c1e0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
7c200 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
7c220 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
7c240 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
7c260 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
7c280 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
7c2a0 | 66 28 44 49 53 54 49 4e 43 54 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | f(DISTINCT'%d,%d,%d',new.a,new.b |
7c2c0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
7c2e0 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
7c300 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
7c320 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
7c340 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
7c360 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
7c380 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
7c3a0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
7c3c0 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
7c3e0 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
7c400 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
7c420 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
7c440 | 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r4.AFTER.UPDATE.ON.t1.BEGIN. |
7c460 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
7c480 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ....VALUES('after-update',printf |
7c4a0 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
7c4c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
7c4e0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
7c500 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | );...END;...INSERT.INTO.t1(a,b). |
7c520 | 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | VALUES(1,2);...DELETE.FROM.recor |
7c540 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
7c560 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
7c580 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 | E.SET.c=t1.c+1;...SELECT.DISTINC |
7c5a0 | 54 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | T*.FROM.record;...DELETE.FROM.re |
7c5c0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
7c5e0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
7c600 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
7c620 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 57 04 00 91 17 20 20 43 52 45 41 | CT.*.FROM.record;..I.W......CREA |
7c640 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
7c660 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
7c680 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
7c6a0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
7c6c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
7c6e0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
7c700 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 77 2c 25 64 2c 25 64 27 2c 20 6a 75 6c 69 61 | insert',printf('%w,%d,%d',.julia |
7c720 | 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | nday(1,1,1)));...END;...CREATE.T |
7c740 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
7c760 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
7c780 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
7c7a0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
7c7c0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
7c7e0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
7c800 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
7c820 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
7c840 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
7c860 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
7c880 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
7c8a0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
7c8c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
7c8e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
7c900 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
7c920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
7c940 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
7c960 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
7c980 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
7c9a0 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
7c9c0 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
7c9e0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
7ca00 | 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | FROM..ecor.record;...INSERT.INTO |
7ca20 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
7ca40 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
7ca60 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 | E.c<0;...SELECT.*.FROM.record;.. |
7ca80 | 49 83 56 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | I.V......CREATE.TABLE.t1(a.INTEG |
7caa0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
7cac0 | 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | .0);...CREATE.TABLE.record(x.TEX |
7cae0 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
7cb00 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
7cb20 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
7cb40 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 75 2c | LUES('before-insert',printf('%u, |
7cb60 | 25 64 2c 25 64 27 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e | %d,%d',.julianday(1,1,1)));...EN |
7cb80 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
7cba0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
7cbc0 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
7cbe0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
7cc00 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
7cc20 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
7cc40 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
7cc60 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
7cc80 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
7cca0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
7ccc0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
7cce0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
7cd00 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
7cd20 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
7cd40 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
7cd60 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
7cd80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
7cda0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
7cdc0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
7cde0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
7ce00 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
7ce20 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 | NFLICT(a).DO.UPDATE.SET.c=t1.c+1 |
7ce40 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a | ;...SELECT.*.FROM..ecor.record;. |
7ce60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
7ce80 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
7cea0 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
7cec0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 55 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 | ROM.record;..I.U......CREATE.TAB |
7cee0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
7cf00 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
7cf20 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
7cf40 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
7cf60 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
7cf80 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | y).........VALUES('before-insert |
7cfa0 | 27 2c 70 72 69 6e 74 66 28 27 25 73 2c 25 7a 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%s,%z,%d',new.a,new.b, |
7cfc0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
7cfe0 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
7d000 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c | .INSERT.INTO.record(x,y).....VAL |
7d020 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
7d040 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
7d060 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
7d080 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
7d0a0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
7d0c0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
7d0e0 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
7d100 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
7d120 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
7d140 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
7d160 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
7d180 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
7d1a0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
7d1c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
7d1e0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
7d200 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
7d220 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
7d240 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
7d260 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
7d280 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 | .SET.c=t1.c+1;...SELECT.*.FROM.. |
7d2a0 | 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | ecor.record;...INSERT.INTO.t1(a, |
7d2c0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2).....ON.CONFLICT(a |
7d2e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
7d300 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 54 04 00 91 | ...SELECT.*.FROM.record;..I.T... |
7d320 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
7d340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
7d360 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
7d380 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
7d3a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
7d3c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
7d3e0 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 73 2c 25 71 2c 25 64 27 | before-insert',printf('%s,%q,%d' |
7d400 | 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,.julianday(1,1,1)));...END;...C |
7d420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
7d440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
7d460 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
7d480 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
7d4a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
7d4c0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
7d4e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
7d500 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
7d520 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
7d540 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
7d560 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
7d580 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r4.AFTER.UPDATE. |
7d5a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
7d5c0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 | rd(x,y).........VALUES('after-up |
7d5e0 | 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 | date',printf('%d,%d,%d/%d,%d,%d' |
7d600 | 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,............................... |
7d620 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
7d640 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 | new.b,new.c));...END;...INSERT.I |
7d660 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 | NTO.t1(a,b).VALUES(1,2);...DELET |
7d680 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
7d6a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
7d6c0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 | (a).DO.UPDATE.SET.c=t1.c+1;...SE |
7d6e0 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | LECT.*.FROM..ecor.record;...INSE |
7d700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
7d720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
7d740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
7d760 | 63 6f 72 64 3b 0a 88 49 83 53 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I.S......CREATE.TABLE.t1( |
7d780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
7d7a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
7d7c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
7d7e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
7d800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
7d820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e | .....VALUES('before-insert',prin |
7d840 | 74 66 28 27 25 73 2c 25 64 2c 25 64 27 2c 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 | tf('%s,%d,%d',.sqlite_version()) |
7d860 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | );...END;...CREATE.TRIGGER.r2.AF |
7d880 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.INSERT.ON.t1.BEGIN.....INSER |
7d8a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
7d8c0 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
7d8e0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
7d900 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 | ATE.TRIGGER.r3.BEFORE.UPDATE.ON. |
7d920 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
7d940 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 | x,y).........VALUES('before-upda |
7d960 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
7d980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | ..............................ol |
7d9a0 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
7d9c0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
7d9e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
7da00 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
7da20 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
7da40 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
7da60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
7da80 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
7daa0 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
7dac0 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
7dae0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
7db00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
7db20 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 01 65 63 6f 72 20 72 | =t1.c+1;...SELECT.*.FROM..ecor.r |
7db40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
7db60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
7db80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
7dba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 52 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.R......CRE |
7dbc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
7dbe0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
7dc00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
7dc20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
7dc40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
7dc60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
7dc80 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 73 2c 25 64 2c 25 64 27 2c 20 6a 75 6c 69 | -insert',printf('%s,%d,%d',.juli |
7dca0 | 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | anday(1,1,1)));...END;...CREATE. |
7dcc0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
7dce0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
7dd00 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
7dd20 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
7dd40 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
7dd60 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
7dd80 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
7dda0 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
7ddc0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
7dde0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
7de00 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
7de20 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
7de40 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
7de60 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
7de80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
7dea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
7dec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
7dee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
7df00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
7df20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
7df40 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
7df60 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 63 | .UPDATE.SET.c=t1.c+1;...SELECT.c |
7df80 | 6f 61 6c 65 73 63 65 28 31 2c 31 29 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | oalesce(1,1)record;...INSERT.INT |
7dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
7dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
7dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
7e000 | 0d 00 00 00 07 01 7e 00 1b 9b 17 2e 12 ce 0e 69 0a 18 05 cb 01 7e 00 00 00 00 00 00 00 00 00 00 | ......~........i.....~.......... |
7e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
7e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 | ...............................I |
7e180 | 83 5f 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | ._......CREATE.TABLE.t1(a.INTEGE |
7e1a0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
7e1c0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
7e1e0 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
7e200 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
7e220 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
7e240 | 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | UES('bsert',printf('%d,%d,%d',ne |
7e260 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
7e280 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
7e2a0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
7e2c0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
7e2e0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
7e300 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
7e320 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
7e340 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
7e360 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
7e380 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 45 59 2c 20 62 20 69 6e 20 73 74 72 66 74 69 | d,%d/%d,%d,%d',..EY,.b.in.strfti |
7e3a0 | 6d 65 28 31 2c 3f 2c 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | me(1,?,1,1),old.b,old.c,new.a,ne |
7e3c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
7e3e0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
7e400 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
7e420 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
7e440 | 66 28 27 25 64 2c 25 00 00 01 00 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%..../%d,%d,%d',.......... |
7e460 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
7e480 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
7e4a0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
7e4c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
7e4e0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
7e500 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
7e520 | 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | TE.SET.c=t1.c+1;...SELECT.*.FROM |
7e540 | 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | .record;...DELETE.FROM.record;.. |
7e560 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
7e580 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
7e5a0 | 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | T.c=c+1.WHERE.c<0;...SELECT.*.FR |
7e5c0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 5e 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c | OM.record;..I.^......CREATE.TABL |
7e5e0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
7e600 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
7e620 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
7e640 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
7e660 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
7e680 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ).........VALUES('bsert',printf( |
7e6a0 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
7e6c0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
7e6e0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
7e700 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
7e720 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
7e740 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
7e760 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
7e780 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
7e7a0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
7e7c0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 45 59 | ,printf('%d,%d,%d/%d,%d,%d',..EY |
7e7e0 | 2c 20 62 20 69 6e 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 3f 2c 31 29 2c 6f 6c 64 2e 62 2c 6f | ,.b.in.strftime(1,1,?,1),old.b,o |
7e800 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
7e820 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 | ...CREATE.TRIGGER.r4.AFTER.UPDAT |
7e840 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
7e860 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | cord(x,y).........VALUES('after- |
7e880 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 00 00 01 00 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%..../%d,%d,% |
7e8a0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d',............................. |
7e8c0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
7e8e0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 | a,new.b,new.c));...END;...INSERT |
7e900 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c | .INTO.t1(a,b).VALUES(1,2);...DEL |
7e920 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
7e940 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
7e960 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 | CT(a).DO.UPDATE.SET.c=t1.c+1;... |
7e980 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | SELECT.*.FROM.record;...DELETE.F |
7e9a0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
7e9c0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
7e9e0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
7ea00 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4d 83 5d 04 00 91 1f | ..SELECT.*.FROM.record;..M.].... |
7ea20 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
7ea40 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
7ea60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
7ea80 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
7eaa0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
7eac0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
7eae0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
7eb00 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
7eb20 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
7eb40 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 | .....INSERT.INTO.record(x,y).... |
7eb60 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
7eb80 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
7eba0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
7ebc0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
7ebe0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
7ec00 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
7ec20 | 64 2c 25 64 2c 25 64 27 2c 0a 20 45 59 2c 20 62 20 69 6e 20 73 74 72 66 74 69 6d 65 28 20 61 2c | d,%d,%d',..EY,.b.in.strftime(.a, |
7ec40 | 62 31 2c 31 2c 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | b1,1,1,1),old.b,old.c,new.a,new. |
7ec60 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
7ec80 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
7eca0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
7ecc0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
7ece0 | 27 25 64 2c 25 00 00 01 00 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%..../%d,%d,%d',............ |
7ed00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
7ed20 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
7ed40 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
7ed60 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
7ed80 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
7eda0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
7edc0 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
7ede0 | 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | ecord;...DELETE.FROM.record;...I |
7ee00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
7ee20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
7ee40 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
7ee60 | 20 72 65 63 6f 72 64 3b 0a 88 61 83 5c 04 00 91 47 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..a.\...G..CREATE.TABLE. |
7ee80 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
7eea0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 | .c.DEFAULT.0);...CREATE.TABLE.re |
7eec0 | 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | cord(x.TEXT,.y.TEXT);...CREATE.T |
7eee0 | 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | RIGGER.r1.BEFORE.INSERT.ON.t1.BE |
7ef00 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
7ef20 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 4f 52 | ........VALUES('before-insert'OR |
7ef40 | 20 66 61 6c 73 65 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | .false,printf('%d,%d,%d',new.a,n |
7ef60 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
7ef80 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
7efa0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
7efc0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
7efe0 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
7f000 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
7f020 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
7f040 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
7f060 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
7f080 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
7f0a0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
7f0c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
7f0e0 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
7f100 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
7f120 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
7f140 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
7f160 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
7f180 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
7f1a0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
7f1c0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
7f1e0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
7f200 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
7f220 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
7f240 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
7f260 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
7f280 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
7f2a0 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELECT.* |
7f2c0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5c 83 5b 04 00 91 3d 20 20 43 52 45 41 54 45 20 54 | .FROM.record;..\.[...=..CREATE.T |
7f2e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
7f300 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 | .int,.c.DEFAULT.0);...CREATE.TAB |
7f320 | 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | LE.record(x.TEXT,.y.TEXT);...CRE |
7f340 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
7f360 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
7f380 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
7f3a0 | 72 74 27 2c 70 72 69 6e 74 66 28 4e 4f 54 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 2c 6e | rt',printf(NOT.datetime(1,1,1),n |
7f3c0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
7f3e0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
7f400 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
7f420 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
7f440 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
7f460 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
7f480 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
7f4a0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
7f4c0 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
7f4e0 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
7f500 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
7f520 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
7f540 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
7f560 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
7f580 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
7f5a0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
7f5c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
7f5e0 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
7f600 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
7f620 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
7f640 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
7f660 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
7f680 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
7f6a0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
7f6c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
7f6e0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
7f700 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELECT.* |
7f720 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 69 83 5a 04 00 91 57 20 20 43 52 45 41 54 45 20 54 | .FROM.record;..i.Z...W..CREATE.T |
7f740 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
7f760 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 | .int,.c.DEFAULT.0);...CREATE.TAB |
7f780 | 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | LE.record(x.TEXT,.y.TEXT);...CRE |
7f7a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
7f7c0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
7f7e0 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
7f800 | 72 74 27 2c 70 72 69 6e 74 66 28 44 49 53 54 49 4e 43 54 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | rt',printf(DISTINCT'%d,%d,%d',ne |
7f820 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
7f840 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
7f860 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
7f880 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
7f8a0 | 6e 74 66 28 44 49 53 54 49 4e 43 54 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ntf(DISTINCT'%d,%d,%d',new.a,new |
7f8c0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
7f8e0 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
7f900 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
7f920 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
7f940 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
7f960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
7f980 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
7f9a0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
7f9c0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
7f9e0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
7fa00 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
7fa20 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
7fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
7fa60 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 | ew.a,new.b,new.c));...END;...INS |
7fa80 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 | ERT.INTO.t1(a,b).VALUES(1,2);... |
7faa0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
7fac0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
7fae0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b | FLICT(a).DO.UPDATE.SET.c=t1.c+1; |
7fb00 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 | ...SELECT.*.FROM.record;...DELET |
7fb20 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
7fb40 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
7fb60 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c | (a).DO.UPDATE.SET.c=c+1.WHERE.c< |
7fb80 | 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 61 83 59 04 | 0;...SELECT.*.FROM.record;..a.Y. |
7fba0 | 00 91 47 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..G..CREATE.TABLE.t1(a.INTEGER.P |
7fbc0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
7fbe0 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
7fc00 | 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | .TEXT);...CREATE.TRIGGER.r1.BEFO |
7fc20 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
7fc40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
7fc60 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 44 49 53 54 49 4e 43 54 | ('before-insert',printf(DISTINCT |
7fc80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
7fca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
7fcc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
7fce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
7fd00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
7fd20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
7fd40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
7fd60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
7fd80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
7fda0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
7fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
7fde0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
7fe00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
7fe20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
7fe40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
7fe60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
7fe80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
7fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
7fec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
7fee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
7ff00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
7ff20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 3f 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,?).....O |
7ff40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
7ff60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
7ff80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
7ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
7ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
7ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
80000 | 0d 00 00 00 07 01 ec 00 1b b3 17 66 13 19 0e ca 0a 75 06 45 01 ec 00 00 00 00 00 00 00 00 00 00 | ...........f.....u.E............ |
80020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
800a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
800c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
800e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
80180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
801a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
801c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
801e0 | 00 00 00 00 00 00 00 00 00 00 00 00 88 55 83 66 04 00 91 2f 20 20 43 52 45 41 54 45 20 54 41 42 | .............U.f.../..CREATE.TAB |
80200 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
80220 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | nt,.c.DEFAULT.0);...CREATE.TABLE |
80240 | 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 | .record(x.TEXT,.y.TEXT);...CREAT |
80260 | 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | E.TRIGGER.r1.BEFORE.INSERT.ON.t1 |
80280 | 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 | .BEGIN...WITH.c(x).AS.(values(1) |
802a0 | 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 | )..........VALUES('before-insert |
802c0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf('%d,%d,%d',new.a,new.b, |
802e0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
80300 | 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | .r2.AFTER.INSERT.ON.t1.BEGIN.... |
80320 | 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 56 41 4c | .WITH.c(x).AS.(values(1))....VAL |
80340 | 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-insert',printf('%d,%d |
80360 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
80380 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 | ...CREATE.TRIGGER.r3.BEFORE.UPDA |
803a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 | TE.ON.t1.BEGIN...WITH.c(x).AS.(v |
803c0 | 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | alues(1))..........VALUES('befor |
803e0 | 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | e-update',printf('%d,%d,%d/%d,%d |
80400 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
80420 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
80440 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
80460 | 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r4.AFTER.UPDATE.ON.t1.BEGIN.. |
80480 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
804a0 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-update',printf( |
804c0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
804e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
80500 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
80520 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
80540 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
80560 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
80580 | 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ,2).ON.CONFLICT(a).DO.UPDATE.SET |
805a0 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
805c0 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | d;...DELETE.FROM.record;...INSER |
805e0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
80600 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b | N.CONFLICT(a).DO.UPDATE.SET.c=c+ |
80620 | 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 | 1.WHERE.c<0;...SELECT.*.FROM.rec |
80640 | 6f 72 64 3b 0a 88 2c 83 65 04 00 90 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ord;..,.e...]..CREATE.TABLE.t1(a |
80660 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
80680 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 | EFAULT.0);...CREATE.TABLE.record |
806a0 | 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | (x.TEXT,.y.TEXT);...CREATE.TRIGG |
806c0 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
806e0 | 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 | ..WITH.c(x).AS.(values(1))...... |
80700 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
80720 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
80740 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
80760 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
80780 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
807a0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
807c0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
807e0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
80800 | 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | 1.BEGIN...WITH.c(x).AS.(values(1 |
80820 | 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ))..........VALUES('before-updat |
80840 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
80860 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
80880 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
808a0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
808c0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 20 20 20 56 | FTER.UPDATE.ON.t1.BEGIN........V |
808e0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
80900 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
80920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
80940 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
80960 | 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 | .WITH.c(x).AS.(values(1))..VALUE |
80980 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
809a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
809c0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
809e0 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | .c=t1.c+1;...SELECT.*.FROM.recor |
80a00 | 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 39 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 29 20 56 | d;...DELETE.F9OM.record;...IN).V |
80a20 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
80a40 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
80a60 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 51 83 64 04 00 91 27 20 20 43 | ELECT.*.FROM.record;..Q.d...'..C |
80a80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
80aa0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.int,.c.DEFAULT.0);...CRE |
80ac0 | 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 | ATE.TABLE.record(x.TEXT,.y.TEXT) |
80ae0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 | ;...CREATE.TRIGGER.r1.BEFORE.INS |
80b00 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 | ERT.ON.t1.BEGIN...WITH.c(x).AS.( |
80b20 | 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | values(1))..........VALUES('befo |
80b40 | 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 | re-insert',printf(.trim(1,1),new |
80b60 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
80b80 | 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.INSERT.ON.t1. |
80ba0 | 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | BEGIN.INSERT.INTO.record(x,y)... |
80bc0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 | ..VALUES('after-insert',printf(. |
80be0 | 67 6c 6f 62 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | glob(1,1),new.a,new.b,new.c));.. |
80c00 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
80c20 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
80c40 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
80c60 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
80c80 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
80ca0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
80cc0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
80ce0 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
80d00 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
80d20 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('after-update',pr |
80d40 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
80d60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
80d80 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
80da0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
80dc0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
80de0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
80e00 | 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | UES(1,2).ON.CONFLICT(a).DO.UPDAT |
80e20 | 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | E.SET.c=t1.c+1;...SELECT.*.FROM. |
80e40 | 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | record;...DELETE.FROM.record;... |
80e60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
80e80 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
80ea0 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | .c=c+1.WHERE.c<0;...SELECT.*.FRO |
80ec0 | 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 83 63 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | M.record;..K.c......CREATE.TABLE |
80ee0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
80f00 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
80f20 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
80f40 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.INSERT.ON.t1.B |
80f60 | 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 | EGIN...WITH.c(x).AS.(values(1)). |
80f80 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
80fa0 | 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf(.trim(1,1),new.a,new.b,ne |
80fc0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
80fe0 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
81000 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
81020 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c | S('after-insert',printf(.glob(1, |
81040 | 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | 1),new.a,new.b,new.c));...END;.. |
81060 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
81080 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
810a0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
810c0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
810e0 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | d',...............old.a,old.b,ol |
81100 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
81120 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
81140 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
81160 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
81180 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
811a0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
811c0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
811e0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
81200 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
81220 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
81240 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (a,b).VALUES(1,2).ON.CONFLICT(a) |
81260 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
81280 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
812a0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
812c0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
812e0 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
81300 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 49 83 62 04 00 91 | ECT.*.FROM.record;VACUUM..I.b... |
81320 | 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
81340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
81360 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
81380 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
813a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
813c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
813e0 | 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | bsert',printf('%d,%d,%d',new.a,n |
81400 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
81420 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.INSERT.ON.t1.BEGI |
81440 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 | N.....INSERT.INTO.record(x,y)... |
81460 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-insert',printf(' |
81480 | 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | %d,%d,%d',new.a,new.b,new.c));.. |
814a0 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 | .END;...CREATE.TRIGGER.r3.BEFORE |
814c0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
814e0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
81500 | 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | before-update',printf('%d,%d,%d/ |
81520 | 25 64 2c 25 64 2c 25 64 27 49 4e 20 45 59 2c 20 62 20 69 6e 20 73 74 72 66 74 69 6d 65 28 31 2c | %d,%d,%d'IN.EY,.b.in.strftime(1, |
81540 | 31 2c 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | 1,1,1),old.b,old.c,new.a,new.b,n |
81560 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
81580 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
815a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
815c0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
815e0 | 2c 25 00 00 01 00 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%..../%d,%d,%d',............... |
81600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
81620 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
81640 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(a,b).VALU |
81660 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
81680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
816a0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
816c0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
816e0 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
81700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
81720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
81740 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
81760 | 63 6f 72 64 3b 0a 88 49 83 61 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..I.a......CREATE.TABLE.t1( |
81780 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
817a0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 | DEFAULT.0);...CREATE.TABLE.recor |
817c0 | 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | d(x.TEXT,.y.TEXT);...CREATE.TRIG |
817e0 | 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r1.BEFORE.INSERT.ON.t1.BEGIN |
81800 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
81820 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | .....VALUES('bsert',printf('%d,% |
81840 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
81860 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
81880 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
818a0 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
818c0 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf('%d,%d,%d',new.a,new |
818e0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
81900 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
81920 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
81940 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
81960 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 20 61 2c 62 2c 20 62 20 69 | tf('%d,%d,%d/%d,%d,%d',.a,b,.b.i |
81980 | 6e 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | n.............old.a,old.b,old.c, |
819a0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
819c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
819e0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
81a00 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
81a20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 00 00 01 00 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%..../%d,%d,%d',.. |
81a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
81a60 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
81a80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
81aa0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1(a,b).VALUES(1,2);...DELETE.F |
81ac0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
81ae0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
81b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
81b20 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
81b40 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
81b60 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
81b80 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
81ba0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 49 83 60 04 00 91 17 20 20 43 52 45 | ECT.*.FROM.record;..I.`......CRE |
81bc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
81be0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
81c00 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
81c20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 | ..CREATE.TRIGGER.r1.BEFORE.INSER |
81c40 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
81c60 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 | cord(x,y).........VALUES('bsert' |
81c80 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
81ca0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
81cc0 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
81ce0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
81d00 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
81d20 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
81d40 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
81d60 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
81d80 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
81da0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
81dc0 | 25 64 27 2c 0a 20 45 59 2c 24 62 20 69 6e 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 | %d',..EY,$b.in.strftime(1,1,1,1) |
81de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
81e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
81e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
81e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
81e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 00 00 01 00 | ('after-update',printf('%d,%.... |
81e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
81ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
81ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
81ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
81f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
81f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
81f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
81f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
81f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
81fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
81fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
81fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
82000 | 0d 00 00 00 07 01 dc 00 1b d0 17 73 13 39 0e ea 0a 94 06 3e 01 dc 00 00 00 00 00 00 00 00 00 00 | ...........s.9.....>............ |
82020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
820a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
820c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
820e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
82180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
821a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
821c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 5e 83 6d | .............................^.m |
821e0 | 04 00 91 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...A..CREATE.TABLE.t1(a.INTEGER. |
82200 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
82220 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
82240 | 79 20 d4 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y..EXT);...CREATE.TRIGGER.r1.BEF |
82260 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
82280 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
822a0 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
822c0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
822e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
82300 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
82320 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
82340 | 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 | t',printf('%.*c.%d,%d',new.a,new |
82360 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
82380 | 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GER.r3.BEFORE.UPDATE.ON.t1.BEGIN |
823a0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
823c0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e | .....VALUES('before-update',prin |
823e0 | 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 | tf('%d,%d,%d/%d,%d,%d',......... |
82400 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
82420 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
82440 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 | ND;...CREATE.TRIGGER.r4.AFTER.UP |
82460 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
82480 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | .record(x,y).........VALUES('aft |
824a0 | 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | er-update',printf('%d,%d,%d/%d,% |
824c0 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d',.......................... |
824e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
82500 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 | ew.a,new.b,new.c));...END;...INS |
82520 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 2d 31 31 2c 32 29 3b | ERT.INTO.t1(a,b).VALUES(.-11,2); |
82540 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
82560 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
82580 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
825a0 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
825c0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
825e0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
82600 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
82620 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 52 | .c<0;...SELECT.*.FROM.record;..R |
82640 | 83 6c 04 00 91 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .l...)..CREATE.TABLE.t1(a.INTEGE |
82660 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
82680 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
826a0 | 2c 20 79 20 54 45 58 54 29 3b 45 58 50 4c 41 49 4e 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | ,.y.TEXT);EXPLAIN...CREATE.TRIGG |
826c0 | 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r1.BEFORE.INSERT.ON.t1.BEGIN. |
826e0 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
82700 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | ....VALUES('before-insert',print |
82720 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
82740 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ;...END;...CREATE.TRIGGER.r2.AFT |
82760 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.INSERT.ON.t1.BEGIN.....INSERT |
82780 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | .INTO.record(x,y).....VALUES('af |
827a0 | 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ter-insert',printf('%d,%d,%d',ne |
827c0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
827e0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 | TE.TRIGGER.r3.BEFORE.UPDATE.ON.t |
82800 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
82820 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 | ,y).........VALUES('before-updat |
82840 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
82860 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
82880 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
828a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
828c0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
828e0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
82900 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
82920 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
82940 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
82960 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
82980 | 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(c,b).VALUES(1,2);...DELETE.FR |
829a0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
829c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | .VALUES(1,2).ON.CONFLICT(a).DO.U |
829e0 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
82a00 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.FROM.record |
82a20 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
82a40 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
82a60 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELECT.* |
82a80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 52 83 6b 04 00 91 29 20 20 43 52 | .FROM.record;VACUUM..R.k...)..CR |
82aa0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
82ac0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
82ae0 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
82b00 | 45 58 50 4c 41 49 4e 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f | EXPLAIN...CREATE.TRIGGER.r1.BEFO |
82b20 | 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.INSERT.ON.t1.BEGIN.....INSERT |
82b40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
82b60 | 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c | ('before-insert',printf(.trim(1, |
82b80 | 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | 1),new.a,new.b,new.c));...END;.. |
82ba0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r2.AFTER.INSERT. |
82bc0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
82be0 | 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 | rd(x,y).....VALUES('after-insert |
82c00 | 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ',printf(.glob(1,1),new.a,new.b, |
82c20 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | new.c));...END;...CREATE.TRIGGER |
82c40 | 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r3.BEFORE.UPDATE.ON.t1.BEGIN... |
82c60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
82c80 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-update',printf( |
82ca0 | 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 | '%d,%d,%d/%d,%d,%d',............ |
82cc0 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
82ce0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
82d00 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
82d20 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
82d40 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
82d60 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
82d80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
82da0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
82dc0 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
82de0 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
82e00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
82e20 | 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 2).ON.CONFLICT(a).DO.UPDATE.SET. |
82e40 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
82e60 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
82e80 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
82ea0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
82ec0 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
82ee0 | 72 64 3b 56 41 43 55 55 4d 0a 88 4b 83 6a 04 00 91 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | rd;VACUUM..K.j......CREATE.TABLE |
82f00 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
82f20 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 | ,.c.DEFAULT.0);...CREATE.TABLE.r |
82f40 | 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 | ecord(x.TEXT,.y.TEXT);...CREATE. |
82f60 | 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | TRIGGER.r1.BEFORE.UPDATE.ON.t1.B |
82f80 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
82fa0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c | .........VALUES('before-insert', |
82fc0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
82fe0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
83000 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
83020 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
83040 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-insert',printf('%d,%d,% |
83060 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
83080 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
830a0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
830c0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
830e0 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
83100 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | d',...............old.a,old.b,ol |
83120 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
83140 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 | ..CREATE.TRIGGER.r4.AFTER.UPDATE |
83160 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
83180 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 | ord(x,y).........VALUES('after-u |
831a0 | 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 | pdate',printf('%d,%d,%d/%d,%d,%d |
831c0 | 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ',.............................. |
831e0 | 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........old.a,old.b,old.c,new.a |
83200 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
83220 | 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(c,b).VALUES(1,2);...DELE |
83240 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
83260 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (a,b).VALUES(1,2).ON.CONFLICT(a) |
83280 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
832a0 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
832c0 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
832e0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
83300 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
83320 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 36 83 69 04 00 90 | ECT.*.FROM.record;VACUUM..6.i... |
83340 | 71 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | q..CREATE.TABLE.t1(a.INTEGER.PRI |
83360 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
83380 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x.TEXT,.y.T |
833a0 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
833c0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
833e0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
83400 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
83420 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
83440 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
83460 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
83480 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
834a0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
834c0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
834e0 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
83500 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
83520 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
83540 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
83560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
83580 | 2e 63 2c 6e 65 77 2e 61 2c 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | .c,new.a,ew.c));...END;...CREATE |
835a0 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
835c0 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
835e0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
83600 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
83620 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 2e 63 2c 6e 65 77 2e 61 | .......................d.c,new.a |
83640 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 | ,new.b,new.c));...END;...INSERT. |
83660 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 | INTO.t1(a,b).VALUES(1,2);...DELE |
83680 | 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | TE.FROM.record;...INSERT.INTO.t1 |
836a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (a,b).VALUES(1,2).ON.CONFLICT(a) |
836c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
836e0 | 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | T.*.FROM.record;...DELETE.FROM.r |
83700 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
83720 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
83740 | 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c | PDATE.SET.c=c+1.WHERE.c<0;...SEL |
83760 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 59 83 68 04 00 91 37 20 20 43 52 45 | ECT.*.FROM.record;..Y.h...7..CRE |
83780 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
837a0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.int,.c.DEFAULT.0);...CREAT |
837c0 | 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a | E.TABLE.record(x.TEXT,.y.TEXT);. |
837e0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r1.BEFORE.UPDAT |
83800 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
83820 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
83840 | 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 | -insert',printf(.trim(1,1),new.a |
83860 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
83880 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
838a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
838c0 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
838e0 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
83900 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
83920 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
83940 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
83960 | 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | ('before-update',printf('%d,%d,% |
83980 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
839a0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
839c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
839e0 | 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r4.AFTER.UPDATE.ON.t1. |
83a00 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
83a20 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | ).........VALUES('after-update', |
83a40 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
83a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
83a80 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
83aa0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
83ac0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
83ae0 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
83b00 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
83b20 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
83b40 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.FROM.reco |
83b60 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
83b80 | 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (1,2).....ON.CONFLICT(a).DO.UPDA |
83ba0 | 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 | TE.SET.c=c+1.WHERE.c<0;...SELECT |
83bc0 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 2c 83 67 04 00 90 5d 20 20 43 52 45 41 54 45 | .*.FROM.record;..,.g...]..CREATE |
83be0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
83c00 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 | .b.int,.c.DEFAULT.0);...CREATE.T |
83c20 | 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 | ABLE.record(x.TEXT,.y.TEXT);...C |
83c40 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f | REATE.TRIGGER.r1.BEFORE.INSERT.O |
83c60 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 | N.t1.BEGIN...WITH.c(x).AS.(value |
83c80 | 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e | s(1))..........VALUES('before-in |
83ca0 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
83cc0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
83ce0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.INSERT.ON.t1.BEGIN |
83d00 | 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 20 20 | ...WITH.c(x).AS.(values(1))..... |
83d20 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-insert',printf('% |
83d40 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
83d60 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 | END;...CREATE.TRIGGER.r3.BEFORE. |
83d80 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 57 49 54 48 20 63 28 78 29 20 41 | UPDATE.ON.t1.BEGIN...WITH.c(x).A |
83da0 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | S.(values(1))..........VALUES('b |
83dc0 | 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | efore-update',printf('%d,%d,%d/% |
83de0 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
83e00 | 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | ........old.a,old.b,old.c,new.a, |
83e20 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
83e40 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
83e60 | 49 4e 0a 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c | IN........VALUES('after-update', |
83e80 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 | printf('%d,%d,%d/%d,%d,%d',..... |
83ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
83ec0 | 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c | ..old.a,old.b,old.c,new.a,new.b, |
83ee0 | 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | new.c));...END;...INSERT.INTO.t1 |
83f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | (a,b).VALUES(1,2);...DELETE.FROM |
83f20 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
83f40 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
83f60 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .UPDATE.SET.c=t1.c+1;...SELECT.* |
83f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 39 4f 4d 20 72 65 63 6f | .FROM.record;...DELETE.F9OM.reco |
83fa0 | 72 64 3b 0a 20 20 49 4e 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | rd;...IN).VALUES(1,2).....ON.CON |
83fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
83fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
84000 | 0d 00 00 00 07 01 59 00 1b a1 17 44 12 e7 0e 79 09 fd 05 a8 01 59 00 00 00 00 00 00 00 00 00 00 | ......Y....D...y.....Y.......... |
84020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
84040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
84060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
84080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
840a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
840c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
840e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
84100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
84120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
84140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 4b 83 74 04 00 91 | ..........................K.t... |
84160 | 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
84180 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
841a0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 2c 54 45 58 54 2c 20 79 20 54 | .CREATE.TABLE.record(x,TEXT,.y.T |
841c0 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TRIGGER.r1.BEFORE |
841e0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
84200 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
84220 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
84240 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
84260 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
84280 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
842a0 | 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c | (x,y).....VALUES('after-insert', |
842c0 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
842e0 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
84300 | 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 3.BEFORE.UPDATE.ON.t1.BEGIN..... |
84320 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
84340 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-update',printf('% |
84360 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
84380 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
843a0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
843c0 | 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r4.AFTER.UPDATE.ON.t1.BEGIN..... |
843e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
84400 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | VALUES('after-update',printf('%d |
84420 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
84440 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
84460 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
84480 | 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 | .END;...INSERT.INTO.t1(c,b).VALU |
844a0 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | ES(1,2);...DELETE.FROM.record;.. |
844c0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
844e0 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | .ON.CONFLICT(a).DO.UPDATE.SET.c= |
84500 | 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | t1.c+1;...SELECT.*.FROM.record;. |
84520 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
84540 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
84560 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
84580 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | HERE.c<0;...SELECT.*.FROM.record |
845a0 | 3b 56 41 43 55 55 4d 0a 88 51 83 73 04 00 91 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ;VACUUM..Q.s...'..CREATE.TABLE.t |
845c0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
845e0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 | c.DEFAULT.0);...CREATE.TABLE.rec |
84600 | 6f 72 64 28 78 2c 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ord(x,TEXT,.y.TEXT);...CREATE.TR |
84620 | 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r1.BEFORE.INSERT.ON.t1.BEG |
84640 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
84660 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 | .......VALUES('before-insert',pr |
84680 | 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | intf(.trim(1,1),new.a,new.b,new. |
846a0 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 a0 | c));...END;...CREATE.TRIGGER.r2. |
846c0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 | AFTER.INSERT.ON.t1.BEGIN.INSERT. |
846e0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
84700 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c 6f 62 28 31 2c 31 29 2c 6e 65 77 | er-insert',printf(.glob(1,1),new |
84720 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
84740 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
84760 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
84780 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
847a0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
847c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
847e0 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
84800 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
84820 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
84840 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
84860 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
84880 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
848a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
848c0 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
848e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
84900 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
84920 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 | RT.INTO.t1(a,b).VALUES(1,2).ON.C |
84940 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
84960 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
84980 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
849a0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
849c0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
849e0 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 78 83 | c<0;...SELECT.*.FROM.record;..x. |
84a00 | 72 04 00 91 75 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | r...u..CREATE.TABLE.t1(a.INTEGER |
84a20 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
84a40 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 63 20 44 45 46 | );...CREATE.TABLE.record(x.c.DEF |
84a60 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 20 54 65 58 54 2c 20 | AULT.0);...CREATE.TABLE.r.TeXT,. |
84a80 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
84aa0 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
84ac0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
84ae0 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
84b00 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
84b20 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
84b40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 76 65 63 | .ON.t1.BEGIN.....INSERT.INTO.vec |
84b60 | 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 | ord(x,y).....VALUES('after-inser |
84b80 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e ce | t',printf('%d,%d,%d',new.a,new.. |
84ba0 | ce ce ce ce ce ce ce ce 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ........;...END;...CREATE.TRIGGE |
84bc0 | 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r3.BEFORE.UPDATE.ON.t1.BEGIN.. |
84be0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
84c00 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 | ...VALUES('before-update',printf |
84c20 | 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 | ('%d,%d,%d/%d,%d,%d',........... |
84c40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
84c60 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
84c80 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
84ca0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
84cc0 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
84ce0 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
84d00 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 21 20 20 20 | %d',........................!... |
84d20 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
84d40 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 0a 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
84d60 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
84d80 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
84da0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
84dc0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
84de0 | 20 53 45 4c 00 00 00 80 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SEL....*.FROM.record;...DELETE. |
84e00 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
84e20 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 10 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | b).VALUES(1,2)......N.CONFLICT(a |
84e40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b | ).DO.UPDATE.SET.c=c+1.WHERE.c<0; |
84e60 | 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 6a 83 71 04 00 91 | ...SELECT.*.FROM.record;..j.q... |
84e80 | 59 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | Y..CREATE.TABLE.t1(a.INTEGER.PRI |
84ea0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
84ec0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 60 54 | .CREATE.TABLE.record(x.TEXT,.y`T |
84ee0 | 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 5a 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 | EXT);...CREATE.TZIGGER.r1.BEFORE |
84f00 | 20 49 4e 53 45 52 64 65 64 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERdedN.t1.BEGIN.....INSERT.I |
84f20 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
84f40 | 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 | before-insert',printf('%d,%d,%d' |
84f60 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
84f80 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r2.AFTER.INSERT.ON |
84fa0 | 20 74 31 20 42 45 47 20 62 6d 32 35 28 31 29 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | .t1.BEG.bm25(1)IN.....INSERT.INT |
84fc0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
84fe0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
85000 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 25 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));%..END;...CREATE.T |
85020 | 52 49 47 47 31 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGG1R.r3.BEFORE.UPDATE.ON.t1.BE |
85040 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 29 0a 20 20 | O.record(x,y).........VALUES)... |
85060 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ......VALUES('('before-update',p |
85080 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
850a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
850c0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 70 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,pew.c));. |
850e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
85100 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 20 49 4e 54 4f 20 | .UPDATE.ON.t1.BEGIN.....IN.INTO. |
85120 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
85140 | 72 2d 75 70 64 61 74 65 27 26 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update'&printf('%d,%d,%d/%d,%d |
85160 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 58 54 2c 20 79 60 54 45 58 54 29 3b 0a 20 20 43 52 | ,%d',..........XT,.y`TEXT);...CR |
85180 | 45 41 54 45 20 54 5a 49 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | EATE.TZI........................ |
851a0 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
851c0 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3f 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END?...INSERT.INTO |
851e0 | 20 74 31 19 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 | .t1.a,b).VALUES(1,2);...DELETE.F |
85200 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
85220 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
85240 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 | .DO.UPDATE.SET.c=t1.c+1;...SELEC |
85260 | 54 20 2a 20 46 44 49 53 54 49 4e 43 54 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 | T.*.FDISTINCTROM.record;...DELET |
85280 | 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | E.FROM.record;...INSERT.INTO.t1( |
852a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | a,b).VALUES(1,2).....ON.CONFLICT |
852c0 | 28 61 29 20 44 4f 20 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | (a).DO.RE.c<0;...SELECT.*.FROM.r |
852e0 | 65 63 6f 72 64 3b 0a 88 59 83 70 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ecord;..Y.p...7..CREATE.TABLE.t1 |
85300 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
85320 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | .DEFAULT.0);...CREATE.TABLE.reco |
85340 | 72 64 28 78 20 54 45 58 54 2c 20 79 2c 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | rd(x.TEXT,.y,TEXT);...CREATE.TRI |
85360 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
85380 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 79 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(y,y)... |
853a0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
853c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
853e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
85400 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
85420 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 | RT.INTO.record(x,y).....VALUES(' |
85440 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
85460 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
85480 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e | EATE.TRIGGER.r3.BEFORE.UPDATE.ON |
854a0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
854c0 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 | (x,y).........VALUES('before-upd |
854e0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
85500 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
85520 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
85540 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 | .c));...END;...CREATE.TRIGGER.r4 |
85560 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | .AFTER.UPDATE.ON.t1.BEGIN.....IN |
85580 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
855a0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-update',printf('%d,% |
855c0 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
855e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e | ......................old.a,old. |
85600 | 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | b,old.c,new.a,new.b,new.c));...E |
85620 | 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | ND;...INSERT.INTO.t1(a,b).VALUES |
85640 | 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 | (1,2);...DELETE.FROM.record;...I |
85660 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
85680 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
856a0 | 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 | c=t1.c+1;...SELECT.*.FROM.record |
856c0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
856e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
85700 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 | .CONFLICT(a).DO.UPDATE.SET.c=c+1 |
85720 | 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | .WHERE.c<0;...SELECT.*.FROM.reco |
85740 | 72 64 3b 0a 88 59 83 6f 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | rd;..Y.o...7..CREATE.TABLE.t1(a. |
85760 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
85780 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
857a0 | 78 20 54 45 58 54 2c 20 79 20 d4 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y..EXT);...CREATE.TRIGGE |
857c0 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
857e0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
85800 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
85820 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
85840 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
85860 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
85880 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
858a0 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 65 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%e,%d,%d',new |
858c0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
858e0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
85900 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
85920 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
85940 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
85960 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
85980 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
859a0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
859c0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
859e0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
85a00 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
85a20 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
85a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
85a60 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
85a80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
85aa0 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
85ac0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
85ae0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
85b00 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
85b20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
85b40 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
85b60 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
85b80 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
85ba0 | 0a 88 5b 83 6e 04 00 91 3b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..[.n...;..CREATE.TABLE.t1(a.INT |
85bc0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
85be0 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
85c00 | 45 58 54 2c 20 79 20 d4 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y..EXT);...CREATE.TRIGGER.r |
85c20 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
85c40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
85c60 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
85c80 | 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%d,%d',new.a,new.b,new.c));... |
85ca0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
85cc0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
85ce0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
85d00 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 67 2c 25 64 2c 25 64 27 2c 43 55 52 52 | insert',printf('%.*g,%d,%d',CURR |
85d20 | 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | ENT_TIMESTAMP));...END;...CREATE |
85d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
85d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
85d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
85da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
85dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
85de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
85e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
85e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
85e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
85e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
85e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
85ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
85ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
85ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
85f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
85f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
85f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
85f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
85f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
85fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
85fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
85fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
86000 | 0d 00 00 00 19 00 47 00 1b a3 17 54 16 46 15 38 14 2a 13 40 12 46 11 54 10 62 0f 70 0e 7c 0d 88 | ......G....T.F.8.*.@.F.T.b.p.|.. |
86020 | 0c 94 0b a0 0a ac 09 ae 08 c4 07 b6 06 a8 05 9a 04 85 03 71 02 63 01 55 00 47 00 00 00 00 00 00 | ...................q.c.U.G...... |
86040 | 00 00 00 00 00 00 00 82 0a 84 0d 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | .................CREATE.TABLE.t1 |
86060 | 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a.INTEGER.PRIMARY.KEY,.b.int,.c |
86080 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .DEFAULT.0);...INSERT.INTO.t1(a, |
860a0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | b).VALUES(1,2),(3,4);...INSERT.I |
860c0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 | NTO.t1(a,b).VALUES(1,8),(2,11),( |
860e0 | 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 3,1).....ON.CONFLICT(a).DO.UPDAT |
86100 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c 6f | E.SET.b=excluded.b,.c=.randomblo |
86120 | 62 28 31 32 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | b(122001-01-01);...SELECT.*,.'x' |
86140 | 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 84 0c 04 00 84 19 20 20 43 | .FROM.t1.ORDER.BY.a;...........C |
86160 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
86180 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
861a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
861c0 | 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 4);...INSERT.INTO.t1(a,b).VALUES |
861e0 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | (1,8),(2,11),(3,1).....ON.CONFLI |
86200 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
86220 | 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2e 30 31 2d 30 31 31 29 3b 0a 20 | ,.c=.randomblob(12001.01-011);.. |
86240 | 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 | .SELECT.*,.'x'.FROM.t1.ORDER.BY. |
86260 | 61 3b 0a 82 0a 84 0b 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a;...........CREATE.TABLE.t1(a.I |
86280 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
862a0 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
862c0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ALUES(1,2),(3,4);...INSERT.INTO. |
862e0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 | t1(a,b).VALUES(1,8),(2,11),(3,1) |
86300 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
86320 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 | T.b=excluded.b,.c=.randomblob(12 |
86340 | 30 30 31 2d 30 31 2d 30 31 31 29 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f | 001-01-011);...SELECT.*,.'x'.FRO |
86360 | 4d 20 74 31 20 4f 52 44 45 52 20 42 59 40 61 3b 0a 82 10 84 0a 04 00 84 25 20 20 43 52 45 41 54 | M.t1.ORDER.BY@a;........%..CREAT |
86380 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
863a0 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,.b.int,.c.DEFAULT.0);...INSERT. |
863c0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a | INTO.t1(a,b).VALUES(1,2),(3,4);. |
863e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 | ..INSERT.INTO.t1(a,b).VALUES(1,8 |
86400 | 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ),(2,11),(3,1).....ON.CONFLICT(a |
86420 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
86440 | 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 31 29 3b 0a 20 20 53 45 4c | .randomblob(12001-01-011);...SEL |
86460 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 56 41 | ECT.*,.'x'.FROM.t1.ORDER.BY.a;VA |
86480 | 43 55 55 4d 0a 82 11 84 09 04 00 84 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | CUUM........'..CREATE.TABLE.t1(a |
864a0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
864c0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
864e0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .VALUES(1,2),(3,4);...INSERT.INT |
86500 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | O.t1(a,b).VALUES(1,8),(2,11),(3, |
86520 | 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 1).....ON.CONFLICT(a).DO.UPDATE. |
86540 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 | SET.b=excluded.b,.c=.randomblob( |
86560 | 31 32 30 30 31 2d 30 31 2d 30 31 31 29 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | 12001-01-011);...SELECT.*,.'x'.F |
86580 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 41 4e 41 4c 59 5a 45 0a 82 0a 84 08 04 00 | ROM.t1.ORDER.BY.a;ANALYZE....... |
865a0 | 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
865c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
865e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
86600 | 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ),(3,4);...INSERT.INTO.t1(a,b).V |
86620 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 | ALUES(1,8),(2,11),(3,1).....ON.C |
86640 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
86660 | 64 65 64 2e 62 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 3c 3c 74 72 69 6d 28 31 2c | ded.b,.c=.randomblob(1)<<trim(1, |
86680 | 31 29 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | 1);...SELECT.*,.'x'.FROM.t1.ORDE |
866a0 | 52 20 42 59 20 61 3b 0a 82 0a 84 07 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | R.BY.a;...........CREATE.TABLE.t |
866c0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
866e0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
86700 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,b).VALUES(1,2),(3,4);...INSERT. |
86720 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | INTO.t1(a,b).VALUES(1,8),(2,11), |
86740 | 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (3,1).....ON.CONFLICT(a).DO.UPDA |
86760 | 54 45 20 53 45 54 20 61 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c | TE.SET.a=excluded.b,.c=.randombl |
86780 | 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 31 29 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 | ob(12001-01-011);...SELECT.*,.'x |
867a0 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 84 06 04 00 84 19 20 20 | '.FROM.t1.ORDER.BY.a;........... |
867c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
867e0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
86800 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
86820 | 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ,4);...INSERT.INTO.t1(a,b).VALUE |
86840 | 53 28 31 2c 38 29 2c 28 31 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | S(1,8),(1,11),(3,1).....ON.CONFL |
86860 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
86880 | 62 2c 20 63 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 31 29 3b 0a | b,.c=.randomblob(12001-01-011);. |
868a0 | 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | ..SELECT.*,.'x'.FROM.t1.ORDER.BY |
868c0 | 20 61 3b 0a 81 66 84 05 04 00 83 51 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;..f.....Q..CREATE.TABLE.t1(a. |
868e0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
86900 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
86920 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(1,2),(3,4);...INSERT.INTO |
86940 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 3f 29 2c 31 | .t1(a,b).VALUES(1,8),(.char(?),1 |
86960 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
86980 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
869a0 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 7a 84 04 04 00 83 79 20 20 43 52 45 41 54 45 20 54 | b<excluded.b;..z.....y..CREATE.T |
869c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
869e0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
86a00 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 | O.t1(a,b).VALUES(1,2),(3,4);...I |
86a20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,8),( |
86a40 | 20 63 68 61 72 28 32 30 32 30 30 31 2d 30 31 2d 30 31 30 31 2c 30 31 2d 30 31 31 29 2c 31 29 0a | .char(202001-01-0101,01-011),1). |
86a60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
86a80 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c | .b=excluded.b,.c=c+1.WHERE.t1.b< |
86aa0 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 70 84 03 04 00 83 65 20 20 43 52 45 41 54 45 20 54 41 42 | excluded.b;..p.....e..CREATE.TAB |
86ac0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
86ae0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
86b00 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 | t1(a,b).VALUES(1,2),(3,4);...INS |
86b20 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 | ERT.INTO.t1(a,b).VALUES(1,8),(.c |
86b40 | 68 61 72 28 32 30 30 31 2c 30 31 2d 30 31 31 29 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | har(2001,01-011),1).....ON.CONFL |
86b60 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
86b80 | 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a | b,.c=c+1.WHERE.t1.b<excluded.b;. |
86ba0 | 81 70 84 02 04 00 83 65 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .p.....e..CREATE.TABLE.t1(a.INTE |
86bc0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
86be0 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
86c00 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
86c20 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 32 30 30 31 2c 30 31 2c | a,b).VALUES(1,8),(.char(2001,01, |
86c40 | 30 31 31 29 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | 011),1).....ON.CONFLICT(a).DO.UP |
86c60 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
86c80 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 70 84 01 04 00 83 65 20 20 43 52 | RE.t1.b<excluded.b;..p.....e..CR |
86ca0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
86cc0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
86ce0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
86d00 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
86d20 | 31 2c 38 29 2c 28 20 63 68 61 72 28 32 2e 30 31 2c 30 31 2d 30 31 31 29 2c 31 29 0a 20 20 20 20 | 1,8),(.char(2.01,01-011),1)..... |
86d40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
86d60 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c | xcluded.b,.c=c+1.WHERE.t1.b<excl |
86d80 | 75 64 65 64 2e 62 3b 0a 81 70 84 00 04 00 83 65 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | uded.b;..p.....e..CREATE.TABLE.t |
86da0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
86dc0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
86de0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,b).VALUES(1,2),(3,4);...INSERT. |
86e00 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 | INTO.t1(a,b).VALUES(1,8),(.char( |
86e20 | 31 32 30 30 31 2c 30 31 2d 30 31 29 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 12001,01-01),1).....ON.CONFLICT( |
86e40 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 | a).DO.UPDATE.SET.b=excluded.b,.c |
86e60 | 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 70 83 7f | =c+1.WHERE.t1.b<excluded.b;..p.. |
86e80 | 04 00 83 65 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...e..CREATE.TABLE.t1(a.INTEGER. |
86ea0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
86ec0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
86ee0 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ,2),(3,4);...INSERT.INTO.t1(a,b) |
86f00 | 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 31 32 30 30 31 2c 30 2c 2d 30 31 29 | .VALUES(1,8),(.char(12001,0,-01) |
86f20 | 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,1).....ON.CONFLICT(a).DO.UPDATE |
86f40 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 | .SET.b=excluded.b,.c=c+1.WHERE.t |
86f60 | 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 6e 83 7e 04 00 83 61 20 20 43 52 45 41 54 45 | 1.b<excluded.b;..n.~...a..CREATE |
86f80 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
86fa0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
86fc0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
86fe0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 | .INSERT.INTO.t1(a,b).VALUES(1,8) |
87000 | 2c 28 20 63 68 61 72 28 20 74 6f 74 61 6c 28 31 29 29 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | ,(.char(.total(1)),1).....ON.CON |
87020 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
87040 | 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | d.b,.c=c+1.WHERE.t1.b<excluded.b |
87060 | 3b 0a 81 6e 83 7d 04 00 83 61 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..n.}...a..CREATE.TABLE.t1(a.IN |
87080 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
870a0 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
870c0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | LUES(1,2),(3,4);...INSERT.INTO.t |
870e0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 20 22 61 22 2c 22 | 1(a,b).VALUES(1,8),(.char(."a"," |
87100 | 62 22 0d 29 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | b".),1).....ON.CONFLICT(a).DO.UP |
87120 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
87140 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 6e 83 7c 04 00 83 61 20 20 43 52 | RE.t1.b<excluded.b;..n.|...a..CR |
87160 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
87180 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
871a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
871c0 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
871e0 | 31 2c 38 29 2c 28 20 63 68 61 72 28 20 20 2d 31 2c 22 62 22 0d 29 2c 31 29 0a 20 20 20 20 4f 4e | 1,8),(.char(..-1,"b".),1).....ON |
87200 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
87220 | 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 | luded.b,.c=c+1.WHERE.t1.b<exclud |
87240 | 65 64 2e 62 3b 0a 81 76 83 7b 04 00 83 71 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ed.b;..v.{...q..CREATE.TABLE.t1( |
87260 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
87280 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | DEFAULT.0);...INSERT.INTO.t1(a,b |
872a0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ).VALUES(1,2),(3,4);...INSERT.IN |
872c0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 20 20 | TO.t1(a,b).VALUES(1,8),(.char(.. |
872e0 | 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 0d 29 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | "a","b""a","b".),1).....ON.CONFL |
87300 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
87320 | 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a | b,.c=c+1.WHERE.t1.b<excluded.b;. |
87340 | 81 66 83 7a 04 00 83 51 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .f.z...Q..CREATE.TABLE.t1(a.INTE |
87360 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
87380 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
873a0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
873c0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 0d 29 2c 31 29 0a 20 20 | a,b).VALUES(1,8),(.char(.),1)... |
873e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
87400 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 | =excluded.b,.c=c+1.WHERE.t1.b<ex |
87420 | 63 6c 75 64 65 64 2e 62 3b 0a 82 0a 83 79 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | cluded.b;....y......CREATE.TABLE |
87440 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
87460 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
87480 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 30 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(1,2),(0,4);...INSER |
874a0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | T.INTO.t1(a,b).VALUES(1,8),(2,11 |
874c0 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
874e0 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
87500 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 | RE.t1.b<excluded.b;...SELECT.*,. |
87520 | 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 63 3b 0a 82 0a 83 78 04 00 84 19 | 'x'.FROM.t1.ORDER.BY.c;....x.... |
87540 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
87560 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
87580 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 31 3d | INSERT.INTO.t1(a,b).VALUES(1,.1= |
875a0 | 31 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | 13,4);...INSERT.INTO.t1(a,b).VAL |
875c0 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | UES(1,8),(2,11),(3,1).....ON.CON |
875e0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
87600 | 64 2e 62 3c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | d.b<.c=c+1.WHERE.t1.b<excluded.b |
87620 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 | ;...SELECT.*,.'x'.FROM.t1.ORDER. |
87640 | 42 59 20 61 3b 0a 82 0a 83 77 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | BY.a;....w......CREATE.TABLE.t1( |
87660 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
87680 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | DEFAULT.0);...INSERT.INTO.t1(a,b |
876a0 | 29 0a 20 20 53 45 4c 45 43 54 20 32 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 20 49 4e | )...SELECT.2,.'x'.FROM.t1.GRO.IN |
876c0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 | TO.t1(a,b).VALUES(1,8),(2,11),(3 |
876e0 | 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,1).....ON.CONFLICT(a).DO.UPDATE |
87700 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 6e 67 65 73 74 | .SET.b=excluded.b,.c=c+1.WHngest |
87720 | 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 32 2c 20 27 78 27 20 | 1.b<excluded.b;...SELECT.2,.'x'. |
87740 | 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 88 4b 83 76 04 00 91 1b 20 20 43 52 | FROM.t1.GROUP.BY.c;..K.v......CR |
87760 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
87780 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b.int,.c.DEFAULT.0);...CREA |
877a0 | 54 45 20 54 41 42 4c 45 20 f2 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE..ecord(x.TEXT,.y.TEXT); |
877c0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
877e0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
87800 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
87820 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 20 3e 3d 28 53 45 4c 45 43 54 27 25 64 2c 25 64 2c 25 64 | e-insert',pri.>=(SELECT'%d,%d,%d |
87840 | 27 2c 6e 65 77 2c 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new,a,new.b,new.c));...END;... |
87860 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
87880 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
878a0 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
878c0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
878e0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
87900 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 | r3.BEFORE.UPDATE.ON.t1.BEGIN.INS |
87920 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
87940 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
87960 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
87980 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
879a0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new.c));...END;...CR |
879c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r4.AFTER.UPDATE.ON. |
879e0 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
87a00 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 | x,y).........VALUES('after-updat |
87a20 | 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 | e',printf('%d,%d,%d/%d,%d,%d',.. |
87a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
87a60 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 | .....old.a,old.b,old.c,new.a,new |
87a80 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .b,new.c));...END;...INSERT.INTO |
87aa0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 49 4e | .t1(a,b).VALUES(1,2);...DELETEIN |
87ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
87ae0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
87b00 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
87b20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
87b40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
87b60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.c=c+1. |
87b80 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
87ba0 | 64 3b 0a 88 59 83 75 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | d;..Y.u...7..CREATE.TABLE.t1(a.I |
87bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
87be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 f8 | AULT.0);...CREATE.TABLE.record(. |
87c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
87c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
87c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
87c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
87c80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
87ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
87cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
87ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
87d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
87d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
87d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
87d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
87d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
87da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
87dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
87de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
87e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
87e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
87e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
87e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
87e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
87ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
87ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
87ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
87f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
87f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
87f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
87f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
87f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
87fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
87fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
87fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
88000 | 0d 00 00 00 1d 00 5a 00 1e f2 1d e4 1c d6 1b c8 1a ad 19 9b 18 81 17 64 16 4f 15 35 14 20 13 0b | ......Z................d.O.5.... |
88020 | 11 ea 10 d4 0f b7 0e a1 0d 84 0c 6e 0b 58 0a 4a 09 39 08 23 07 0e 05 f7 04 e0 03 c0 02 9e 01 7c | ...........n.X.J.9.#...........| |
88040 | 00 5a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 1e 84 2a 04 00 | .Z...........................*.. |
88060 | 84 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .A..CREATE.TABLE.t1(a.INTEGER.PR |
88080 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
880a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
880c0 | 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ),(3,4);...INSERT.INTO.t1(a,b).V |
880e0 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 | ALUES(1,8),(2,11),(3,1).....ON.C |
88100 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
88120 | 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 | ded.b,.c=c+1.WHERE.t1.b<excluded |
88140 | 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 | .b;...SELECT.*,.json_group_array |
88160 | 28 3f 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 1e 84 29 | (?).'x'.FROM.t1.ORDER.BY.a;....) |
88180 | 04 00 84 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...A..CREATE.TABLE.t1(a.INTEGER. |
881a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
881c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
881e0 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ,2),(3,4);...INSERT.INTO.t1(a,b) |
88200 | 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e | .VALUES(1,8),(2,11),(3,1).....ON |
88220 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
88240 | 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 | luded.b,.c=c+1.WHERE.t1.b<exclud |
88260 | 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 | ed.b;...SELECT.*,.json_group_arr |
88280 | 61 79 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 82 1e | ay(1).'x'.FROM.t1.GROUP.BY.c;... |
882a0 | 84 28 04 00 84 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .(...A..CREATE.TABLE.t1(a.INTEGE |
882c0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
882e0 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
88300 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | (1,2),(3,4);...INSERT.INTO.t1(a, |
88320 | 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 | b).VALUES(1,8),(2,11),(3,1)..... |
88340 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
88360 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c | xcluded.b,.c=c+1.WHERE.t1.b<excl |
88380 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 | uded.b;...SELECT.*,.json_group_a |
883a0 | 72 72 61 79 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a | rray(1).'x'.FROM.t1.GROUP.BY.a;. |
883c0 | 82 1c 84 27 04 00 84 3d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | ...'...=..CREATE.TABLE.t1(a.INTE |
883e0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
88400 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
88420 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
88440 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 | a,b).VALUES(1,8),(2,11),(3,1)... |
88460 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
88480 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 | =excluded.b,.c=c+1.WHERE.t1.b<ex |
884a0 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 | cluded.b;...SELECT.*,.group_conc |
884c0 | 61 74 28 3f 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a | at(?,1).'x'.FROM.t1.GROUP.BY.a;. |
884e0 | 82 13 84 26 04 00 84 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | ...&...+..CREATE.TABLE.t1(a.INTE |
88500 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
88520 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
88540 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
88560 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 | a,b).VALUES(1,8),(2,11),(3,1)... |
88580 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
885a0 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 | =excluded.b,.c=c+1.WHERE.t1.b<ex |
885c0 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 63 6f 75 6e 74 28 31 29 20 27 | cluded.b;...SELECT.*,.count(1).' |
885e0 | 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 82 13 84 25 04 00 84 2b 20 | x'.FROM.t1.GROUP.BY.c;....%...+. |
88600 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
88620 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
88640 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
88660 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
88680 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
886a0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
886c0 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
886e0 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 63 6f 75 6e 74 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 | ...SELECT.*,.count(1).'x'.FROM.t |
88700 | 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 11 84 24 04 00 84 27 20 20 43 52 45 41 54 45 20 54 | 1.GROUP.BY.a;....$...'..CREATE.T |
88720 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
88740 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
88760 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 | O.t1(a,b).VALUES(1,2),(3,4);...I |
88780 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,8),( |
887a0 | 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | 2,11),(3,1).....ON.CONFLICT(a).D |
887c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 | O.UPDATE.SET.b=excluded.b,.c=c+1 |
887e0 | 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t1.b<excluded.b;...SELECT |
88800 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 4f 54 20 49 4e 44 45 58 45 44 20 42 59 20 | .*,.'x'.FROM.t1.OROT.INDEXED.BY. |
88820 | 61 3b 0a 82 12 84 23 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a;....#...)..CREATE.TABLE.t1(a.I |
88840 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
88860 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
88880 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ALUES(1,2),(3,4);...INSERT.INTO. |
888a0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 | t1(a,b).VALUES(1,8),(2,11),(3,1) |
888c0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
888e0 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 | T.b=excluded.b,.c=c+1.WHERE.t1.b |
88900 | 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f | <excluded.b;...SELECT.*,.'x'.FRO |
88920 | 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 63 2c 20 22 61 22 2c 22 62 22 62 82 0d 84 22 04 00 84 | M.t1.ORDER.BY.c,."a","b"b..."... |
88940 | 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
88960 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
88980 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
889a0 | 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ,(3,4);...INSERT.INTO.t1(a,b).VA |
889c0 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f | LUES(1,8),(2,11),(3,1).....ON.CO |
889e0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 | NFLICT(a).DO.UPDATE.SET.b=exclud |
88a00 | 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e | ed.b,.c=c+1.WHERE.t1.b<excluded. |
88a20 | 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 | b;...SELECT.*,.'x'.FROM.t1.ORDER |
88a40 | 20 42 59 20 61 2f 2d 31 3b 0a 82 0a 84 21 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | .BY.a/-1;....!......CREATE.TABLE |
88a60 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
88a80 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
88aa0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(1,2),(3,4);...INSER |
88ac0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | T.INTO.t1(a,b).VALUES(1,8),(2,11 |
88ae0 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
88b00 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
88b20 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 | RE.t1.b<excluded.b;...SELECT.*,. |
88b40 | 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 3f 82 12 84 20 04 00 84 29 | 'x'.FROM.t1.ORDER.BY.a,?.......) |
88b60 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
88b80 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
88ba0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
88bc0 | 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | (3,4);...INSERT.INTO.t1(a,b).VAL |
88be0 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | UES(1,8),(2,11),(3,1).....ON.CON |
88c00 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
88c20 | 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | d.b,.c=c+1.WHERE.t1.b<excluded.b |
88c40 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 | ;...SELECT.*,.'x'.FROM.t1.ORDER. |
88c60 | 42 59 20 61 2c 20 61 2c 62 2c 22 62 22 62 82 12 84 1f 04 00 84 29 20 20 43 52 45 41 54 45 20 54 | BY.a,.a,b,"b"b.......)..CREATE.T |
88c80 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
88ca0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
88cc0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 | O.t1(a,b).VALUES(1,2),(3,4);...I |
88ce0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,8),( |
88d00 | 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | 2,11),(3,1).....ON.CONFLICT(a).D |
88d20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 | O.UPDATE.SET.b=excluded.b,.c=c+1 |
88d40 | 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t1.b<excluded.b;...SELECT |
88d60 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 20 22 e1 22 2c | .*,.'x'.FROM.t1.ORDER.BY.a,.".", |
88d80 | 22 62 22 62 82 19 84 1e 04 00 84 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | "b"b.......7..CREATE.TABLE.t1(a. |
88da0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
88dc0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
88de0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(1,2),(3,4);...INSERT.INTO |
88e00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(a,b).VALUES(1,8),(2,11),(3,1 |
88e20 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
88e40 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
88e60 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | b<excluded.b;...SELECT.*,.'x'.FR |
88e80 | 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 20 22 e1 22 2c 20 61 76 67 28 31 29 22 62 22 | OM.t1.ORDER.BY.a,.".",.avg(1)"b" |
88ea0 | 62 82 12 84 1d 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | b.......)..CREATE.TABLE.t1(a.INT |
88ec0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
88ee0 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
88f00 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | UES(1,2),(3,4);...INSERT.INTO.t1 |
88f20 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 | (a,b).VALUES(1,8),(2,11),(3,1).. |
88f40 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
88f60 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 | b=excluded.b,.c=c+1.WHERE.t1.b<e |
88f80 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | xcluded.b;...SELECT.*,.'x'.FROM. |
88fa0 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 20 22 e1 22 2c 20 61 2c 62 82 19 84 1c 04 00 84 37 20 | t1.ORDER.BY.a,.".",.a,b.......7. |
88fc0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
88fe0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
89000 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
89020 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
89040 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
89060 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
89080 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
890a0 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | ...SELECT.*,.'x'.FROM.t1.ORDER.B |
890c0 | 59 20 61 2c 20 22 61 22 2c 20 61 76 67 28 31 29 22 62 22 62 82 12 84 1b 04 00 84 29 20 20 43 52 | Y.a,."a",.avg(1)"b"b.......)..CR |
890e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
89100 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
89120 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
89140 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
89160 | 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | 1,8),(2,11),(3,1).....ON.CONFLIC |
89180 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
891a0 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | .c=c+1.WHERE.t1.b<excluded.b;... |
891c0 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 | SELECT.*,.'x'.FROM.t1.ORDER.BY.a |
891e0 | 20 4c 49 4d 49 54 2d 31 3b 0a 82 1d 84 1a 04 00 84 3f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | .LIMIT-1;........?..CREATE.TABLE |
89200 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
89220 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
89240 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(1,2),(3,4);...INSER |
89260 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | T.INTO.t1(a,b).VALUES(1,8),(2,11 |
89280 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
892a0 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
892c0 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 | RE.t1.b<excluded.b;...SELECT.*,. |
892e0 | 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 73 71 6c 69 74 65 5f 73 6f 75 72 | 'x'.FROM.t1.GROUP.BY.sqlite_sour |
89300 | 63 65 5f 69 64 28 29 2d 61 3b 0a 82 11 84 19 04 00 84 27 20 20 43 52 45 41 54 45 20 54 41 42 4c | ce_id()-a;........'..CREATE.TABL |
89320 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
89340 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
89360 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 | 1(a,b).VALUES(1,2),(3,4);...INSE |
89380 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | RT.INTO.t1(a,b).VALUES(1,8),(2,1 |
893a0 | 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | 1),(3,1).....ON.CONFLICT(a).DO.U |
893c0 | 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 | PDATE.SET.b=excluded.b,.c=c+1.WH |
893e0 | 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c | ERE.t1.b<excluded.b;...SELECT.*, |
89400 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 68 65 78 28 31 29 2c 61 3b 0a | .'x'.FROM.t1.GROUP.BY.hex(1),a;. |
89420 | 82 11 84 18 04 00 84 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .......'..CREATE.TABLE.t1(a.INTE |
89440 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
89460 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
89480 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
894a0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 | a,b).VALUES(1,8),(2,11),(3,1)... |
894c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
894e0 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 | =excluded.b,.c=c+1.WHERE.t1.b<ex |
89500 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | cluded.b;...SELECT.*,.'x'.FROM.t |
89520 | 31 20 47 52 4f 55 50 20 42 59 20 61 62 73 28 42 29 2c 61 3b 0a 82 16 84 17 04 00 84 31 20 20 43 | 1.GROUP.BY.abs(B),a;........1..C |
89540 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
89560 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
89580 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
895a0 | 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 4);...INSERT.INTO.t1(a,b).VALUES |
895c0 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | (1,8),(2,11),(3,1).....ON.CONFLI |
895e0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
89600 | 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 | ,.c=c+1.WHERE.t1.b<excluded.b;.. |
89620 | 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 | .SELECT.*,.'x'.FROM.t1.GROUP.BY. |
89640 | 61 62 73 28 31 29 4d 41 54 43 48 20 61 3b 0a 82 11 84 16 04 00 84 27 20 20 43 52 45 41 54 45 20 | abs(1)MATCH.a;........'..CREATE. |
89660 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
89680 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
896a0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
896c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c | INSERT.INTO.t1(a,b).VALUES(1,8), |
896e0 | 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | (2,11),(3,1).....ON.CONFLICT(a). |
89700 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b | DO.UPDATE.SET.b=excluded.b,.c=c+ |
89720 | 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 | 1.WHERE.t1.b<excluded.b;...SELEC |
89740 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 62 73 28 31 29 | T.*,.'x'.FROM.t1.GROUP.BY.abs(1) |
89760 | 2c 63 3b 0a 82 19 84 15 04 00 84 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | ,c;........7..CREATE.TABLE.t1(a. |
89780 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
897a0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
897c0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(1,2),(3,4);...INSERT.INTO |
897e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(a,b).VALUES(1,8),(2,11),(3,1 |
89800 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
89820 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
89840 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | b<excluded.b;...SELECT.*,.'x'.FR |
89860 | 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 62 73 28 31 29 2c 20 22 61 22 2c 22 62 22 61 3b | OM.t1.GROUP.BY.abs(1),."a","b"a; |
89880 | 0a 82 16 84 14 04 00 84 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ........1..CREATE.TABLE.t1(a.INT |
898a0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
898c0 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
898e0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | UES(1,2),(3,4);...INSERT.INTO.t1 |
89900 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 | (a,b).VALUES(1,8),(2,11),(3,1).. |
89920 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
89940 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 | b=excluded.b,.c=c+1.WHERE.t1.b<e |
89960 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | xcluded.b;...SELECT.*,.'x'.FROM. |
89980 | 74 31 20 47 52 4f 55 50 20 42 59 20 61 2c 62 2d 20 22 61 22 2c 22 62 22 61 3b 0a 82 0e 84 13 04 | t1.GROUP.BY.a,b-."a","b"a;...... |
899a0 | 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..!..CREATE.TABLE.t1(a.INTEGER.P |
899c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
899e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
89a00 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | 2),(3,4);...INSERT.INTO.t1(a,b). |
89a20 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 | VALUES(1,8),(2,11),(3,1).....ON. |
89a40 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
89a60 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+1.WHERE.t1.b<exclude |
89a80 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f | d.b;...SELECT.*,.'x'.FROM.t1.GRO |
89aa0 | 55 50 20 42 59 20 61 2c 62 2c 61 3b 0a 82 17 84 12 04 00 84 33 20 20 43 52 45 41 54 45 20 54 41 | UP.BY.a,b,a;........3..CREATE.TA |
89ac0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
89ae0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
89b00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
89b20 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
89b40 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
89b60 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
89b80 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
89ba0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 20 72 61 6e 64 6f 6d 62 | *,.'x'.FROM.t1.GROUP.BY..randomb |
89bc0 | 6c 6f 62 28 31 29 3b 0a 82 0a 84 11 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | lob(1);...........CREATE.TABLE.t |
89be0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
89c00 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
89c20 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,b).VALUES(1,2),(3,4);...INSERT. |
89c40 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | INTO.t1(a,b).VALUES(1,8),(2,11), |
89c60 | 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (3,1).....ON.CONFLICT(a).DO.UPDA |
89c80 | 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 | TE.SET.b=excluded.b,.c=c+1.WHERE |
89ca0 | 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 2f 2a 20 | .t1.b<excluded.b;...SELECT.*./*. |
89cc0 | 2a 2f 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 82 0a 84 10 04 00 84 19 20 20 | */FROM.t1.GROUP.BY.c;........... |
89ce0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
89d00 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
89d20 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
89d40 | 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ,4);...INSERT.INTO.t1(a,b).VALUE |
89d60 | 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | S(1,8),(2,11),(3,1).....ON.CONFL |
89d80 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
89da0 | 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 2f 65 78 63 6c 75 64 65 64 2e 62 3b 0a | b,.c=c+1.WHERE.t1.b/excluded.b;. |
89dc0 | 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | ..SELECT.*,.'x'.FROM.t1.ORDER.BY |
89de0 | 20 61 3b 0a 82 0a 84 0f 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;...........CREATE.TABLE.t1(a. |
89e00 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
89e20 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
89e40 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(1,2),(3,4);...INSERT.INTO |
89e60 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(a,b).VALUES(1,8),(2,11),(3,1 |
89e80 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
89ea0 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
89ec0 | 62 2a 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | b*excluded.b;...SELECT.*,.'x'.FR |
89ee0 | 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 84 0e 04 00 84 19 20 20 43 52 45 41 | OM.t1.ORDER.BY.a;...........CREA |
89f00 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
89f20 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
89f40 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
89f60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
89f80 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 8),(2,11),(3,1).....ON.CONFLICT( |
89fa0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 | a).DO.UPDATE.SET.b=excluded.b,.c |
89fc0 | 3d 63 2b 31 20 57 48 45 52 45 20 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 3b 0a 20 20 53 45 | =c+1.WHERE.json_patch(1,1);...SE |
89fe0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
8a000 | 0d 00 00 00 1d 00 75 00 1e ca 1d b3 1c a1 1b 93 1a 85 19 77 18 57 17 37 16 29 15 1b 14 09 12 f3 | ......u............w.W.7.)...... |
8a020 | 11 dd 10 cd 0f bf 0e a9 0d 9b 0c 8d 0b 69 0a 45 09 2b 08 11 06 f7 05 e9 04 d4 03 c2 02 ad 01 97 | .............i.E.+.............. |
8a040 | 00 75 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .u.............................. |
8a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 1e 84 47 04 00 84 41 20 20 43 | ........................G...A..C |
8a080 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
8a0a0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
8a0c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
8a0e0 | 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 4);...INSERT.INTO.t1(a,b).VALUES |
8a100 | 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | (1,8),(3,11),(3,1).....ON.CONFLI |
8a120 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
8a140 | 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 | ,.c=c+1.WHERE.t1.b<excluded.b;.. |
8a160 | 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 3f 29 20 27 | .SELECT.*,.json_group_array(?).' |
8a180 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 12 84 46 04 00 84 29 20 | x'.FROM.t1.ORDER.BY.a;....F...). |
8a1a0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
8a1c0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
8a1e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
8a200 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
8a220 | 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(3,11),(3,1).....ON.CONF |
8a240 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
8a260 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
8a280 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | ...SELECT.*,.'x'.FROM.t1.ORDER.B |
8a2a0 | 59 20 61 20 4c 49 4d 49 54 2d 31 3b 0a 82 11 84 45 04 00 84 27 20 20 43 52 45 41 54 45 20 54 41 | Y.a.LIMIT-1;....E...'..CREATE.TA |
8a2c0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
8a2e0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
8a300 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
8a320 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,8),(3 |
8a340 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
8a360 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
8a380 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
8a3a0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 62 73 28 31 29 2c 61 | *,.'x'.FROM.t1.GROUP.BY.abs(1),a |
8a3c0 | 3b 0a 82 0e 84 44 04 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;....D...!..CREATE.TABLE.t1(a.IN |
8a3e0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
8a400 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
8a420 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | LUES(1,2),(3,4);...INSERT.INTO.t |
8a440 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 33 2c 31 29 0a | 1(a,b).VALUES(1,8),(3,11),(3,1). |
8a460 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
8a480 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c | .b=excluded.b,.c=c+1.WHERE.t1.b< |
8a4a0 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | excluded.b;...SELECT.*,.'x'.FROM |
8a4c0 | 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 2c 62 2d 61 3b 0a 82 11 84 43 04 00 84 27 20 20 43 52 | .t1.GROUP.BY.a,b-a;....C...'..CR |
8a4e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
8a500 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
8a520 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
8a540 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
8a560 | 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | 1,8),(2,11),(3,1).....ON.CONFLIC |
8a580 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
8a5a0 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 45 58 50 | .c=c+1.WHERE.t1.b<excluded.b;EXP |
8a5c0 | 4c 41 49 4e 0a 20 20 53 45 4c 45 43 54 20 61 66 66 69 6e 69 74 79 28 31 29 20 74 31 20 4f 52 44 | LAIN...SELECT.affinity(1).t1.ORD |
8a5e0 | 45 52 20 42 59 40 61 3b 0a 82 0a 84 42 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ER.BY@a;....B......CREATE.TABLE. |
8a600 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
8a620 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
8a640 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
8a660 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(2,11) |
8a680 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
8a6a0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 | ATE.SET.b=excluded.b,.c=c+1.WHER |
8a6c0 | 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 23 ea 2c 20 27 | E.t1.b<excluded.b;...SELECT#.,.' |
8a6e0 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 40 61 3b 0a 82 16 84 41 04 00 84 31 20 | x'.FROM.t1.ORDER.BY@a;....A...1. |
8a700 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
8a720 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
8a740 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
8a760 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
8a780 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
8a7a0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
8a7c0 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
8a7e0 | 0a 20 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 41 29 a0 41 2c 20 27 78 27 20 46 52 4f | ...SELECT.zeroblob(A).A,.'x'.FRO |
8a800 | 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 16 84 40 04 00 84 31 20 20 43 52 45 41 54 | M.t1.ORDER.BY.a;....@...1..CREAT |
8a820 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
8a840 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,.b.int,.c.DEFAULT.0);...INSERT. |
8a860 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a | INTO.t1(a,b).VALUES(1,2),(3,4);. |
8a880 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 | ..INSERT.INTO.t1(a,b).VALUES(1,8 |
8a8a0 | 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ),(2,11),(3,1).....ON.CONFLICT(a |
8a8c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
8a8e0 | 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c | c+1.WHERE.t1.b<excluded.b;...SEL |
8a900 | 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 41 29 20 7c 7c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | ECT.zeroblob(A).||.'x'.FROM.t1.O |
8a920 | 52 44 45 52 20 42 59 20 61 3b 0a 82 16 84 3f 04 00 84 31 20 20 43 52 45 41 54 45 20 54 41 42 4c | RDER.BY.a;....?...1..CREATE.TABL |
8a940 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
8a960 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
8a980 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 | 1(a,b).VALUES(1,2),(3,4);...INSE |
8a9a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | RT.INTO.t1(a,b).VALUES(1,8),(2,1 |
8a9c0 | 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | 1),(3,1).....ON.CONFLICT(a).DO.U |
8a9e0 | 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 | PDATE.SET.b=excluded.b,.c=c+1.WH |
8aa00 | 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 7a 65 | ERE.t1.b<excluded.b;...SELECT.ze |
8aa20 | 72 6f 62 6c 6f 62 28 41 29 20 41 2c 30 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | roblob(A).A,0'x'.FROM.t1.ORDER.B |
8aa40 | 59 20 61 3b 0a 82 20 84 3e 04 00 84 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.a;....>...E..CREATE.TABLE.t1(a |
8aa60 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8aa80 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8aaa0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .VALUES(1,2),(3,4);...INSERT.INT |
8aac0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | O.t1(a,b).VALUES(1,8),(2,11),(3, |
8aae0 | 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 1).....ON.CONFLICT(a).DO.UPDATE. |
8ab00 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 | SET.b=excluded.b,.c=c+1.WHERE.t1 |
8ab20 | 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 | .b<excluded.b;...SELECT.zeroblob |
8ab40 | 28 32 30 30 31 20 7c 7c 20 30 31 31 29 20 41 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | (2001.||.011).A,.'x'.FROM.t1.ORD |
8ab60 | 45 52 20 42 59 20 61 3b 0a 82 20 84 3d 04 00 84 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ER.BY.a;....=...E..CREATE.TABLE. |
8ab80 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
8aba0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
8abc0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
8abe0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(2,11) |
8ac00 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
8ac20 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 | ATE.SET.b=excluded.b,.c=c+1.WHER |
8ac40 | 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 7a 65 72 6f | E.t1.b<excluded.b;...SELECT.zero |
8ac60 | 62 6c 6f 62 28 20 60 61 60 2d 30 31 2d 30 31 31 29 20 41 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | blob(.`a`-01-011).A,.'x'.FROM.t1 |
8ac80 | 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 84 3c 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 | .ORDER.BY.a;....<......CREATE.TA |
8aca0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
8acc0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
8ace0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
8ad00 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
8ad20 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
8ad40 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
8ad60 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
8ad80 | 73 75 6d 28 31 29 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 82 0a 84 3b 04 | sum(1).FROM.t1.GROUP.BY.c;....;. |
8ada0 | 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
8adc0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
8ade0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
8ae00 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | 2),(3,4);...INSERT.INTO.t1(a,b). |
8ae20 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 | VALUES(1,8),(2,11),(3,1).....ON. |
8ae40 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
8ae60 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+1.WHERE.t1.b<exclude |
8ae80 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 68 65 78 28 31 29 20 46 52 4f 4d 20 74 31 20 47 52 4f | d.b;...SELECT.hex(1).FROM.t1.GRO |
8aea0 | 55 50 20 42 59 20 31 2c 31 82 12 84 3a 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | UP.BY.1,1...:...)..CREATE.TABLE. |
8aec0 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
8aee0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
8af00 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
8af20 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(2,11) |
8af40 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
8af60 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 | ATE.SET.b=excluded.b,.c=c+1.WHER |
8af80 | 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 61 76 67 28 | E.t1.b<excluded.b;...SELECT.avg( |
8afa0 | 31 29 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 20 4c 49 4d 49 54 2d 31 3b 0a 82 | 1).FROM.t1.ORDER.BY.a.LIMIT-1;.. |
8afc0 | 0a 84 39 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | ..9......CREATE.TABLE.t1(a.INTEG |
8afe0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
8b000 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
8b020 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | S(1,2),(3,4);...INSERT.INTO.t1(a |
8b040 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 | ,b).VALUES(1,8),(2,11),(3,1).... |
8b060 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
8b080 | 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 | excluded.b,.c=c+1.WHERE.t1.b<exc |
8b0a0 | 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 61 76 67 28 31 29 20 46 52 4f 4d 20 74 31 | luded.b;...SELECT.avg(1).FROM.t1 |
8b0c0 | 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 0c 84 38 04 00 84 1d 20 20 43 52 45 41 54 45 20 54 41 | .GROUP.BY.a;....8......CREATE.TA |
8b0e0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
8b100 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
8b120 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
8b140 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
8b160 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
8b180 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
8b1a0 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
8b1c0 | 61 66 66 69 6e 69 74 79 28 31 29 49 4e 20 74 31 20 4f 52 20 61 76 67 28 31 29 61 3b 0a 82 12 84 | affinity(1)IN.t1.OR.avg(1)a;.... |
8b1e0 | 37 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | 7...)..CREATE.TABLE.t1(a.INTEGER |
8b200 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
8b220 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
8b240 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | 1,2),(3,4);...INSERT.INTO.t1(a,b |
8b260 | 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f | ).VALUES(1,8),(2,11),(3,1).....O |
8b280 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
8b2a0 | 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 | cluded.b,.c=c+1.WHERE.t1.b<exclu |
8b2c0 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 3f 3c 20 27 78 27 20 46 | ded.b;...SELECT.DISTINCT?<.'x'.F |
8b2e0 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 12 84 36 04 00 84 29 20 20 43 52 45 | ROM.t1.ORDER.BY.a;....6...)..CRE |
8b300 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
8b320 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | EY,.b.int,.c.DEFAULT.0);...INSER |
8b340 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
8b360 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
8b380 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,8),(2,11),(3,1).....ON.CONFLICT |
8b3a0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 | (a).DO.UPDATE.SET.b=excluded.b,. |
8b3c0 | 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 | c=c+1.WHERE.t1.b<excluded.b;...S |
8b3e0 | 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | ELECT.DISTINCT*,.'x'.FROM.t1.ORD |
8b400 | 45 52 20 42 59 20 63 3b 0a 82 0e 84 35 04 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ER.BY.c;....5...!..CREATE.TABLE. |
8b420 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
8b440 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
8b460 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
8b480 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(2,11) |
8b4a0 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
8b4c0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 | ATE.SET.b=excluded.b,.c=c+1.WHER |
8b4e0 | 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 42 2c 20 27 | E.t1.b<excluded.b;...SELECT.B,.' |
8b500 | 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 2c 62 2d 61 3b 0a 82 0a 84 34 04 | x'.FROM.t1.GROUP.BY.a,b-a;....4. |
8b520 | 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
8b540 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
8b560 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
8b580 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | 2),(3,4);...INSERT.INTO.t1(a,b). |
8b5a0 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 | VALUES(1,8),(2,11),(3,1).....ON. |
8b5c0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
8b5e0 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+1.WHERE.t1.b<exclude |
8b600 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 41 2c 20 60 61 60 20 46 52 4f 4d 20 74 31 20 4f 52 44 | d.b;...SELECT.A,.`a`.FROM.t1.ORD |
8b620 | 45 52 20 42 59 20 61 3b 0a 82 0a 84 33 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ER.BY.a;....3......CREATE.TABLE. |
8b640 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
8b660 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
8b680 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
8b6a0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(2,11) |
8b6c0 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
8b6e0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 | ATE.SET.b=excluded.b,.c=c+1.WHER |
8b700 | 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 3f 31 20 27 | E.t1.b<excluded.b;...SELECT.?1.' |
8b720 | 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 31 2c 31 82 1c 84 32 04 00 84 3d 20 | x'.FROM.t1.GROUP.BY.1,1...2...=. |
8b740 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
8b760 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
8b780 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
8b7a0 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
8b7c0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
8b7e0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
8b800 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
8b820 | 0a 20 20 53 45 4c 45 43 54 20 32 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 27 | ...SELECT.2,.group_concat(1,1).' |
8b840 | 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 82 1c 84 31 04 00 84 3d 20 | x'.FROM.t1.GROUP.BY.c;....1...=. |
8b860 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
8b880 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
8b8a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
8b8c0 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
8b8e0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
8b900 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
8b920 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
8b940 | 0a 20 20 53 45 4c 45 43 54 20 32 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 27 | ...SELECT.2,.group_concat(1,1).' |
8b960 | 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 0a 84 30 04 00 84 19 20 | x'.FROM.t1.GROUP.BY.a;....0..... |
8b980 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
8b9a0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
8b9c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
8b9e0 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
8ba00 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
8ba20 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
8ba40 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
8ba60 | 0a 20 20 53 45 4c 45 43 54 20 32 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 | ...SELECT.2,.'x'.FROM.t1.GROUP.B |
8ba80 | 59 20 31 2c 31 82 0a 84 2f 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.1,1.../......CREATE.TABLE.t1(a |
8baa0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8bac0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8bae0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .VALUES(1,2),(3,4);...INSERT.INT |
8bb00 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | O.t1(a,b).VALUES(1,8),(2,11),(3, |
8bb20 | 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 1).....ON.CONFLICT(a).DO.UPDATE. |
8bb40 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 | SET.b=excluded.b,.c=c+1.WHERE.t1 |
8bb60 | 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 31 3d 31 27 78 27 20 46 | .b<excluded.b;...SELECT.1=1'x'.F |
8bb80 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 84 2e 04 00 84 19 20 20 43 52 45 | ROM.t1.ORDER.BY.a;...........CRE |
8bba0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
8bbc0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | EY,.b.int,.c.DEFAULT.0);...INSER |
8bbe0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
8bc00 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
8bc20 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,8),(2,11),(3,1).....ON.CONFLICT |
8bc40 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 | (a).DO.UPDATE.SET.b=excluded.b,. |
8bc60 | 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 | c=c+1.WHERE.t1.b<excluded.b;...S |
8bc80 | 45 4c 45 43 54 20 2d 31 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 31 2c | ELECT.-1.'x'.FROM.t1.GROUP.BY.1, |
8bca0 | 31 82 0e 84 2d 04 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | 1...-...!..CREATE.TABLE.t1(a.INT |
8bcc0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
8bce0 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
8bd00 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | UES(1,2),(3,4);...INSERT.INTO.t1 |
8bd20 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 | (a,b).VALUES(1,8),(2,11),(3,1).. |
8bd40 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
8bd60 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 | b=excluded.b,.c=c+1.WHERE.t1.b<e |
8bd80 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 42 20 61 2c 62 27 78 27 20 46 | xcluded.b;...SELECT.*,B.a,b'x'.F |
8bda0 | 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 13 84 2c 04 00 84 2b 20 20 43 52 45 | ROM.t1.GROUP.BY.a;....,...+..CRE |
8bdc0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
8bde0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | EY,.b.int,.c.DEFAULT.0);...INSER |
8be00 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
8be20 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
8be40 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,8),(2,11),(3,1).....ON.CONFLICT |
8be60 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 | (a).DO.UPDATE.SET.b=excluded.b,. |
8be80 | 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 | c=c+1.WHERE.t1.b<excluded.b;...S |
8bea0 | 45 4c 45 43 54 20 2a 2c 20 74 6f 74 61 6c 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 | ELECT.*,.total(1).'x'.FROM.t1.GR |
8bec0 | 4f 55 50 20 42 59 20 61 3b 0a 82 32 84 2b 04 00 84 69 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | OUP.BY.a;..2.+...i..CREATE.TABLE |
8bee0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
8bf00 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
8bf20 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(1,2),(3,4);...INSER |
8bf40 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | T.INTO.t1(a,b).VALUES(1,8),(2,11 |
8bf60 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
8bf80 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
8bfa0 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 | RE.t1.b<excluded.b;...SELECT.*,. |
8bfc0 | 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 3f 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | json_group_array(?).'x'.FROM.t1. |
8bfe0 | 4f 52 44 45 52 20 42 59 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 20 61 3b 0a | ORDER.BY.json_group_array(1).a;. |
8c000 | 0d 00 00 00 1a 01 6c 00 1e ea 1e 00 1c f2 1b e9 1a d4 19 c6 18 a4 17 8e 16 5b 15 24 13 f1 12 be | ......l..................[.$.... |
8c020 | 11 8b 10 58 0f 25 0d f2 0c bf 0b 8c 0a 0f 08 92 07 2f 05 cc 04 bf 03 bc 02 b9 01 6c 00 00 00 00 | ...X.%.........../.........l.... |
8c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8c160 | 00 00 00 00 00 00 00 00 00 00 00 00 82 49 84 61 04 00 85 17 20 20 43 52 45 41 54 45 20 54 41 42 | .............I.a......CREATE.TAB |
8c180 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
8c1a0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
8c1c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
8c1e0 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 20 2f 2a 20 2a 2f 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES./*.*/(2,11) |
8c200 | 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e | ,(.json_group_array(1),99))...IN |
8c220 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
8c240 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4e 4f 54 4e | ECT.a,.b.FROM.nx.WHERE.true.NOTN |
8c260 | 55 4c 4c 20 4f 52 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | ULL.OR.true...ON.CONFLICT(a).DO. |
8c280 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b | UPDATE.SET.b=excluded.b,.c=t2.c+ |
8c2a0 | 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 7f 84 60 04 00 84 | 1.WHERE.t2.b<excluded.b;....`... |
8c2c0 | 03 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t1(a.INTEGER.PRI |
8c2e0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
8c300 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
8c320 | 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 | ,(3,4);...WITH.nx(a,b).AS.(VALUE |
8c340 | 53 20 2f 2a 20 2a 2f 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 | S./*.*/(2,11),(.json_group_array |
8c360 | 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 | (1),99))...INSERT.INTO.main.t1.A |
8c380 | 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 | S.t2(a,b).SELECT.a,.b.FROM.nx.WH |
8c3a0 | 45 52 45 20 74 72 75 65 0a 49 53 4e 55 4c 4c 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 81 7f 84 5f | ERE.true.ISNULL.CONFLICT(a;...._ |
8c3c0 | 04 00 84 03 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t1(a.INTEGER. |
8c3e0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
8c400 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
8c420 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 | ,2),(3,4);...WITH.nx(a,b).AS.(VA |
8c440 | 4c 55 45 53 20 2f 2a 20 2a 2f 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 | LUES./*.*/(2,11),(.json_group_ar |
8c460 | 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 | ray(1),99))...INSERT.INTO.main.t |
8c480 | 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 | 1.AS.t2(a,b).SELECT.a,.b.FROM.nx |
8c4a0 | 20 57 48 45 52 45 20 74 72 75 65 0a 49 53 20 60 61 60 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 82 | .WHERE.true.IS.`a`.CONFLICT(a;.. |
8c4c0 | 09 84 5e 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | ..^......CREATE.TABLE.t1(a.INTEG |
8c4e0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
8c500 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
8c520 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 | S(1,2),(3,4);...WITH.nx(a,b).AS. |
8c540 | 28 56 41 4c 55 45 53 20 2f 2a 20 2a 2f 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 | (VALUES./*.*/(2,11),(.json_group |
8c560 | 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 | _array(1),99))...INSERT.INTO.mai |
8c580 | 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d | n.t1.AS.t2(a,b).SELECT.a,.b.FROM |
8c5a0 | 20 6e 78 20 57 48 45 52 45 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 20 67 6c 6f 62 28 | .nx.WHERE.sqlite_version().glob( |
8c5c0 | 31 2c 31 29 4c 49 43 54 28 61 3b 0a 82 5f 84 5d 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 | 1,1)LICT(a;.._.]...C..CREATE.TAB |
8c5e0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
8c600 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
8c620 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
8c640 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 53 45 4c 45 43 54 28 31 2c 38 29 2c 28 32 2c 20 73 71 | H.nx(a,b).AS.(SELECT(1,8),(2,.sq |
8c660 | 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 29 29 0a 20 20 49 4e | lite_compileoption_get(1)))...IN |
8c680 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
8c6a0 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 | ECT.a,.b.FROM.nx.WHERE.true..... |
8c6c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
8c6e0 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 | xcluded.b,.c=t2.c+1.WHERE.t2.b<e |
8c700 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | xcluded.b;...SELECT.*,.'x'.FROM. |
8c720 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 84 5c 04 00 85 43 20 20 43 52 45 41 54 45 20 | t1.ORDER.BY.a;.._.\...C..CREATE. |
8c740 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
8c760 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
8c780 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
8c7a0 | 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 53 45 4c 45 43 54 28 31 2c 38 29 2c 28 32 2c | WITH.nx(a,b).AS.(SELECT(1,8),(2, |
8c7c0 | 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 29 29 0a 20 | .sqlite_compileoption_get(1))).. |
8c7e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 | .INSERT.INTO.main.t1.AS.t2(a,b). |
8c800 | 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6d 61 78 28 31 2c | SELECT.a,.b.FROM.nx.WHERE.max(1, |
8c820 | 31 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 1).ON.CONFLICT(a).DO.UPDATE.SET. |
8c840 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e | b=excluded.b,.c=t2.c+1.WHERE.t2. |
8c860 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | b<excluded.b;...SELECT.*,.'x'.FR |
8c880 | 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 79 84 5b 04 00 85 77 20 20 43 52 45 41 | OM.t1.ORDER.BY.a;..y.[...w..CREA |
8c8a0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
8c8c0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
8c8e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
8c900 | 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 20 57 49 54 48 20 9c d7 87 d6 20 41 | ...WITH.nx(a,b).AS.(.WITH......A |
8c920 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | S.(values(1)).VALUES(1,8),(2,11) |
8c940 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
8c960 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
8c980 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 | ECT.a,.b.FROM.nx.WHERE.true..... |
8c9a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
8c9c0 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 | xcluded.b,.c=t2.c+1.WHERE.t2.b<e |
8c9e0 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | xcluded.b;...SELECT.*,.'x'.FROM. |
8ca00 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 79 84 5a 04 00 85 77 20 20 43 52 45 41 54 45 20 | t1.ORDER.BY.a;..y.Z...w..CREATE. |
8ca20 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
8ca40 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
8ca60 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
8ca80 | 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 | WITH.nx(a,b).AS.(.WITH.c(x).AS.( |
8caa0 | 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 | values(1)).VALUES(1,8),(2,11),(3 |
8cac0 | 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 | ,1),(2,15),(1,4),(1,99))...INSER |
8cae0 | 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 | T.INTO.main.t1.AS.t2(a,b).SELECT |
8cb00 | 20 61 2c 24 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 | .a,$b.FROM.nx.WHERE.true.....ON. |
8cb20 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
8cb40 | 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c | uded.b,.c=t2.c+1.WHERE.t2.b<excl |
8cb60 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
8cb80 | 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 2f 84 59 04 00 84 63 20 20 43 52 45 41 54 45 20 54 41 42 | ORDER.BY.a;../.Y...c..CREATE.TAB |
8cba0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
8cbc0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
8cbe0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
8cc00 | 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 56 41 4c 55 45 53 28 b1 2c 20 61 2c 62 32 2c 31 31 29 | H.nx./*.*/AS.(VALUES(.,.a,b2,11) |
8cc20 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
8cc40 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
8cc60 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 | ECT.a,.b.FROM.nx.WHERE.t....ON.C |
8cc80 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e | ONFLICT(a).DO.UPDATE.SET.b=eded. |
8cca0 | 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 | b,.c=t2.c+1.WHERE.t2.b<eded.a;.. |
8ccc0 | 2f 84 58 04 00 84 63 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | /.X...c..CREATE.TABLE.t1(a.INTEG |
8cce0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
8cd00 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
8cd20 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 | S(1,2),(3,4);...WITH.nx./*.*/AS. |
8cd40 | 28 56 41 4c 55 45 53 28 43 4f 4c 55 4d 4e 32 2c 4e 4f 54 20 49 4e 44 45 58 45 44 32 2c 31 35 29 | (VALUES(COLUMN2,NOT.INDEXED2,15) |
8cd60 | 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 | ,(1,4),(1,99))...INSERT.INTO.mai |
8cd80 | 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d | n.t1.AS.t2(a,b).SELECT.a,.b.FROM |
8cda0 | 20 6e 78 20 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .nx.WHERE.t....ON.CONFLICT(a).DO |
8cdc0 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | .UPDATE.SET.b=eded.b,.c=t2.c+1.W |
8cde0 | 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 2f 84 57 04 00 84 63 20 20 43 52 45 41 | HERE.t2.b<eded.a;../.W...c..CREA |
8ce00 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
8ce20 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
8ce40 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
8ce60 | 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 56 41 4c 55 45 53 28 31 2c 4e 4f 54 | ...WITH.nx./*.*/AS.(VALUES(1,NOT |
8ce80 | 20 49 4e 44 45 58 45 44 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 | .INDEXED3,1),(2,15),(1,4),(1,99) |
8cea0 | 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c | )...INSERT.INTO.main.t1.AS.t2(a, |
8cec0 | 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 20 | b).SELECT.a,.b.FROM.nx.WHERE.t.. |
8cee0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
8cf00 | 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 | =eded.b,.c=t2.c+1.WHERE.t2.b<ede |
8cf20 | 64 2e 61 3b 0a 82 2f 84 56 04 00 84 63 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | d.a;../.V...c..CREATE.TABLE.t1(a |
8cf40 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8cf60 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8cf80 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a | .VALUES(1,2),(3,4);...WITH.nx./* |
8cfa0 | 20 2a 2f 41 53 20 28 56 41 4c 55 45 53 28 31 2c 43 4f 4d 4d 49 54 31 31 29 2c 28 33 2c 31 29 2c | .*/AS.(VALUES(1,COMMIT11),(3,1), |
8cfc0 | 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | (2,15),(1,4),(1,99))...INSERT.IN |
8cfe0 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
8d000 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | b.FROM.nx.WHERE.t....ON.CONFLICT |
8d020 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 | (a).DO.UPDATE.SET.b=eded.b,.c=t2 |
8d040 | 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 2f 84 55 04 00 84 63 | .c+1.WHERE.t2.b<eded.a;../.U...c |
8d060 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
8d080 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
8d0a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
8d0c0 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx./*.*/AS.(VALUES |
8d0e0 | 28 31 2c 43 4f 4c 4c 41 54 45 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c | (1,COLLATE1),(3,1),(2,15),(1,4), |
8d100 | 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | (1,99))...INSERT.INTO.main.t1.AS |
8d120 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 | .t2(a,b).SELECT.a,.b.FROM.nx.WHE |
8d140 | 52 45 20 74 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | RE.t....ON.CONFLICT(a).DO.UPDATE |
8d160 | 20 53 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 | .SET.b=eded.b,.c=t2.c+1.WHERE.t2 |
8d180 | 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 2f 84 54 04 00 84 63 20 20 43 52 45 41 54 45 20 54 41 42 4c | .b<eded.a;../.T...c..CREATE.TABL |
8d1a0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
8d1c0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
8d1e0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
8d200 | 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 56 41 4c 55 45 53 28 31 2c 20 61 2e 62 32 2c 31 31 29 2c | .nx./*.*/AS.(VALUES(1,.a.b2,11), |
8d220 | 28 33 2c 20 61 2e 62 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,.a.b2,15),(1,4),(1,99))...INS |
8d240 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
8d260 | 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 4f | CT.a,.b.FROM.nx.WHERE.t....ON.CO |
8d280 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e 62 | NFLICT(a).DO.UPDATE.SET.b=eded.b |
8d2a0 | 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 2f | ,.c=t2.c+1.WHERE.t2.b<eded.a;../ |
8d2c0 | 84 53 04 00 84 63 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .S...c..CREATE.TABLE.t1(a.INTEGE |
8d2e0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
8d300 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
8d320 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 | (1,2),(3,4);...WITH.nx./*.*/AS.( |
8d340 | 56 41 4c 55 45 53 28 31 2c 20 61 2c 62 32 2c 20 22 61 22 2c 22 62 22 29 2c 28 32 2c 31 35 29 2c | VALUES(1,.a,b2,."a","b"),(2,15), |
8d360 | 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | (1,4),(1,99))...INSERT.INTO.main |
8d380 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 | .t1.AS.t2(a,b).SELECT.a,.b.FROM. |
8d3a0 | 6e 78 20 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | nx.WHERE.t....ON.CONFLICT(a).DO. |
8d3c0 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 | UPDATE.SET.b=eded.b,.c=t2.c+1.WH |
8d3e0 | 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 2f 84 52 04 00 84 63 20 20 43 52 45 41 54 | ERE.t2.b<eded.a;../.R...c..CREAT |
8d400 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
8d420 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,.b.int,.c.DEFAULT.0);...INSERT. |
8d440 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a | INTO.t1(a,b).VALUES(1,2),(3,4);. |
8d460 | 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 56 41 4c 55 45 53 28 20 61 2e 62 2e 62 | ..WITH.nx./*.*/AS.(VALUES(.a.b.b |
8d480 | 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 | 2,11),(3,1),(2,15),(1,4),(1,99)) |
8d4a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 | ...INSERT.INTO.main.t1.AS.t2(a,b |
8d4c0 | 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 20 20 | ).SELECT.a,.b.FROM.nx.WHERE.t... |
8d4e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
8d500 | 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 | eded.b,.c=t2.c+1.WHERE.t2.b<eded |
8d520 | 2e 61 3b 0a 82 33 84 51 04 00 84 6b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;..3.Q...k..CREATE.TABLE.t1(a. |
8d540 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
8d560 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
8d580 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 | VALUES(1,2),(3,4);...WITH.nx./*. |
8d5a0 | 2a 2f 41 53 20 28 56 41 4c 55 45 53 28 20 61 2e 62 2e 62 32 2c 20 61 2e 62 31 31 29 2c 28 33 2c | */AS.(VALUES(.a.b.b2,.a.b11),(3, |
8d5c0 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
8d5e0 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
8d600 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | a,.b.FROM.nx.WHERE.t....ON.CONFL |
8d620 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 | ICT(a).DO.UPDATE.SET.b=eded.b,.c |
8d640 | 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 2f 84 50 04 | =t2.c+1.WHERE.t2.b<eded.a;../.P. |
8d660 | 00 84 63 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..c..CREATE.TABLE.t1(a.INTEGER.P |
8d680 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
8d6a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
8d6c0 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 20 2f 2a 20 2a 2f 41 53 20 28 53 45 4c | 2),(3,4);...WITH.nx./*.*/AS.(SEL |
8d6e0 | 45 43 54 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c | ECT(1,8),(2,11),(3,1),(2,15),(1, |
8d700 | 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | 4),(1,99))...INSERT.INTO.main.t1 |
8d720 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | .AS.t2(a,b).SELECT.a,.b.FROM.nx. |
8d740 | 57 48 45 52 45 20 74 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | WHERE.t....ON.CONFLICT(a).DO.UPD |
8d760 | 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 | ATE.SET.b=eded.b,.c=t2.c+1.WHERE |
8d780 | 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a 82 12 84 4f 04 00 84 29 20 20 43 52 45 41 54 45 20 54 | .t2.b<eded.a;....O...)..CREATE.T |
8d7a0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
8d7c0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
8d7e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 | O.t1(a,b).VALUES(1,2),(3,4);...I |
8d800 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | NSERT.INTO.t1(c,b).VALUES(1,8),( |
8d820 | 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | 2,11),(3,1).....ON.CONFLICT(a).D |
8d840 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 | O.UPDATE.SET.b=excluded.b,.c=c+1 |
8d860 | 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t1.b<excluded.b;...SELECT |
8d880 | 20 44 49 53 54 49 4e 43 54 3f 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | .DISTINCT?,.'x'.FROM.t1.ORDER.BY |
8d8a0 | 20 61 3b 0a 82 1e 84 4e 04 00 84 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;....N...A..CREATE.TABLE.t1(a. |
8d8c0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
8d8e0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
8d900 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(1,2),(3,4);...INSERT.INTO |
8d920 | 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(c,b).VALUES(1,8),(2,11),(3,1 |
8d940 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
8d960 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
8d980 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 | b<excluded.b;...SELECT.*,.json_g |
8d9a0 | 72 6f 75 70 5f 61 72 72 61 79 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 | roup_array(1).'x'.FROM.t1.GROUP. |
8d9c0 | 42 59 20 61 3b 0a 82 0a 84 4d 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | BY.a;....M......CREATE.TABLE.t1( |
8d9e0 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
8da00 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | DEFAULT.0);...INSERT.INTO.t1(a,b |
8da20 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | ).VALUES(1,2),(3,4);...INSERT.IN |
8da40 | 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 | TO.t1(c,b).VALUES(1,8),(2,11),(3 |
8da60 | 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,1).....ON.CONFLICT(a).DO.UPDATE |
8da80 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 | .SET.b=excluded.b,.c=c+1.WHERE.t |
8daa0 | 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | 1.b<excluded.b;...SELECT.*,.'x'. |
8dac0 | 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 2d 61 3b 0a 82 11 84 4c 04 00 84 27 20 20 43 52 | FROM.t1.GROUP.BY-a;....L...'..CR |
8dae0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
8db00 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
8db20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
8db40 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(c,b).VALUES( |
8db60 | 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | 1,8),(2,11),(3,1).....ON.CONFLIC |
8db80 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
8dba0 | 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | .c=c+1.WHERE.t1.b<excluded.b;... |
8dbc0 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 | SELECT.*,.'x'.FROM.t1.GROUP.BY.a |
8dbe0 | 62 73 28 31 29 2c 61 3b 0a 82 05 84 4b 04 00 84 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | bs(1),a;....K......CREATE.TABLE. |
8dc00 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
8dc20 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
8dc40 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
8dc60 | 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(c,b).VALUES(1,8),(2,11) |
8dc80 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
8dca0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 | ATE.SET.b=excd.b,.c=c+1.WHERE.t1 |
8dcc0 | 2e 62 3c 65 78 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 31 3d 31 27 78 27 20 46 52 4f 4d 20 | .b<exed.b;...SELECT.1=1'x'.FROM. |
8dce0 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 20 44 45 53 43 82 0a 84 4a 04 00 84 19 20 20 43 52 45 41 | t1.ORDER.BY.a.DESC...J......CREA |
8dd00 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
8dd20 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
8dd40 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
8dd60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,c).VALUES(1, |
8dd80 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 8),(2,11),(3,1).....ON.CONFLICT( |
8dda0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 | a).DO.UPDATE.SET.b=.sqlite_compi |
8ddc0 | 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | leoption_get(1)<excluded.b;...SE |
8dde0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
8de00 | 81 66 84 49 04 00 83 51 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .f.I...Q..CREATE.TABLE.t1(a.INTE |
8de20 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
8de40 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
8de60 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ES(1,2),(3,4);...INSERT.INTO.t1( |
8de80 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 71 75 6f 74 65 28 3f 29 2c 31 29 0a 20 20 | a,b).VALUES(1,8),(quote(?),1)... |
8dea0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
8dec0 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 | =excluded.b,.c=c+1.WHERE.t1.b<ex |
8dee0 | 63 6c 75 64 65 64 2e 62 3b 0a 82 12 84 48 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | cluded.b;....H...)..CREATE.TABLE |
8df00 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
8df20 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
8df40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(1,2),(3,4);...INSER |
8df60 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 | T.INTO.t1(a,b).VALUES(1,8),(3,11 |
8df80 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
8dfa0 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
8dfc0 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 | RE.t1.b<excluded.b;...SELECT.DIS |
8dfe0 | 54 49 4e 43 54 3f 3c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | TINCT?<.'x'.FROM.t1.ORDER.BY.a;. |
8e000 | 0d 00 00 00 19 01 57 00 1e bb 1d 78 1c 35 1a ea 19 a5 18 50 17 4d 15 e2 14 7c 13 19 11 ac 10 42 | ......W....x.5.....P.M...|.....B |
8e020 | 0e df 0d 83 0c 3d 0b 34 0a 31 09 2e 07 e5 06 d0 05 c5 04 b0 03 a5 02 62 01 57 00 00 00 00 00 00 | .....=.4.1.............b.W...... |
8e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
8e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 07 84 7a 04 00 84 13 20 | ..........................z..... |
8e160 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
8e180 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
8e1a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
8e1c0 | 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 | 3,4);...WITH.nx(a,b).AS.(VALUES( |
8e1e0 | 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 | 1,8),(2,11),(.json_group_array(1 |
8e200 | 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 | ),99))...INSERT.INTO.main.t1.AS. |
8e220 | 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | t2(a,b).SELECT.a,.b.FROM.nx.WHER |
8e240 | 45 20 6c 69 6b 65 6c 79 28 2b 6a 73 6f 6e 5f 74 79 70 65 28 31 2c 31 29 29 20 44 4f 20 55 50 61 | E.likely(+json_type(1,1)).DO.UPa |
8e260 | 3b 0a 82 3f 84 79 04 00 85 03 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..?.y......CREATE.TABLE.t1(a.IN |
8e280 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
8e2a0 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
8e2c0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
8e2e0 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 | AS.(VALUES(1,8),(2,11),(.json_gr |
8e300 | 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | oup_array(1),99))...INSERT.INTO. |
8e320 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
8e340 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 20 72 65 70 6c 61 63 65 28 31 2c 31 | ROM.nx.WHERE.likely(.replace(1,1 |
8e360 | 2c 31 29 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | ,1)).DO.UPDATE.SET.b=excluded.b, |
8e380 | 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .c=t2.c+1.WHERE.t2.b<excluded.b; |
8e3a0 | 0a 20 61 3b 0a 82 07 84 78 04 00 84 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ..a;....x......CREATE.TABLE.t1(a |
8e3c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8e3e0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8e400 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
8e420 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
8e440 | 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _group_array(1),99))...INSERT.IN |
8e460 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
8e480 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 20 6a 73 6f 6e 5f 74 79 70 | b.FROM.nx.WHERE.likely(.json_typ |
8e4a0 | 65 28 42 2c 31 29 29 20 44 4f 20 55 50 61 3b 0a 82 11 84 77 04 00 84 27 20 20 43 52 45 41 54 45 | e(B,1)).DO.UPa;....w...'..CREATE |
8e4c0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
8e4e0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
8e500 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
8e520 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | .WITH.nx(a,b).AS.(VALUES(1,8),(2 |
8e540 | 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a | ,11),(.json_group_array(1),99)). |
8e560 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 | ..INSERT.INTO.main.t1.AS.t2(a,b) |
8e580 | 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c | .SELECT.a,.b.FROM.nx.WHERE.likel |
8e5a0 | 79 28 20 6a 73 6f 6e 5f 74 79 70 65 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 31 29 29 20 44 4f 20 | y(.json_type(2001-01-011,1)).DO. |
8e5c0 | 55 50 61 3b 0a 82 07 84 76 04 00 84 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | UPa;....v......CREATE.TABLE.t1(a |
8e5e0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8e600 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8e620 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
8e640 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
8e660 | 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _group_array(1),99))...INSERT.IN |
8e680 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
8e6a0 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 20 6a 73 6f 6e 5f 74 79 70 | b.FROM.nx.WHERE.likely(.json_typ |
8e6c0 | 65 28 31 3c 31 29 29 20 44 4f 20 55 50 61 3b 0a 82 11 84 75 04 00 84 27 20 20 43 52 45 41 54 45 | e(1<1)).DO.UPa;....u...'..CREATE |
8e6e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
8e700 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
8e720 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
8e740 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | .WITH.nx(a,b).AS.(VALUES(1,8),(2 |
8e760 | 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a | ,11),(.json_group_array(1),99)). |
8e780 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 | ..INSERT.INTO.main.t1.AS.t2(a,b) |
8e7a0 | 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c | .SELECT.a,.b.FROM.nx.WHERE.likel |
8e7c0 | 79 28 20 6a 73 6f 6e 5f 74 79 70 65 28 31 2c 31 29 29 20 67 6c 6f 62 28 31 2c 31 29 20 44 4f 20 | y(.json_type(1,1)).glob(1,1).DO. |
8e7e0 | 55 50 61 3b 0a 82 45 84 74 04 00 85 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | UPa;..E.t......CREATE.TABLE.t1(a |
8e800 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8e820 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8e840 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
8e860 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
8e880 | 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _group_array(1),99))...INSERT.IN |
8e8a0 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
8e8c0 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 20 61 62 73 28 31 29 2d 30 | b.FROM.nx.WHERE.likely(.abs(1)-0 |
8e8e0 | 31 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 11)ON.CONFLICT(a).DO.UPDATE.SET. |
8e900 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e | b=excluded.b,.c=t2.c+1.WHERE.t2. |
8e920 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 81 7f 84 73 04 00 84 03 20 20 43 52 45 41 54 45 20 54 | b<excluded.b;....s......CREATE.T |
8e940 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
8e960 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
8e980 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 | O.t1(a,b).VALUES(1,2),(3,4);...W |
8e9a0 | 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | ITH.nx(a,b).AS.(VALUES(1,8),(2,1 |
8e9c0 | 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 | 1),(.json_group_array(1),99))... |
8e9e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 | INSERT.INTO.main.t1.AS.t2(a,b).S |
8ea00 | 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 0a 49 53 | ELECT.a,.b.FROM.nx.WHERE..`a`.IS |
8ea20 | 4e 55 4c 4c 20 67 6c 6f 62 28 31 2c 31 29 61 3b 0a 81 7f 84 72 04 00 84 03 20 20 43 52 45 41 54 | NULL.glob(1,1)a;....r......CREAT |
8ea40 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
8ea60 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,.b.int,.c.DEFAULT.0);...INSERT. |
8ea80 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a | INTO.t1(a,b).VALUES(1,2),(3,4);. |
8eaa0 | 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | ..WITH.nx(a,b).AS.(VALUES(1,8),( |
8eac0 | 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 | 2,11),(.json_group_array(1),99)) |
8eae0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 | ...INSERT.INTO.main.t1.AS.t2(a,b |
8eb00 | 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 | ).SELECT.a,.b.FROM.nx.WHERE..`a` |
8eb20 | 0a 49 53 20 60 61 60 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 82 05 84 71 04 00 84 0f 20 20 43 52 | .IS.`a`.CONFLICT(a;....q......CR |
8eb40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
8eb60 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
8eb80 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
8eba0 | 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 | );...WITH.nx(a,b).AS.(VALUES(1,8 |
8ebc0 | 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 | ),(2,11),(.json_group_array(1),9 |
8ebe0 | 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 | 9))...INSERT.INTO.main.t1.AS.t2( |
8ec00 | 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 | a,b).SELECT.a,.b.FROM.nx.WHERE.. |
8ec20 | 60 61 60 0a 49 53 20 2f 2a 20 2a 2f 4e 55 4c 4c 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 82 42 84 | `a`.IS./*.*/NULL.CONFLICT(a;..B. |
8ec40 | 70 04 00 85 09 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | p......CREATE.TABLE.t1(a.INTEGER |
8ec60 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
8ec80 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
8eca0 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 | 1,2),(3,4);...WITH.nx(a,b).AS.(V |
8ecc0 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 | ALUES(1,8),(2,11),(.json_group_a |
8ece0 | 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e | rray(1),99))...INSERT.INTO.main. |
8ed00 | 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 2d 31 20 61 2c 20 62 20 46 52 4f | t1.AS.t2(a,b).SELECT.-1.a,.b.FRO |
8ed20 | 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | M.nx.WHERE.true.....ON.CONFLICT( |
8ed40 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 | a).DO.UPDATE.SET.b=excluded.b,.c |
8ed60 | 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 | =t2.c+1.WHERE.t2.b<excluded.b;.. |
8ed80 | 61 3b 0a 82 58 84 6f 04 00 85 35 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a;..X.o...5..CREATE.TABLE.t1(a.I |
8eda0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
8edc0 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
8ede0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 | ALUES(1,2),(3,4);...WITH.nx(a,b) |
8ee00 | 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 | .AS.(VALUES(1,8),(2,11),(.json_g |
8ee20 | 72 6f 75 70 5f 61 72 72 61 79 28 20 2d 31 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 | roup_array(.-11),99))...INSERT.I |
8ee40 | 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 67 72 | NTO.main.t1.AS.t2(a,b).SELECT.gr |
8ee60 | 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 47 4c 4f 42 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 | oup_concat(1,1)GLOB.a,.b.FROM.nx |
8ee80 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | .WHERE.true.....ON.CONFLICT(a).D |
8eea0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e | O.UPDATE.SET.b=excluded.b,.c=t2. |
8eec0 | 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 | c+1.WHERE.t2.b<excluded.b;..a;.. |
8eee0 | 5f 84 6e 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | _.n...C..CREATE.TABLE.t1(a.INTEG |
8ef00 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
8ef20 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
8ef40 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 | S(1,2),(3,4);...WITH.nx(a,b).AS. |
8ef60 | 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f | (VALUES(1,8),(2,.sqlite_compileo |
8ef80 | 70 74 69 6f 6e 5f 67 65 74 28 3f 29 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 | ption_get(?)))...INSERT.INTO.mai |
8efa0 | 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d | n.t1.AS.t2(a,b).SELECT.a,.b.FROM |
8efc0 | 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .nx.WHERE.true.....ON.CONFLICT(a |
8efe0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 61 3d | ).DO.UPDATE.SET.b=excluded.b,.a= |
8f000 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | t2.c+1.WHERE.t2.b<excluded.b;... |
8f020 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 | SELECT.*,.'x'.FROM.t1.ORDER.BY.a |
8f040 | 3b 0a 82 66 84 6d 04 00 85 51 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..f.m...Q..CREATE.TABLE.t1(a.IN |
8f060 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
8f080 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
8f0a0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
8f0c0 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 | AS.(VALUES(1,8),(2,.sqlite_compi |
8f0e0 | 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | leoption_get(1)))...INSERT.INTO. |
8f100 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
8f120 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 74 72 75 65 20 20 20 20 4f 4e 20 | ROM.nx.WHERE.true.OR.true....ON. |
8f140 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
8f160 | 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c | uded.b,.c=t2.c+1.WHERE.t2.b<excl |
8f180 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
8f1a0 | 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 69 84 6c 04 00 85 57 20 20 43 52 45 41 54 45 20 54 41 42 | ORDER.BY.a;..i.l...W..CREATE.TAB |
8f1c0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
8f1e0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
8f200 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
8f220 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 20 73 71 | H.nx(a,b).AS.(VALUES(1,8),(2,.sq |
8f240 | 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 29 29 0a 20 20 49 4e | lite_compileoption_get(1)))...IN |
8f260 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
8f280 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6d 61 78 28 32 30 30 31 2d | ECT.a,.b.FROM.nx.WHERE.max(2001- |
8f2a0 | 30 31 2d 30 31 31 2c 31 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | 01-011,1).ON.CONFLICT(a).DO.UPDA |
8f2c0 | 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 | TE.SET.b=excluded.b,.c=t2.c+1.WH |
8f2e0 | 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c | ERE.t2.b<excluded.b;...SELECT.*, |
8f300 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 84 6b 04 00 85 | .'x'.FROM.t1.ORDER.BY.a;.._.k... |
8f320 | 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | C..CREATE.TABLE.t1(a.INTEGER.PRI |
8f340 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
8f360 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
8f380 | 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 | ,(3,4);...WITH.nx(a,b).AS.(VALUE |
8f3a0 | 53 28 31 2c 38 29 2c 28 32 2c 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f | S(1,8),(2,.sqlite_compileoption_ |
8f3c0 | 67 65 74 28 31 29 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 | get(1)))...INSERT.INTO.main.t1.A |
8f3e0 | 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 | S.t2(a,b).SELECT.a,.b.FROM.nx.WH |
8f400 | 45 52 45 20 6d 61 78 28 31 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 29 20 44 4f 20 55 | ERE.max(1,.datetime(1,1,1)).DO.U |
8f420 | 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 | PDATE.SET.b=excluded.b,.c=t2.c+1 |
8f440 | 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t2.b<excluded.b;...SELECT |
8f460 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 62 84 6a | .*,.'x'.FROM.t1.ORDER.BY.a;..b.j |
8f480 | 04 00 85 49 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...I..CREATE.TABLE.t1(a.INTEGER. |
8f4a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
8f4c0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
8f4e0 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 | ,2),(3,4);...WITH.nx(a,b).AS.(VA |
8f500 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 | LUES(1,8),(2,.sqlite_compileopti |
8f520 | 6f 6e 5f 67 65 74 28 31 29 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 | on_get(1)))...INSERT.INTO.main.t |
8f540 | 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 | 1.AS.t2(a,b).SELECT.a,.b.FROM.nx |
8f560 | 20 57 48 45 52 45 20 6d 61 78 28 20 2d 31 31 2c 31 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .WHERE.max(.-11,1).ON.CONFLICT(a |
8f580 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
8f5a0 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | t2.c+1.WHERE.t2.b<excluded.b;... |
8f5c0 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 | SELECT.*,.'x'.FROM.t1.ORDER.BY.a |
8f5e0 | 3b 0a 82 67 84 69 04 00 85 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..g.i...S..CREATE.TABLE.t1(a.IN |
8f600 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
8f620 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
8f640 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
8f660 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 20 63 68 61 72 28 31 29 29 2c 28 33 2c 31 29 2c 28 32 2c | AS.(VALUES(1,.char(1)),(3,1),(2, |
8f680 | 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 15),(1,4),(1,99))...INSERT.INTO. |
8f6a0 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
8f6c0 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 66 61 6c 73 65 20 20 20 20 4f 4e | ROM.nx.WHERE.true.OR.false....ON |
8f6e0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
8f700 | 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 | luded.b,.c=t2.c+1.WHERE.t2.b<exc |
8f720 | 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | luded.b;...SELECT.*,.'x'.FROM.t1 |
8f740 | 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 81 7f 84 68 04 00 84 03 20 20 43 52 45 41 54 45 20 54 41 | .ORDER.BY.a;....h......CREATE.TA |
8f760 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
8f780 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
8f7a0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 | .t1(a,b).VALUES(1,2),(3,4);...WI |
8f7c0 | 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 20 63 6f 61 6c 65 73 63 65 28 | TH.nx(a,b).AS.(VALUES(.coalesce( |
8f7e0 | 31 2c 31 29 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 | 1,1),1),(2,15),(1,4),(1,99))...I |
8f800 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
8f820 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c | LECT.a,.b.FROM.nx.WHERE..`a`COLL |
8f840 | 41 54 45 20 43 4f 4e 46 4c 49 43 54 3c 61 3b 0a 82 51 84 67 04 00 85 27 20 20 43 52 45 41 54 45 | ATE.CONFLICT<a;..Q.g...'..CREATE |
8f860 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
8f880 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
8f8a0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
8f8c0 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 | .WITH.nx(a,b).AS.(VALUES(.avg(1) |
8f8e0 | 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f | COLLATE.nocase,11),(.json_group_ |
8f900 | 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | array(1),99))...INSERT.INTO.main |
8f920 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 | .t1.AS.t2(a,b).SELECT.a,.b.FROM. |
8f940 | 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 66 61 6c 73 65 20 20 20 20 4f 4e 20 43 4f 4e | nx.WHERE.true.OR.false....ON.CON |
8f960 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
8f980 | 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 | d.b,.c=t2.c+1.WHERE.t2.b<exclude |
8f9a0 | 64 2e 62 3b 0a 82 41 84 66 04 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | d.b;..A.f......CREATE.TABLE.t1(a |
8f9c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
8f9e0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
8fa00 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
8fa20 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(.avg(1),11),(.json |
8fa40 | 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _replace(1,1,1),99))...INSERT.IN |
8fa60 | 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f | TO.t1.AS.t2(a,b).SELECT.a,.b.FRO |
8fa80 | 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 4f 52 20 74 72 75 65 | M.nx.WHERE.true.AND.true.OR.true |
8faa0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
8fac0 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e | b=excluded.b,.c=t1.c+1.WHERE.t1. |
8fae0 | 62 3c 65 78 65 64 2e 62 3b 0a 82 47 84 65 04 00 85 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | b<exed.b;..G.e......CREATE.TABLE |
8fb00 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
8fb20 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
8fb40 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 | (a,b).VALUES(1,2),(3,4);...WITH. |
8fb60 | 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 31 31 29 2c 28 | nx(a,b).AS.(VALUES(.avg(1),11),( |
8fb80 | 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 | .json_group_array(1),99))...INSE |
8fba0 | 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 | RT.INTO.main.t1.AS.t2(a,b).SELEC |
8fbc0 | 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 72 | T.a,.b.FROM.nx.WHERE.true.AND.tr |
8fbe0 | 75 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ue....ON.CONFLICT(a).DO.UPDATE.S |
8fc00 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 | ET.b=excluded.b,.c=t2.c+1.WHERE. |
8fc20 | 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 3f 84 64 04 00 85 03 20 20 43 | t2.b<excluded.b;..a;..?.d......C |
8fc40 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
8fc60 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
8fc80 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
8fca0 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 20 61 | 4);...WITH.nx(a,b).AS.(VALUES(.a |
8fcc0 | 76 67 28 31 29 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c | vg(1),11),(.json_group_array(1), |
8fce0 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 | 99))...INSERT.INTO.main.t1.AS.t2 |
8fd00 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
8fd20 | 60 61 60 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | `a`e.....ON.CONFLICT(a).DO.UPDAT |
8fd40 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 | E.SET.b=excluded.b,.c=t2.c+1.WHE |
8fd60 | 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 3f 84 63 04 00 85 03 | RE.t2.b<excluded.b;..a;..?.c.... |
8fd80 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
8fda0 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
8fdc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
8fde0 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
8fe00 | 28 20 2f 2a 20 2a 2f 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 | (./*.*/2,11),(.json_group_array( |
8fe20 | 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | 1),99))...INSERT.INTO.main.t1.AS |
8fe40 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 | .t2(a,b).SELECT.a,.b.FROM.nx.WHE |
8fe60 | 52 45 20 6c 69 6b 65 6c 79 28 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | RE.likely(1)ON.CONFLICT(a).DO.UP |
8fe80 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 | DATE.SET.b=excluded.b,.c=t2.c+1. |
8fea0 | 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 41 84 62 04 | WHERE.t2.b<excluded.b;..a;..A.b. |
8fec0 | 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
8fee0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
8ff00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
8ff20 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
8ff40 | 55 45 53 20 2f 2a 20 2a 2f 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 | UES./*.*/(2,11),(.json_replace(1 |
8ff60 | 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 | ,1,1),99))...INSERT.INTO.t1.AS.t |
8ff80 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 | 2(a,b).SELECT.a,.b.FROM.nx.WHERE |
8ffa0 | 20 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 4f 52 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 | .true.AND.true.OR.true...ON.CONF |
8ffc0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
8ffe0 | 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a | .b,.c=t1.c+1.WHERE.t1.b<exed.b;. |
90000 | 0d 00 00 00 1a 00 c5 00 1e ad 1d 64 1c 1b 1b 0a 19 ec 18 d5 17 c8 16 bb 15 b8 14 8d 13 42 12 3c | ...........d.................B.< |
90020 | 11 32 0f e5 0e d8 0d d3 0c 7e 0b 25 09 ba 08 65 07 10 05 d2 04 94 03 4f 02 0a 00 c5 00 00 00 00 | .2.......~.%...e.......O........ |
90040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
90060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
90080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
900a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
900c0 | 00 00 00 00 00 82 41 85 14 04 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ......A........CREATE.TABLE.t1(a |
900e0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
90100 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
90120 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
90140 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
90160 | 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _replace(1,1,1),99))...INSERT.IN |
90180 | 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f | TO.t1.AS.t2(a,b).SELECT.a,.b.FRO |
901a0 | 4d 20 6e 78 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 4f 52 20 74 72 75 65 | M.nx.WHERE.randomblob(1).OR.true |
901c0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
901e0 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e | b=excluded.b,.c=t1.c+1.WHERE.t1. |
90200 | 62 3c 65 78 65 64 2e 62 3b 0a 82 41 85 13 04 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | b<exed.b;..A........CREATE.TABLE |
90220 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
90240 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
90260 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 | (a,b).VALUES(1,2),(3,4);...WITH. |
90280 | 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 | nx(a,b).AS.(VALUES(1,8),(2,11),( |
902a0 | 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 | .json_replace(1,1,1),99))...INSE |
902c0 | 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | RT.INTO.t1.AS.t2(a,b).SELECT.a,. |
902e0 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 31 3d 31 0a 41 4e 44 20 74 72 75 65 20 4f 52 | b.FROM.nx.WHERE..1=1.AND.true.OR |
90300 | 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(a).DO.UPDATE |
90320 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 | .SET.b=excluded.b,.c=t1.c+1.WHER |
90340 | 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 41 85 12 04 00 85 07 20 20 43 52 45 41 54 45 20 | E.t1.b<exed.b;..A........CREATE. |
90360 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
90380 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
903a0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
903c0 | 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c | WITH.nx(a,b).AS.(VALUES(1,8),(2, |
903e0 | 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a 20 | 11),(.json_replace(1,1,1),99)).. |
90400 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 | .INSERT.INTO.t1.AS.t2(a,b).SELEC |
90420 | 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 28 31 29 4f 52 20 74 72 75 65 | T.a,.b.FROM.nx.WHERE..(1)OR.true |
90440 | 0a 41 4e 44 20 74 72 75 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | .AND.true....ON.CONFLICT(a).DO.U |
90460 | 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 | PDATE.SET.b=excluded.b,.c=t1.c+1 |
90480 | 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 3a 85 11 04 00 84 79 20 20 43 52 | .WHERE.t1.b<exed.b;..:.....y..CR |
904a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
904c0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
904e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
90500 | 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 | );...WITH.nx(a,b).AS.(VALUES(1,8 |
90520 | 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 | ),(2,11),(.json_replace(1,1,1),9 |
90540 | 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 | 9))...INSERT.INTO.t1.AS.t2(a,b). |
90560 | 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 28 31 29 0a 41 | SELECT.a,.b.FROM.nx.WHERE..(1).A |
90580 | 4e 44 20 5b 61 5d 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ND.[a]e....ON.CONFLICT(a).DO.UPD |
905a0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t1.c+1.W |
905c0 | 48 45 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 3a 85 10 04 00 84 79 20 20 43 52 45 41 | HERE.t1.b<exed.b;..:.....y..CREA |
905e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
90600 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
90620 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
90640 | 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c | ...WITH.nx(a,b).AS.(VALUES(1,8), |
90660 | 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 | (2,11),(.json_replace(1,1,1),99) |
90680 | 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | )...INSERT.INTO.t1.AS.t2(a,b).SE |
906a0 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 28 31 29 0a 41 4e 44 | LECT.a,.b.FROM.nx.WHERE..(1).AND |
906c0 | 20 28 31 29 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | .(1)e....ON.CONFLICT(a).DO.UPDAT |
906e0 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 | E.SET.b=excluded.b,.c=t1.c+1.WHE |
90700 | 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 51 85 0f 04 00 85 27 20 20 43 52 45 41 54 45 | RE.t1.b<exed.b;..Q.....'..CREATE |
90720 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
90740 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
90760 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
90780 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | .WITH.nx(a,b).AS.(VALUES(1,8),(2 |
907a0 | 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a | ,11),(.json_group_array(1),99)). |
907c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 | ..INSERT.INTO.main.t1.AS.t2(a,b) |
907e0 | 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 3c 31 29 20 61 2c 20 62 20 46 | .SELECT.group_concat(1<1).a,.b.F |
90800 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ROM.nx.WHERE.true.....ON.CONFLIC |
90820 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
90840 | 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .c=t2.c+1.WHERE.t2.b<excluded.b; |
90860 | 0a 20 61 3b 0a 82 51 85 0e 04 00 85 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ..a;..Q.....'..CREATE.TABLE.t1(a |
90880 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
908a0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
908c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
908e0 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
90900 | 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _group_array(1),99))...INSERT.IN |
90920 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 67 72 6f | TO.main.t1.AS.t2(a,b).SELECT.gro |
90940 | 75 70 5f 63 6f 6e 63 61 74 28 31 2c 3f 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | up_concat(1,?).a,.b.FROM.nx.WHER |
90960 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
90980 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t2.c+1.W |
909a0 | 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 67 85 0d 04 00 | HERE.t2.b<excluded.b;..a;..g.... |
909c0 | 85 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .S..CREATE.TABLE.t1(a.INTEGER.PR |
909e0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
90a00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
90a20 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
90a40 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 | ES(1,8),(2,11),(.json_group_arra |
90a60 | 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | y(1),99))...INSERT.INTO.main.t1. |
90a80 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 | AS.t2(a,b).SELECT.group_concat(1 |
90aa0 | 2c 31 29 47 4c 4f 42 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 20 61 2c 20 62 20 46 | ,1)GLOB.json_array(1,1,1).a,.b.F |
90ac0 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ROM.nx.WHERE.true.....ON.CONFLIC |
90ae0 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
90b00 | 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .c=t2.c+1.WHERE.t2.b<excluded.b; |
90b20 | 0a 20 61 3b 0a 82 55 85 0c 04 00 85 2f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ..a;..U...../..CREATE.TABLE.t1(a |
90b40 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
90b60 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
90b80 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
90ba0 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
90bc0 | 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _group_array(1),99))...INSERT.IN |
90be0 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 67 72 6f | TO.main.t1.AS.t2(a,b).SELECT.gro |
90c00 | 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 47 4c 4f 42 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | up_concat(1,1)GLOB.a,.b.FROM.nx. |
90c20 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | WHERE.true.....ON.CONFLICT(a).DO |
90c40 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 | .UPDATE.SET.b=excluded.b,.c=t2.c |
90c60 | 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 51 | +1.WHERE.t2.b<excluded.b;..a;..Q |
90c80 | 85 0b 04 00 85 27 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .....'..CREATE.TABLE.t1(a.INTEGE |
90ca0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
90cc0 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
90ce0 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 | (1,2),(3,4);...WITH.nx(a,b).AS.( |
90d00 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f | VALUES(1,8),(2,11),(.json_group_ |
90d20 | 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | array(1),99))...INSERT.INTO.main |
90d40 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 | .t1.AS.t2(a,b).SELECT.group_conc |
90d60 | 61 74 28 31 2c 31 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 67 72 6f 75 70 | at(1,1).a,.b.FROM.nx.WHERE.group |
90d80 | 5f 63 6f 6e 63 61 74 28 31 2c 31 29 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | _concat(1,1)ICT(a).DO.UPDATE.SET |
90da0 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 | .b=excluded.b,.c=t2.c+1.WHERE.t2 |
90dc0 | 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 01 85 0a 04 00 84 07 20 20 43 52 45 | .b<excluded.b;..a;...........CRE |
90de0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
90e00 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | EY,.b.int,.c.DEFAULT.0);...INSER |
90e20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
90e40 | 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 | ;...WITH.nx(a,b).AS.(VALUES(1,8) |
90e60 | 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 | ,(2,11),(.json_group_array(1),99 |
90e80 | 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 | ))...INSERT.INTO.main.t1.AS.t2(a |
90ea0 | 2c 62 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 20 | ,b).SELECT.group_concat(1,1).a,. |
90ec0 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 60 61 60 65 0a 20 20 0a 82 09 85 09 04 00 84 17 | b.FROM.nx.WHERE.`a`e............ |
90ee0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
90f00 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
90f20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
90f40 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
90f60 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 | (1,8),(2,11),(.json_group_array( |
90f80 | 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | 1),99))...INSERT.INTO.main.t1.AS |
90fa0 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 | .t2(a,b).SELECT.a,.b.FROM.nx.WHE |
90fc0 | 52 45 2b 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 20 67 6c 6f 62 28 31 2c 31 29 4c 49 43 | RE+sqlite_version().glob(1,1)LIC |
90fe0 | 54 28 61 3b 0a 82 49 85 08 04 00 85 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | T(a;..I........CREATE.TABLE.t1(a |
91000 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
91020 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
91040 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
91060 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e | b).AS.(VALUES(1,8),(2,11),(.json |
91080 | 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | _group_array(1),99))...INSERT.IN |
910a0 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
910c0 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4e 4f 54 4e 55 4c 4c 20 4f 52 20 | b.FROM.nx.WHERE.true.NOTNULL.OR. |
910e0 | 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(a).DO.UPDATE. |
91100 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 | SET.b=excluded.b,.c=t2.c+1.WHERE |
91120 | 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 82 06 85 07 04 00 84 11 20 20 43 52 45 41 | .t2.b<excluded.b;...........CREA |
91140 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
91160 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
91180 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
911a0 | 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c | ...WITH.nx(a,b).AS.(VALUES(1,8), |
911c0 | 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 | (2,11),(.json_group_array(1),99) |
911e0 | 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c | )...INSERT.INTO.main.t1.AS.t2(a, |
91200 | 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 | b).SELECT.a,.b.FROM.nx.WHERE.tru |
91220 | 65 0a 49 53 20 60 61 60 4f 52 20 74 72 75 65 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 82 02 85 06 | e.IS.`a`OR.true.CONFLICT(a;..... |
91240 | 04 00 84 09 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t1(a.INTEGER. |
91260 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
91280 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
912a0 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 | ,2),(3,4);...WITH.nx(a,b).AS.(VA |
912c0 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 | LUES(1,8),(2,11),(.json_group_ar |
912e0 | 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 | ray(1),99))...INSERT.INTO.main.t |
91300 | 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 | 1.AS.t2(a,b).SELECT.a,.b.FROM.nx |
91320 | 20 57 48 45 52 45 20 74 72 75 65 0a 49 53 20 4e 4f 54 60 61 60 20 43 4f 4e 46 4c 49 43 54 28 61 | .WHERE.true.IS.NOT`a`.CONFLICT(a |
91340 | 3b 0a 82 47 85 05 04 00 85 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..G........CREATE.TABLE.t1(a.IN |
91360 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
91380 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
913a0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
913c0 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 | AS.(VALUES(1,8),(2,11),(.json_gr |
913e0 | 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | oup_array(1),99))...INSERT.INTO. |
91400 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
91420 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 20 20 20 4f 4e | ROM.nx.WHERE.true.AND.true....ON |
91440 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
91460 | 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 | luded.b,.c=t2.c+1.WHERE.t2.b<exc |
91480 | 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 82 27 85 04 04 00 84 53 20 20 43 52 45 41 54 45 20 54 41 | luded.b;..a;..'.....S..CREATE.TA |
914a0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
914c0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
914e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 | .t1(a,b).VALUES(1,2),(3,4);...WI |
91500 | 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | TH.nx(a,b).AS.(VALUES(1,8),(2,11 |
91520 | 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 | ),(.json_group_array(1),99))...I |
91540 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
91560 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 | LECT.a,.b.FROM.nx.WHERE.true.... |
91580 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
915a0 | 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 00 61 3b 0a 81 7f 85 03 04 00 84 03 | excluded.b,.c=t2.c+1.a;......... |
915c0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
915e0 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
91600 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
91620 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
91640 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 | (1,8),(2,11),(.json_group_array( |
91660 | 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | 1),99))...INSERT.INTO.main.t1.AS |
91680 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 | .t2(a,b).SELECT.a,.b.FROM.nx.WHE |
916a0 | 52 45 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 4c 49 43 54 28 61 3b 0a 82 09 85 02 04 | RE.sqlite_version()LICT(a;...... |
916c0 | 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
916e0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
91700 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
91720 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
91740 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 | UES(1,8),(2,11),(.json_group_arr |
91760 | 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | ay(1),99))...INSERT.INTO.main.t1 |
91780 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | .AS.t2(a,b).SELECT.a,.b.FROM.nx. |
917a0 | 57 48 45 52 45 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 3e 67 6c 6f 62 28 31 2c 31 29 | WHERE.sqlite_version()>glob(1,1) |
917c0 | 4c 49 43 54 28 61 3b 0a 82 09 85 01 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | LICT(a;...........CREATE.TABLE.t |
917e0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
91800 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
91820 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
91840 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a | (a,b).AS.(VALUES(1,8),(2,11),(.j |
91860 | 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | son_group_array(1),99))...INSERT |
91880 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
918a0 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f | a,.b.FROM.nx.WHERE.sqlite_versio |
918c0 | 6e 28 29 20 67 6c 6f 62 3a 31 2c 31 29 4c 49 43 54 28 61 3b 0a 82 13 85 00 04 00 84 2b 20 20 43 | n().glob:1,1)LICT(a;........+..C |
918e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
91900 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
91920 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
91940 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | 4);...WITH.nx(a,b).AS.(VALUES(1, |
91960 | 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c | 8),(2,11),(.json_group_array(1), |
91980 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 | 99))...INSERT.INTO.main.t1.AS.t2 |
919a0 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
919c0 | 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 20 67 6c 6f 62 28 31 2c 31 29 20 67 6c 6f 62 28 | sqlite_version().glob(1,1).glob( |
919e0 | 31 2c 31 29 4c 49 43 54 28 61 3b 0a 82 1a 84 7f 04 00 84 39 20 20 43 52 45 41 54 45 20 54 41 42 | 1,1)LICT(a;........9..CREATE.TAB |
91a00 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
91a20 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
91a40 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
91a60 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
91a80 | 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e | ,(.json_group_array(1),99))...IN |
91aa0 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
91ac0 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 73 71 6c 69 74 65 5f 76 65 | ECT.a,.b.FROM.nx.WHERE.sqlite_ve |
91ae0 | 72 73 69 6f 6e 28 29 20 67 6c 6f 62 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 28 31 2c | rsion().glob.sqlite_version()(1, |
91b00 | 31 29 4c 49 43 54 28 61 3b 0a 82 0d 84 7e 04 00 84 1f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | 1)LICT(a;....~......CREATE.TABLE |
91b20 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
91b40 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
91b60 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 | (a,b).VALUES(1,2),(3,4);...WITH. |
91b80 | 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 | nx(a,b).AS.(VALUES(1,8),(2,11),( |
91ba0 | 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 | .json_group_array(1),99))...INSE |
91bc0 | 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 | RT.INTO.main.t1.AS.t2(a,b).SELEC |
91be0 | 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 73 71 6c 69 74 65 5f 76 65 72 73 | T.a,.b.FROM.nx.WHERE.sqlite_vers |
91c00 | 69 6f 6e 28 29 20 67 6c 6f 62 20 27 61 27 28 31 2c 31 29 4c 49 43 54 28 61 3b 0a 82 45 84 7d 04 | ion().glob.'a'(1,1)LICT(a;..E.}. |
91c20 | 00 85 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
91c40 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
91c60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
91c80 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
91ca0 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 | UES(1,8),(2,11),(.json_group_arr |
91cc0 | 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | ay(1),99))...INSERT.INTO.main.t1 |
91ce0 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | .AS.t2(a,b).SELECT.a,.b.FROM.nx. |
91d00 | 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 32 3c 30 31 2d 30 31 2d 30 31 31 29 4f 4e 20 43 4f 4e 46 | WHERE.likely(2<01-01-011)ON.CONF |
91d20 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
91d40 | 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 | .b,.c=t2.c+1.WHERE.t2.b<excluded |
91d60 | 2e 62 3b 0a 82 45 84 7c 04 00 85 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .b;..E.|......CREATE.TABLE.t1(a. |
91d80 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
91da0 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
91dc0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 | VALUES(1,2),(3,4);...WITH.nx(a,b |
91de0 | 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f | ).AS.(VALUES(1,8),(2,11),(.json_ |
91e00 | 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | group_array(1),99))...INSERT.INT |
91e20 | 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 | O.main.t1.AS.t2(a,b).SELECT.a,.b |
91e40 | 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 32 30 30 31 2d 30 31 2d 30 3d | .FROM.nx.WHERE.likely(2001-01-0= |
91e60 | 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | 1)ON.CONFLICT(a).DO.UPDATE.SET.b |
91e80 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 | =excluded.b,.c=t2.c+1.WHERE.t2.b |
91ea0 | 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 82 4f 84 7b 04 00 85 23 20 20 43 52 45 41 54 45 20 54 41 | <excluded.b;..O.{...#..CREATE.TA |
91ec0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
91ee0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
91f00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 | .t1(a,b).VALUES(1,2),(3,4);...WI |
91f20 | 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | TH.nx(a,b).AS.(VALUES(1,8),(2,11 |
91f40 | 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 | ),(.json_group_array(1),99))...I |
91f60 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
91f80 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 32 | LECT.a,.b.FROM.nx.WHERE.likely(2 |
91fa0 | 30 30 31 2d 30 31 20 67 6c 6f 62 28 31 2c 31 29 2d 30 31 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 001-01.glob(1,1)-011)ON.CONFLICT |
91fc0 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 | (a).DO.UPDATE.SET.b=excluded.b,. |
91fe0 | 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a | c=t2.c+1.WHERE.t2.b<excluded.b;. |
92000 | 0d 00 00 00 19 00 fe 00 1e bb 1d 76 1c 30 1a eb 19 a6 18 5a 16 f5 15 b5 14 6f 13 6c 12 69 10 f8 | ...........v.0.....Z.....o.l.i.. |
92020 | 0f 8c 0e 16 0c a0 0b 61 0a 6e 09 25 07 c2 06 5f 05 54 03 f1 02 fe 02 0b 00 fe 00 00 00 00 00 00 | .......a.n.%..._.T.............. |
92040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
92060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
92080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
920a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
920c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
920e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 09 | ................................ |
92100 | 85 2d 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .-......CREATE.TABLE.t1(a.INTEGE |
92120 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
92140 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
92160 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 | (1,2),(3,4);...WITH.nx(a,b).AS.( |
92180 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c | VALUES(1,8),(2,11),(3,1),(2,15), |
921a0 | 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | (1,4),(1,99))...INSERT.INTO.main |
921c0 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 | .t1.AS.t2(a,b).SELECT.a,.b.FROM. |
921e0 | 6e 78 20 57 48 45 52 45 20 20 60 61 60 20 67 6c 6f 62 28 31 2c 31 29 43 4f 4c 4c 41 54 45 20 43 | nx.WHERE..`a`.glob(1,1)COLLATE.C |
92200 | 4f 4e 46 4c 49 43 54 3c 61 3b 0a 81 6f 85 2c 04 00 83 63 20 20 43 52 45 41 54 45 20 54 41 42 4c | ONFLICT<a;..o.,...c..CREATE.TABL |
92220 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
92240 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
92260 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
92280 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
922a0 | 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,1),(2,15),(1,4),(1,99))...INS |
922c0 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
922e0 | 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 4f 52 44 45 52 20 42 59 22 2c 22 20 2d 31 81 6f | CT.a,.b.FROM.nx.ORDER.BY",".-1.o |
92300 | 85 2b 04 00 83 63 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .+...c..CREATE.TABLE.t1(a.INTEGE |
92320 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
92340 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
92360 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 | (1,2),(3,4);...WITH.nx(a,b).AS.( |
92380 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c | VALUES(1,8),(2,11),(3,1),(2,15), |
923a0 | 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | (1,4),(1,99))...INSERT.INTO.main |
923c0 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 | .t1.AS.t2(a,b).SELECT.a,.b.FROM. |
923e0 | 6e 78 20 4f 52 44 45 52 20 42 59 20 31 3d 31 3b 0a 82 5f 85 2a 04 00 85 43 20 20 43 52 45 41 54 | nx.ORDER.BY.1=1;.._.*...C..CREAT |
92400 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
92420 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,.b.int,.c.DEFAULT.0);...INSERT. |
92440 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a | INTO.t1(a,b).VALUES(1,2),(3,4);. |
92460 | 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | ..WITH.nx(a,b).AS.(VALUES(1,8),( |
92480 | 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 | 2,11),(3,1),(2,15),(1,4),(1,99)) |
924a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 | ...INSERT.INTO.main.t1.AS.t2(a,b |
924c0 | 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 4c 49 4d 49 54 2d 74 72 75 65 | ).SELECT.a,.b.FROM.nx.LIMIT-true |
924e0 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
92500 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 | T.b=excluded.b,.c=t2.c+1.WHERE.t |
92520 | 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | 2.b<excluded.b;...SELECT.*,.'x'. |
92540 | 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 07 85 29 04 00 84 13 20 20 43 52 | FROM.t1.ORDER.BY.a;....)......CR |
92560 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
92580 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
925a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
925c0 | 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 | );...WITH.nx(a,b).AS.(VALUES(1,8 |
925e0 | 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 | ),(2,11),(3,1),(2,15),(1,4),(1,9 |
92600 | 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 | 9))...INSERT.INTO.main.t1.AS.t2( |
92620 | 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 4c 49 4d 49 54 20 74 | a,b).SELECT.a,.b.FROM.nx.LIMIT.t |
92640 | 72 75 65 0a 4f 46 46 53 45 54 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 0a 82 | rue.OFFSET.last_insert_rowid().. |
92660 | 5f 85 28 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | _.(...C..CREATE.TABLE.t1(a.INTEG |
92680 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b.int,.c.DEFAULT |
926a0 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
926c0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 | S(1,2),(3,4);...WITH.nx(a,b).AS. |
926e0 | 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 | (VALUES(1,8),(2,11),(3,1),(2,15) |
92700 | 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 | ,(1,4),(1,99))...INSERT.INTO.mai |
92720 | 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d | n.t1.AS.t2(a,b).SELECT.a,.b.FROM |
92740 | 20 6e 78 20 4c 49 4d 49 54 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .nx.LIMIT.true.....ON.CONFLICT(a |
92760 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
92780 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | t2.c+1.WHERE.t2.b<excluded.b;... |
927a0 | 53 45 4c 45 43 54 20 31 3d 31 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 | SELECT.1=1'x'.FROM.t1.ORDER.BY.a |
927c0 | 3b 0a 82 5f 85 27 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;.._.'...C..CREATE.TABLE.t1(a.IN |
927e0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
92800 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
92820 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
92840 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c | AS.(VALUES(1,8),(2,11),(3,1),(2, |
92860 | 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 15),(1,4),(1,99))...INSERT.INTO. |
92880 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
928a0 | 52 4f 4d 20 6e 78 20 4c 49 4d 49 54 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ROM.nx.LIMIT.true.....ON.CONFLIC |
928c0 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
928e0 | 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .c=t2.c+1.WHERE.t2.b<excluded.b; |
92900 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 4c 49 4d 49 54 20 74 31 20 4f 52 44 45 52 20 42 | ...SELECT.*,.'x'LIMIT.t1.ORDER.B |
92920 | 59 20 61 3b 0a 82 45 85 26 04 00 85 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.a;..E.&......CREATE.TABLE.t1(a |
92940 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
92960 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
92980 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
929a0 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c | b).AS.(VALUES(1,8),(2,11),(3,1), |
929c0 | 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | (2,15),(1,4),(1,99))...INSERT.IN |
929e0 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
92a00 | 62 20 46 52 4f 4d 20 6e 78 20 4c 49 4d 49 54 20 22 61 22 49 53 4e 55 4c 4c 2c 22 62 22 20 20 4f | b.FROM.nx.LIMIT."a"ISNULL,"b"..O |
92a20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
92a40 | 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 | cluded.b,.c=t2.c+1.WHERE.t2.b<ex |
92a60 | 63 6c 75 64 65 64 2e 62 3b 0a 20 61 3b 0a 81 6f 85 25 04 00 83 63 20 20 43 52 45 41 54 45 20 54 | cluded.b;..a;..o.%...c..CREATE.T |
92a80 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
92aa0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
92ac0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 | O.t1(a,b).VALUES(1,2),(3,4);...W |
92ae0 | 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | ITH.nx(a,b).AS.(VALUES(1,8),(2,1 |
92b00 | 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 | 1),(3,1),(2,15),(1,4),(1,99))... |
92b20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 | INSERT.INTO.main.t1.AS.t2(a,b).S |
92b40 | 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 47 52 4f 55 50 20 42 59 22 2c 22 61 3b | ELECT.a,.b.FROM.nx.GROUP.BY","a; |
92b60 | 0a 82 3b 85 24 04 00 84 7b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..;.$...{..CREATE.TABLE.t1(a.INT |
92b80 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
92ba0 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
92bc0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 | UES(1,2),(3,4);...WITH.nx(a,b).A |
92be0 | 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 | S.(VALUES(1,8),(2,11),(3,1),(2,1 |
92c00 | 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d | 5),(1,4),(1,99))...INSERT.INTO.m |
92c20 | 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 | ain.t1.AS.t2(a,b).SELECT.DISTINC |
92c40 | 54 27 61 27 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 63 68 61 6e 67 65 73 28 29 4f 4e 20 | T'a'b.FROM.nx.WHERE.changes()ON. |
92c60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 64 65 64 | CONFLICT(a).DO.UPDATE.SET.b=eded |
92c80 | 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 64 65 64 2e 61 3b 0a | .b,.c=t2.c+1.WHERE.t2.b<eded.a;. |
92ca0 | 82 72 85 23 04 00 85 69 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .r.#...i..CREATE.TABLE.t1(a.INTE |
92cc0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
92ce0 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
92d00 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 | ES(1,2),(3,4);...WITH.nx(a,b).AS |
92d20 | 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 | .(VALUES(1,8),(2,11),(3,1),(2,15 |
92d40 | 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 | ),(1,4),(1,99))...INSERT.INTO.ma |
92d60 | 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 32 30 30 31 32 30 30 31 | in.t1.AS.t2(a,b).SELECT.20012001 |
92d80 | 2d 30 31 2d 30 31 2d 30 31 2d 30 31 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 | -01-01-01-01,.b.FROM.nx.WHERE.tr |
92da0 | 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | ue.....ON.CONFLICT(a).DO.UPDATE. |
92dc0 | 53 45 54 20 61 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 | SET.a=excluded.b,.c=t2.c+1.WHERE |
92de0 | 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 | .t2.b<excluded.b;...SELECT.*,.'x |
92e00 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 72 85 22 04 00 85 69 20 20 | '.FROM.t1.ORDER.BY.a;..r."...i.. |
92e20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
92e40 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
92e60 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
92e80 | 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 | ,4);...WITH.nx(a,b).AS.(VALUES(1 |
92ea0 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 | ,8),(2,11),(3,1),(2,15),(1,4),(1 |
92ec0 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 | ,99))...INSERT.INTO.main.t1.AS.t |
92ee0 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 20 22 61 | 2(a,b).SELECT.20012001-01-01-."a |
92f00 | 22 2c 22 62 22 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 | ","b".FROM.nx.WHERE.true.....ON. |
92f20 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
92f40 | 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c | uded.b,.c=t2.c+1.WHERE.t2.b<excl |
92f60 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
92f80 | 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 68 85 21 04 00 85 55 20 20 43 52 45 41 54 45 20 54 41 42 | ORDER.BY.a;..h.!...U..CREATE.TAB |
92fa0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
92fc0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
92fe0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
93000 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
93020 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
93040 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
93060 | 45 43 54 20 32 30 30 31 2d 30 31 2d 30 31 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | ECT.2001-01-01,.b.FROM.nx.WHERE. |
93080 | 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | true.....ON.CONFLICT(a).DO.UPDAT |
930a0 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 | E.SET.b=excluded.b,.c=t2.c+1.WHE |
930c0 | 52 45 20 20 31 3d 31 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 | RE..1=1<excluded.b;...SELECT.*,. |
930e0 | 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 6d 85 20 04 00 85 5f | 'x'.FROM.t1.ORDER.BY.a;..m....._ |
93100 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
93120 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
93140 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
93160 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
93180 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c | (1,8),(2,11),(3,1),(2,15),(1,4), |
931a0 | 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | (1,99))...INSERT.INTO.main.t1.AS |
931c0 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 31 3d 31 20 74 72 75 65 2c 20 62 20 46 52 4f 4d | .t2(a,b).SELECT.1=1.true,.b.FROM |
931e0 | 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 74 72 75 65 20 20 20 20 4f 4e 20 43 4f 4e | .nx.WHERE.true.OR.true....ON.CON |
93200 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 | FLICT(a).DO.UPDATE.SET.b=exclude |
93220 | 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 | d.b,.c=t2.c+1.WHERE.t2.b<exclude |
93240 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | d.b;...SELECT.*,.'x'.FROM.t1.ORD |
93260 | 45 52 20 42 59 20 61 3b 0a 81 7f 85 1f 04 00 84 03 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ER.BY.a;...........CREATE.TABLE. |
93280 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
932a0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
932c0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e | a,b).VALUES(1,2),(3,4);...WITH.n |
932e0 | 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 | x(a,b).AS.(VALUES(1,8),(2,11),(3 |
93300 | 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 | ,1),(2,15),(1,4),(1,99))...INSER |
93320 | 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 | T.INTO.main.t1.AS.t2(a,b).SELECT |
93340 | 20 20 60 61 60 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 | ..`a`.FROM.nx.WHERE..`a`COLLATE. |
93360 | 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 81 7f 85 1e 04 00 84 03 20 20 43 52 45 41 54 45 20 54 41 42 | CONFLICT(a;...........CREATE.TAB |
93380 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
933a0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
933c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
933e0 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
93400 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
93420 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 49 4e 53 54 45 41 44 20 53 45 4c | SERT.INTO.main.t1.AS.INSTEAD.SEL |
93440 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 | ECT.a,.b.FROM.nx.WHERE..`a`COLLA |
93460 | 54 45 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 82 42 85 1d 04 00 85 09 20 20 43 52 45 41 54 45 20 | TE.CONFLICT(a;..B........CREATE. |
93480 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
934a0 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
934c0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
934e0 | 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c | WITH.nx(a,b).AS.(VALUES(1,8),(2, |
93500 | 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 | 11),(3,1),(2,15),(1,4),(1,99)).. |
93520 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 45 58 43 4c 55 53 49 28 | .INSERT.INTO.main.t1.AS.EXCLUSI( |
93540 | 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 | a,b).SELECT.a,.b.FROM.nx.WHERE.t |
93560 | 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | rue.....ON.CONFLICT(a).DO.UPDATE |
93580 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 45 58 43 45 50 54 74 32 2e 63 2b | .SET.b=excluded.b,.c=EXCEPTt2.c+ |
935a0 | 31 20 57 48 45 52 45 20 74 32 2e 62 3c 75 64 65 64 2e 62 3b 0a 82 3c 85 1c 04 00 84 7d 20 20 43 | 1.WHERE.t2.b<uded.b;..<.....}..C |
935c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
935e0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
93600 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
93620 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | 4);...WITH.nx(a,b).AS.(VALUES(1, |
93640 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c | 8),(2,11),(3,1),(2,15),(1,4),(1, |
93660 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 45 58 | 99))...INSERT.INTO.main.t1.AS.EX |
93680 | 43 4c 55 44 49 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 | CLUDI(a,b).SELECT.a,.b.FROM.nx.W |
936a0 | 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | HERE.true.....ON.CONFLICT(a).DO. |
936c0 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b | UPDATE.SET.b=excluded.b,.c=t2.c+ |
936e0 | 31 20 57 48 45 52 45 20 74 32 2e 62 3c 75 64 65 64 2e 62 3b 0a 82 61 85 1b 04 00 85 47 20 20 43 | 1.WHERE.t2.b<uded.b;..a.....G..C |
93700 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
93720 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
93740 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
93760 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | 4);...WITH.nx(a,b).AS.(VALUES(1, |
93780 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c | 8),(2,11),(3,1),(2,15),(1,4),(1, |
937a0 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 49 4e 69 6e 2e 74 31 20 41 53 20 | 99))...INSERT.INTO.maINin.t1.AS. |
937c0 | 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | t2(a,b).SELECT.a,.b.FROM.nx.WHER |
937e0 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
93800 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t2.c+1.W |
93820 | 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | HERE.t2.b<excluded.b;...SELECT.* |
93840 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 48 85 1a 04 00 | ,.'x'.FROM.t1.ORDER.BY.a;..H.... |
93860 | 85 15 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t1(a.INTEGER.PR |
93880 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
938a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
938c0 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
938e0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c | ES(1,8),(2,11),(.json_replace(1, |
93900 | 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 | 1,1),99))...INSERT.INTO.t1.AS.t2 |
93920 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
93940 | 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 4f 52 20 74 72 75 65 20 4f 52 20 74 72 75 65 20 20 4f | true.AND.true.OR.true.OR.true..O |
93960 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
93980 | 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 | cluded.b,.c=t1.c+1.WHERE.t1.b<ex |
939a0 | 65 64 2e 62 3b 0a 82 41 85 19 04 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ed.b;..A........CREATE.TABLE.t1( |
939c0 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b.int,.c. |
939e0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | DEFAULT.0);...INSERT.INTO.t1(a,b |
93a00 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 | ).VALUES(1,2),(3,4);...WITH.nx(a |
93a20 | 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f | ,b).AS.(VALUES(1,8),(2,11),(.jso |
93a40 | 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 | n_replace(1,1,1),99))...INSERT.I |
93a60 | 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 | NTO.t1.AS.t2(a,b).SELECT.a,.b.FR |
93a80 | 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 4f 52 20 74 72 75 | OM.nx.WHERE.true.AND.true.OR.tru |
93aa0 | 65 00 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(a).DO.UPDATE.SET |
93ac0 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 | .b=excluded.b,.c=t1.c+1.WHERE.t1 |
93ae0 | 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 41 85 18 04 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c | .b<exed.b;..A........CREATE.TABL |
93b00 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
93b20 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
93b40 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
93b60 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
93b80 | 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 | (.json_replace(1,1,1),99))...INS |
93ba0 | 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c | ERT.INTO.t1.AS.t2(a,b).SELECT.a, |
93bc0 | 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 49 | .b.FROM.nx.WHERE.true.AND.true.I |
93be0 | 53 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | S.true...ON.CONFLICT(a).DO.UPDAT |
93c00 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 | E.SET.b=excluded.b,.c=t1.c+1.WHE |
93c20 | 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 42 85 17 04 00 85 09 20 20 43 52 45 41 54 45 | RE.t1.b<exed.b;..B........CREATE |
93c40 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
93c60 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
93c80 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
93ca0 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | .WITH.nx(a,b).AS.(VALUES(1,8),(2 |
93cc0 | 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 39 39 29 29 0a | ,11),(.json_replace(1,1,1),99)). |
93ce0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ..INSERT.INTO.t1.AS.t2(a,b).SELE |
93d00 | 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 | CT.a,.b.FROM.nx.WHERE.true.AND.t |
93d20 | 72 75 65 20 41 4e 44 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | rue.AND.true...ON.CONFLICT(a).DO |
93d40 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 | .UPDATE.SET.b=excluded.b,.c=t1.c |
93d60 | 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 41 85 16 04 00 85 07 20 20 | +1.WHERE.t1.b<exed.b;..A........ |
93d80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
93da0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
93dc0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
93de0 | 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 | ,4);...WITH.nx(a,b).AS.(VALUES(1 |
93e00 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 | ,8),(2,11),(.json_replace(1,1,1) |
93e20 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 32 28 61 2c 62 | ,99))...INSERT.INTO.t1.AS.t2(a,b |
93e40 | 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 | ).SELECT.a,.b.FROM.nx.WHERE.true |
93e60 | 0a 41 4e 44 20 20 31 3d 31 20 4f 52 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | .AND..1=1.OR.true...ON.CONFLICT( |
93e80 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 | a).DO.UPDATE.SET.b=excluded.b,.c |
93ea0 | 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a 82 41 85 15 04 | =t1.c+1.WHERE.t1.b<exed.b;..A... |
93ec0 | 00 85 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
93ee0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
93f00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
93f20 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
93f40 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 | UES(1,8),(2,11),(.json_replace(1 |
93f60 | 2c 31 2c 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 74 | ,1,1),99))...INSERT.INTO.t1.AS.t |
93f80 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 | 2(a,b).SELECT.a,.b.FROM.nx.WHERE |
93fa0 | 20 74 72 75 65 0a 20 3e 3d 20 74 72 75 65 20 4f 52 20 74 72 75 65 20 20 20 4f 4e 20 43 4f 4e 46 | .true..>=.true.OR.true...ON.CONF |
93fc0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
93fe0 | 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 65 64 2e 62 3b 0a | .b,.c=t1.c+1.WHERE.t1.b<exed.b;. |
94000 | 0d 00 00 00 1a 00 a8 00 1e fd 1d f0 1c e1 1b d5 1a c8 19 bb 18 b8 17 b5 16 b2 15 af 14 9b 13 35 | ...............................5 |
94020 | 11 ce 10 6b 0f 08 0d a5 0c 42 0a d6 09 73 08 10 07 0d 06 02 04 99 03 36 02 0b 00 a8 00 00 00 00 | ...k.....B...s.........6........ |
94040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
94060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
94080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
940a0 | 00 00 00 00 00 00 00 00 82 5f 85 47 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ........._.G...C..CREATE.TABLE.t |
940c0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
940e0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
94100 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
94120 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
94140 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
94160 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
94180 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 | a,.b.FROM.nx.WHERE.true.....ON.C |
941a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
941c0 | 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 25 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 | ded.b,.c=t2.c%CURRENT_DATE<exclu |
941e0 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | ded.b;...SELECT.*,.'x'.FROM.t1.O |
94200 | 52 44 45 52 20 42 59 20 61 3b 0a 82 27 85 46 04 00 84 53 20 20 43 52 45 41 54 45 20 54 41 42 4c | RDER.BY.a;..'.F...S..CREATE.TABL |
94220 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
94240 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
94260 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
94280 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
942a0 | 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,1),(2,15),(1,4),(1,99))...INS |
942c0 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
942e0 | 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f | CT.a,.b.FROM.nx.WHERE.true.....O |
94300 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
94320 | 63 6c 75 64 65 64 2e 62 25 20 63 3d 74 32 2e 63 3b 31 20 61 3b 0a 82 5f 85 45 04 00 85 43 20 20 | cluded.b%.c=t2.c;1.a;.._.E...C.. |
94340 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
94360 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
94380 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
943a0 | 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 | ,4);...WITH.nx(a,b).AS.(VALUES(1 |
943c0 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 | ,8),(2,11),(3,1),(2,15),(1,4),(1 |
943e0 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 | ,99))...INSERT.INTO.main.t1.AS.t |
94400 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 | 2(a,b).SELECT.a,.b.FROM.nx.WHERE |
94420 | 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | .true.....ON.CONFLICT(a).DO.UPDA |
94440 | 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 25 20 63 3d 74 32 2e 63 2b 31 20 57 48 | TE.SET.b=excluded.b%.c=t2.c+1.WH |
94460 | 45 52 45 20 74 32 2e 62 7c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c | ERE.t2.b|excluded.b;...SELECT.*, |
94480 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 65 85 44 04 00 85 | .'x'.FROM.t1.ORDER.BY.a;..e.D... |
944a0 | 4f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | O..CREATE.TABLE.t1(a.INTEGER.PRI |
944c0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
944e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
94500 | 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 | ,(3,4);...WITH.nx(a,b).AS.(VALUE |
94520 | 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 | S(1,8),(2,11),(3,1),(2,15),(1,4) |
94540 | 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 | ,(1,99))...INSERT.INTO.main.t1.A |
94560 | 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 | S.t2(a,b).SELECT.a,.b.FROM.nx.WH |
94580 | 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | ERE.true.....ON.CONFLICT(a).DO.U |
945a0 | 50 44 41 54 45 20 53 45 54 20 62 3d 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 | PDATE.SET.b=.last_insert_rowid() |
945c0 | 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t2.b<excluded.b;...SELECT |
945e0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 56 41 43 55 55 | .*,.'x'.FROM.t1.ORDER.BY.a;VACUU |
94600 | 4d 0a 82 07 85 43 04 00 84 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | M....C......CREATE.TABLE.t1(a.IN |
94620 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
94640 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
94660 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
94680 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c | AS.(VALUES(1,8),(2,11),(3,1),(2, |
946a0 | 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 15),(1,4),(1,99))...INSERT.INTO. |
946c0 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
946e0 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 20 28 31 29 52 45 47 45 58 50 20 43 4f 4e 46 4c 49 43 | ROM.nx.WHERE.t.(1)REGEXP.CONFLIC |
94700 | 54 28 61 29 20 44 4f 20 55 50 61 3b 0a 81 7f 85 42 04 00 84 03 20 20 43 52 45 41 54 45 20 54 41 | T(a).DO.UPa;....B......CREATE.TA |
94720 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
94740 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
94760 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 | .t1(a,b).VALUES(1,2),(3,4);...WI |
94780 | 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | TH.nx(a,b).AS.(VALUES(1,8),(2,11 |
947a0 | 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 | ),(3,1),(2,15),(1,4),(1,99))...I |
947c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
947e0 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 73 74 72 66 74 69 6d 65 | LECT.a,.b.FROM.nx.WHERE.strftime |
94800 | 28 31 2c 31 2c 31 2c 31 29 2d 30 31 2d 30 31 0a 82 5f 85 41 04 00 85 43 20 20 43 52 45 41 54 45 | (1,1,1,1)-01-01.._.A...C..CREATE |
94820 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
94840 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
94860 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
94880 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | .WITH.nx(a,b).AS.(VALUES(1,8),(2 |
948a0 | 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a | ,11),(3,1),(2,15),(1,4),(1,99)). |
948c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 | ..INSERT.INTO.main.t1.AS.t2(a,b) |
948e0 | 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 73 71 6c 69 74 | .SELECT.a,.b.FROM.nx.WHERE.sqlit |
94900 | 65 5f 76 65 72 73 69 6f 6e 28 29 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e_version()LICT(a).DO.UPDATE.SET |
94920 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 | .b=excluded.b,.c=t2.c+1.WHERE.t2 |
94940 | 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | .b<excluded.b;...SELECT.*,.'x'.F |
94960 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 40 04 00 85 43 20 20 43 52 45 | ROM.t1.ORDER.BY.a;.._.@...C..CRE |
94980 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
949a0 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | EY,.b.int,.c.DEFAULT.0);...INSER |
949c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
949e0 | 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 | ;...WITH.nx(a,b).AS.(VALUES(1,8) |
94a00 | 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 | ,(2,11),(3,1),(2,15),(1,4),(1,99 |
94a20 | 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 | ))...INSERT.INTO.main.t1.AS.t2(a |
94a40 | 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 73 71 | ,b).SELECT.a,.b.FROM.nx.WHERE.sq |
94a60 | 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 55 50 44 41 54 45 20 | lite_compileoption_get(1)UPDATE. |
94a80 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 | SET.b=excluded.b,.c=t2.c+1.WHERE |
94aa0 | 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 | .t2.b<excluded.b;...SELECT.*,.'x |
94ac0 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 68 85 3f 04 00 85 55 20 20 | '.FROM.t1.ORDER.BY.a;..h.?...U.. |
94ae0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
94b00 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
94b20 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
94b40 | 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 | ,4);...WITH.nx(a,b).AS.(VALUES(1 |
94b60 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 | ,8),(2,11),(3,1),(2,15),(1,4),(1 |
94b80 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 | ,99))...INSERT.INTO.main.t1.AS.t |
94ba0 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 | 2(a,b).SELECT.a,.b.FROM.nx.WHERE |
94bc0 | 20 72 61 6e 64 6f 6d 28 29 2b 20 72 61 6e 64 6f 6d 28 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .random()+.random()ON.CONFLICT(a |
94be0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
94c00 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | t2.c+1.WHERE.t2.b<excluded.b;... |
94c20 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 | SELECT.*,.'x'.FROM.t1.ORDER.BY.a |
94c40 | 3b 0a 82 5f 85 3e 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;.._.>...C..CREATE.TABLE.t1(a.IN |
94c60 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
94c80 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
94ca0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
94cc0 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c | AS.(VALUES(1,8),(2,11),(3,1),(2, |
94ce0 | 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 15),(1,4),(1,99))...INSERT.INTO. |
94d00 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 | main.t1.AS.t2(a,b).SELECT.a,.b.F |
94d20 | 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ROM.nx.WHERE.likely(1)ON.CONFLIC |
94d40 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
94d60 | 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .c=t2.c+1.WHERE.t2.b<excluded.b; |
94d80 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | ...SELECT.*,.'x'.FROM.t1.ORDER.B |
94da0 | 59 20 61 3b 0a 82 5f 85 3d 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.a;.._.=...C..CREATE.TABLE.t1(a |
94dc0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
94de0 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
94e00 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
94e20 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c | b).AS.(VALUES(1,8),(2,11),(3,1), |
94e40 | 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | (2,15),(1,4),(1,99))...INSERT.IN |
94e60 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
94e80 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 | b.FROM.nx.WHERE.json_replace(1,1 |
94ea0 | 2c 31 29 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | ,1)T(a).DO.UPDATE.SET.b=excluded |
94ec0 | 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 | .b,.c=t2.c+1.WHERE.t2.b<excluded |
94ee0 | 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | .b;...SELECT.*,.'x'.FROM.t1.ORDE |
94f00 | 52 20 42 59 20 61 3b 0a 82 5f 85 3c 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | R.BY.a;.._.<...C..CREATE.TABLE.t |
94f20 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
94f40 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
94f60 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
94f80 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
94fa0 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
94fc0 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
94fe0 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 6a 73 6f 6e 28 31 29 20 20 4f 4e 20 43 | a,.b.FROM.nx.WHERE.json(1)..ON.C |
95000 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
95020 | 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 | ded.b,.c=t2.c+1.WHERE.t2.b<exclu |
95040 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | ded.b;...SELECT.*,.'x'.FROM.t1.O |
95060 | 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 3b 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c | RDER.BY.a;.._.;...C..CREATE.TABL |
95080 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
950a0 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
950c0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
950e0 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
95100 | 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,1),(2,15),(1,4),(1,99))...INS |
95120 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
95140 | 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 63 68 61 6e 67 65 73 28 29 4f | CT.a,.b.FROM.nx.WHERE.changes()O |
95160 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
95180 | 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 | cluded.b,.c=t2.c+1.WHERE.t2.b<ex |
951a0 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | cluded.b;...SELECT.*,.'x'.FROM.t |
951c0 | 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 63 85 3a 04 00 85 4b 20 20 43 52 45 41 54 45 20 54 | 1.ORDER.BY.a;..c.:...K..CREATE.T |
951e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
95200 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
95220 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 | O.t1(a,b).VALUES(1,2),(3,4);...W |
95240 | 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | ITH.nx(a,b).AS.(VALUES(1,8),(2,1 |
95260 | 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 | 1),(3,1),(2,15),(1,4),(1,99))... |
95280 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 | INSERT.INTO.main.t1.AS.t2(a,b).S |
952a0 | 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 60 61 60 2b 74 72 75 | ELECT.a,.b.FROM.nx.WHERE.`a`+tru |
952c0 | 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | e.....ON.CONFLICT(a).DO.UPDATE.S |
952e0 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 | ET.b=excluded.b,.c=t2.c+1.WHERE. |
95300 | 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | t2.b<excluded.b;...SELECT.*,.'x' |
95320 | 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 62 85 39 04 00 85 49 20 20 43 | .FROM.t1.ORDER.BY.a;..b.9...I..C |
95340 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
95360 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
95380 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
953a0 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | 4);...WITH.nx(a,b).AS.(VALUES(1, |
953c0 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c | 8),(2,11),(3,1),(2,15),(1,4),(1, |
953e0 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 | 99))...INSERT.INTO.main.t1.AS.t2 |
95400 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
95420 | 4e 4f 54 20 60 61 60 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | NOT.`a`.....ON.CONFLICT(a).DO.UP |
95440 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 | DATE.SET.b=excluded.b,.c=t2.c+1. |
95460 | 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t2.b<excluded.b;...SELECT. |
95480 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 10 85 38 04 | *,.'x'.FROM.t1.ORDER.BY.a;....8. |
954a0 | 00 84 25 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..%..CREATE.TABLE.t1(a.INTEGER.P |
954c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
954e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
95500 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
95520 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c | UES(1,8),(2,11),(3,1),(2,15),(1, |
95540 | 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | 4),(1,99))...INSERT.INTO.main.t1 |
95560 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | .AS.t2(a,b).SELECT.a,.b.FROM.nx. |
95580 | 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 | WHERE..`a`COLLATE.CURRENT_TIMEST |
955a0 | 41 4d 50 43 32 30 30 31 2d 30 31 2d 30 31 0a 81 7f 85 37 04 00 84 03 20 20 43 52 45 41 54 45 20 | AMPC2001-01-01....7......CREATE. |
955c0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
955e0 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
95600 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
95620 | 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c | WITH.nx(a,b).AS.(VALUES(1,8),(2, |
95640 | 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 | 11),(3,1),(2,15),(1,4),(1,99)).. |
95660 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 | .INSERT.INTO.main.t1.AS.t2(a,b). |
95680 | 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 4f | SELECT.a,.b.FROM.nx.WHERE..`a`CO |
956a0 | 4c 4c 41 54 45 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 81 7f 85 36 04 00 84 03 20 20 43 52 45 41 | LLATE.CONFLICT(a;....6......CREA |
956c0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
956e0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
95700 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
95720 | 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c | ...WITH.nx(a,b).AS.(VALUES(1,8), |
95740 | 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 | (2,11),(3,1),(2,15),(1,4),(1,99) |
95760 | 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c | )...INSERT.INTO.main.t1.AS.t2(a, |
95780 | 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 | b).SELECT.a,.b.FROM.nx.WHERE..`a |
957a0 | 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 3f 31 2d 30 31 0a 81 7f 85 35 04 00 84 03 20 20 43 | `COLLATE.C2001-?1-01....5......C |
957c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
957e0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
95800 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
95820 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | 4);...WITH.nx(a,b).AS.(VALUES(1, |
95840 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c | 8),(2,11),(3,1),(2,15),(1,4),(1, |
95860 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 | 99))...INSERT.INTO.main.t1.AS.t2 |
95880 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
958a0 | 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 30 45 2d 30 31 0a 81 7f 85 34 04 00 84 03 | .`a`COLLATE.C2001-0E-01....4.... |
958c0 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
958e0 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
95900 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
95920 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
95940 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c | (1,8),(2,11),(3,1),(2,15),(1,4), |
95960 | 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | (1,99))...INSERT.INTO.main.t1.AS |
95980 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 | .t2(a,b).SELECT.a,.b.FROM.nx.WHE |
959a0 | 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 30 31 45 30 31 0a 82 09 85 33 04 | RE..`a`COLLATE.C2001-01E01....3. |
959c0 | 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t1(a.INTEGER.P |
959e0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
95a00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
95a20 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
95a40 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c | UES(1,8),(2,11),(3,1),(2,15),(1, |
95a60 | 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | 4),(1,99))...INSERT.INTO.main.t1 |
95a80 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | .AS.t2(a,b).SELECT.a,.b.FROM.nx. |
95aa0 | 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 30 31 2d 30 31 32 30 30 | WHERE..`a`COLLATE.C2001-01-01200 |
95ac0 | 31 2d 30 31 2d 30 31 0a 82 09 85 32 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | 1-01-01....2......CREATE.TABLE.t |
95ae0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
95b00 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
95b20 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
95b40 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
95b60 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
95b80 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
95ba0 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 | a,.b.FROM.nx.WHERE..`a`COLLATE.C |
95bc0 | 32 30 30 31 2d 30 31 20 67 6c 6f 62 28 31 2c 31 29 2d 30 31 0a 82 08 85 31 04 00 84 15 20 20 43 | 2001-01.glob(1,1)-01....1......C |
95be0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.INTEGER.PRIMARY |
95c00 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
95c20 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
95c40 | 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | 4);...WITH.nx(a,b).AS.(VALUES(1, |
95c60 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c | 8),(2,11),(3,1),(2,15),(1,4),(1, |
95c80 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 | 99))...INSERT.INTO.main.t1.AS.t2 |
95ca0 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
95cc0 | 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 20 6d 61 78 28 31 2c 31 29 30 31 2d 30 31 | .`a`COLLATE.C2001-.max(1,1)01-01 |
95ce0 | 0a 82 0b 85 30 04 00 84 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ....0......CREATE.TABLE.t1(a.INT |
95d00 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
95d20 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
95d40 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 | UES(1,2),(3,4);...WITH.nx(a,b).A |
95d60 | 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 | S.(VALUES(1,8),(2,11),(3,1),(2,1 |
95d80 | 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d | 5),(1,4),(1,99))...INSERT.INTO.m |
95da0 | 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 | ain.t1.AS.t2(a,b).SELECT.a,.b.FR |
95dc0 | 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 20 61 | OM.nx.WHERE..`a`COLLATE.C2001-.a |
95de0 | 66 66 69 6e 69 74 79 28 31 29 30 31 2d 30 31 0a 82 09 85 2f 04 00 84 17 20 20 43 52 45 41 54 45 | ffinity(1)01-01..../......CREATE |
95e00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
95e20 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
95e40 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(1,2),(3,4);.. |
95e60 | 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | .WITH.nx(a,b).AS.(VALUES(1,8),(2 |
95e80 | 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a | ,11),(3,1),(2,15),(1,4),(1,99)). |
95ea0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 | ..INSERT.INTO.main.t1.AS.t2(a,b) |
95ec0 | 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 20 60 61 60 43 | .SELECT.a,.b.FROM.nx.WHERE..`a`C |
95ee0 | 4f 4c 4c 41 54 45 20 43 32 30 30 31 20 67 6c 6f 62 28 31 2c 31 29 2d 30 31 2d 30 31 0a 81 7f 85 | OLLATE.C2001.glob(1,1)-01-01.... |
95f00 | 2e 04 00 84 03 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | .......CREATE.TABLE.t1(a.INTEGER |
95f20 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
95f40 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
95f60 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 | 1,2),(3,4);...WITH.nx(a,b).AS.(V |
95f80 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 | ALUES(1,8),(2,11),(3,1),(2,15),( |
95fa0 | 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e | 1,4),(1,99))...INSERT.INTO.main. |
95fc0 | 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e | t1.AS.t2(a,b).SELECT.a,.b.FROM.n |
95fe0 | 78 20 57 48 45 52 45 20 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 2f 2d 30 31 2d 30 31 0a | x.WHERE..`a`COLLATE.C200/-01-01. |
96000 | 0d 00 00 00 16 01 a0 00 1e 9d 1d 3a 1b d7 1a 68 19 05 17 9b 16 2b 15 20 13 bd 12 5a 10 ef 0f 8c | ...........:...h.....+.....Z.... |
96020 | 0e 29 0c fa 0b 8c 0a 1e 08 a8 07 45 05 ca 04 81 03 0c 01 a0 00 00 00 00 00 00 00 00 00 00 00 00 | .).........E.................... |
96040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
960a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
960c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
960e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
96180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
961a0 | 82 68 85 5d 04 00 85 55 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .h.]...U..CREATE.TABLE.t1(a.INTE |
961c0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
961e0 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
96200 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 | ES(1,2),(3,4);...WITH.nx(a,b).AS |
96220 | 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 | .(VALUES(1,8),(2,11),(3,1),(2,15 |
96240 | 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 | ),(1,4),(1,99))...INSERT.INTO.ma |
96260 | 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 | in.t1.AS.t2(a,b).SELECT.random() |
96280 | 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 | .a,.b.FROM.nx.WHERE.true.....ON. |
962a0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
962c0 | 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c | uded.b,.c=t2.c+1.WHERE.t2.b<excl |
962e0 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 2f 2a 20 2a 2f 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*./*.*/FROM.t1. |
96300 | 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 71 85 5c 04 00 85 67 20 20 43 52 45 41 54 45 20 54 41 42 | GROUP.BY.a;..q.\...g..CREATE.TAB |
96320 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
96340 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
96360 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
96380 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
963a0 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
963c0 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
963e0 | 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 3f 2c 31 29 20 61 2c 20 62 20 46 52 4f 4d 20 | ECT.group_concat(?,1).a,.b.FROM. |
96400 | 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | nx.WHERE.true.....ON.CONFLICT(a) |
96420 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 | .DO.UPDATE.SET.b=excluded.b,.c=t |
96440 | 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 | 2.c+1.WHERE.t2.b<excluded.b;...S |
96460 | 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b | ELECT.*,.'x'.FROM.t1.ORDER.BY.a; |
96480 | 0a 82 45 85 5b 04 00 85 0f 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..E.[......CREATE.TABLE.t1(a.INT |
964a0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
964c0 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
964e0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 | UES(1,2),(3,4);...WITH.nx(a,b).A |
96500 | 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 | S.(VALUES(1,8),(2,11),(3,1),(2,1 |
96520 | 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d | 5),(1,4),(1,99))...INSERT.INTO.m |
96540 | 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 | ain.t1.AS.t2(a,b).SELECT.group_c |
96560 | 6f 6e 63 61 74 28 31 2c 31 29 20 61 d3 df 62 20 46 52 4f 4d 20 6e 78 20 4c 49 4d 49 54 20 74 72 | oncat(1,1).a..b.FROM.nx.LIMIT.tr |
96580 | 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | ue.....ON.CONFLICT(a).DO.UPDATE. |
965a0 | 53 45 54 20 62 3d 65 78 63 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e | SET.b=excd.b,.c=t2.c+1.WHERE.t2. |
965c0 | 62 3c 65 78 63 64 2e 62 3b 0a 82 77 85 5a 04 00 85 73 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | b<excd.b;..w.Z...s..CREATE.TABLE |
965e0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
96600 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
96620 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 | (a,b).VALUES(1,2),(3,4);...WITH. |
96640 | 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 | nx(a,b).AS.(VALUES(1,8),(2,11),( |
96660 | 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 | 3,1),(2,15),(1,4),(1,99))...INSE |
96680 | 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 | RT.INTO.main.t1.AS.t2(a,b).SELEC |
966a0 | 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 | T.group_concat(1,1).a,.b.FROM.nx |
966c0 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | .WHERE.true.....ON.CONFLICT(a).D |
966e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e | O.UPDATE.SET.b=excluded.b,.c=t2. |
96700 | 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c | c+1.WHERE.t2.b<excluded.b;...SEL |
96720 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 56 41 | ECT.*,.'x'.FROM.t1.ORDER.BY.a;VA |
96740 | 43 55 55 4d 0a 82 5f 85 59 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | CUUM.._.Y...C..CREATE.TABLE.t1(a |
96760 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
96780 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
967a0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
967c0 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c | b).AS.(VALUES(1,8),(2,11),(3,1), |
967e0 | 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | (2,15),(1,4),(1,99))...INSERT.IN |
96800 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 24 | TO.main.t1.AS.t2(a,b).SELECT.a,$ |
96820 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 40 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | b.FROM.nx.WHERE@true.....ON.CONF |
96840 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
96860 | 2e 62 2c 20 63 3d 74 32 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 | .b,.c=t2.c+CURRENT_DATE<excluded |
96880 | 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | .b;...SELECT.*,.'x'.FROM.t1.ORDE |
968a0 | 52 20 42 59 20 61 3b 0a 82 72 85 58 04 00 85 69 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | R.BY.a;..r.X...i..CREATE.TABLE.t |
968c0 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
968e0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
96900 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
96920 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
96940 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
96960 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
96980 | 61 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 62 20 46 52 4f 4d 20 6e 78 20 | a,.sqlite_source_id().b.FROM.nx. |
969a0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | WHERE.true.....ON.CONFLICT(a).DO |
969c0 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 | .UPDATE.SET.b=excluded.b,.c=t2.c |
969e0 | 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 | +CURRENT_DATE<excluded.b;...SELE |
96a00 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 6a | CT.*,.'x'.FROM.t1.ORDER.BY.a;..j |
96a20 | 85 57 04 00 85 59 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .W...Y..CREATE.TABLE.t1(a.INTEGE |
96a40 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
96a60 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
96a80 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 | (1,2),(3,4);...WITH.nx(a,b).AS.( |
96aa0 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c | VALUES(1,8),(2,11),(3,1),(2,15), |
96ac0 | 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | (1,4),(1,99))...INSERT.INTO.main |
96ae0 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 72 6f 75 6e 64 28 31 | .t1.AS.t2(a,b).SELECT.a,.round(1 |
96b00 | 2c 31 29 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 | ,1).b.FROM.nx.WHERE.true.....ON. |
96b20 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
96b40 | 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 7c 65 78 63 6c | uded.b,.c=t2.c+1.WHERE.t2.b|excl |
96b60 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
96b80 | 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 6a 85 56 04 00 85 59 20 20 43 52 45 41 54 45 20 54 41 42 | ORDER.BY.a;..j.V...Y..CREATE.TAB |
96ba0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
96bc0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
96be0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
96c00 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
96c20 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
96c40 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
96c60 | 45 43 54 20 61 2c 20 72 6f 75 6e 64 28 31 2c 31 29 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | ECT.a,.round(1,1).b.FROM.nx.WHER |
96c80 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
96ca0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 25 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b%.c=t2.c+1.W |
96cc0 | 48 45 52 45 20 74 32 2e 62 7c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | HERE.t2.b|excluded.b;...SELECT.* |
96ce0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 2b 85 55 04 00 | ,.'x'.FROM.t1.ORDER.BY.a;..+.U.. |
96d00 | 84 5b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .[..CREATE.TABLE.t1(a.INTEGER.PR |
96d20 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
96d40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
96d60 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
96d80 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
96da0 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
96dc0 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 6a 73 6f 6e 5f 6a 65 63 74 28 31 | AS.t2(a,b).SELECT.a,.json_ject(1 |
96de0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
96e00 | 45 54 20 62 3d 65 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 | ET.b=eded.b,.c=t2.c+1.WHERE.t2.b |
96e20 | 3c 65 64 65 64 2e 61 3b 0a 82 5f 85 54 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | <eded.a;.._.T...C..CREATE.TABLE. |
96e40 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
96e60 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
96e80 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e | a,b).VALUES(1,2),(3,4);...WITH.n |
96ea0 | 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 | x(a,b).AS.(VALUES(1,8),(2,11),(3 |
96ec0 | 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 | ,1),(2,15),(1,4),(1,99))...INSER |
96ee0 | 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 | T.INTO.main.t1.AS.t2(a,b).SELECT |
96f00 | 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 2d 74 72 75 65 0a 20 20 20 20 4f 4e 20 | .a,.b.FROM.nx.WHERE-true.....ON. |
96f20 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
96f40 | 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c | uded.b,.c=t2.c+1.WHERE.t2.b<excl |
96f60 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
96f80 | 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 53 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 | ORDER.BY.a;.._.S...C..CREATE.TAB |
96fa0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
96fc0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
96fe0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
97000 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
97020 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
97040 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
97060 | 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 2d 20 60 61 60 0a 20 20 20 20 | ECT.a,.b.FROM.nx.WHERE-.`a`..... |
97080 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
970a0 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 | xcluded.b,.c=t2.c+1.WHERE.t2.b<e |
970c0 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | xcluded.b;...SELECT.*,.'x'.FROM. |
970e0 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 67 85 52 04 00 85 53 20 20 43 52 45 41 54 45 20 | t1.ORDER.BY.a;..g.R...S..CREATE. |
97100 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
97120 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
97140 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
97160 | 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c | WITH.nx(a,b).AS.(VALUES(1,8),(2, |
97180 | 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 | 11),(3,1),(2,15),(1,4),(1,99)).. |
971a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 | .INSERT.INTO.main.t1.AS.t2(a,b). |
971c0 | 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 2b 74 72 75 65 0a 41 | SELECT.a,.b.FROM.nx.WHERE+true.A |
971e0 | 4e 44 20 74 72 75 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ND.true....ON.CONFLICT(a).DO.UPD |
97200 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t2.c+1.W |
97220 | 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | HERE.t2.b<excluded.b;...SELECT.* |
97240 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 51 04 00 | ,.'x'.FROM.t1.ORDER.BY.a;.._.Q.. |
97260 | 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .C..CREATE.TABLE.t1(a.INTEGER.PR |
97280 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
972a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
972c0 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
972e0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
97300 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
97320 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 | AS.t2(a,b).SELECT.a,.b.FROM.nx.W |
97340 | 48 45 52 45 2b 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | HERE+true.....ON.CONFLICT(a).DO. |
97360 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b | UPDATE.SET.b=excluded.b,.c=t2.c+ |
97380 | 31 20 57 48 45 52 45 2b 32 20 64 61 79 73 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 | 1.WHERE+2.daysxcluded.b;...SELEC |
973a0 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 | T.*,.'x'.FROM.t1.ORDER.BY.a;.._. |
973c0 | 50 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | P...C..CREATE.TABLE.t1(a.INTEGER |
973e0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
97400 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
97420 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 | 1,2),(3,4);...WITH.nx(a,b).AS.(V |
97440 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 | ALUES(1,8),(2,11),(3,1),(2,15),( |
97460 | 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e | 1,4),(1,99))...INSERT.INTO.main. |
97480 | 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e | t1.AS.t2(a,b).SELECT.a,.b.FROM.n |
974a0 | 78 20 57 48 45 52 45 2b 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | x.WHERE+true.....ON.CONFLICT(a). |
974c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 25 20 63 3d 74 32 | DO.UPDATE.SET.b=excluded.b%.c=t2 |
974e0 | 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | .c+1.WHERE.t2.b<excluded.b;...SE |
97500 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
97520 | 82 07 85 4f 04 00 84 13 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | ...O......CREATE.TABLE.t1(a.INTE |
97540 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
97560 | 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | T.0);...INSERT.INTO.t1(a,b).VALU |
97580 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 | ES(1,2),(3,4);...WITH.nx(a,b).AS |
975a0 | 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 | .(VALUES(1,8),(2,11),(3,1),(2,15 |
975c0 | 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 | ),(1,4),(1,99))...INSERT.INTO.ma |
975e0 | 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f | in.t1.AS.t2(a,b).SELECT.a,.b.FRO |
97600 | 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 52 45 47 45 58 50 20 43 4f 4e 46 4c 49 43 54 28 | M.nx.WHERE.true.REGEXP.CONFLICT( |
97620 | 61 29 20 44 4f 20 55 50 61 3b 0a 82 6c 85 4e 04 00 85 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c | a).DO.UPa;..l.N...]..CREATE.TABL |
97640 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
97660 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
97680 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
976a0 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
976c0 | 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,1),(2,15),(1,4),(1,99))...INS |
976e0 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
97700 | 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 74 72 | CT.a,.b.FROM.nx.WHERE.true.OR.tr |
97720 | 75 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ue....ON.CONFLICT(a).DO.UPDATE.S |
97740 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 | ET.b=excluded.b,.c=t2.c+1.WHERE. |
97760 | 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | t2.b<excluded.b;...SELECT.*,.'x' |
97780 | 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 56 41 43 55 55 4d 0a 82 66 85 4d 04 | .FROM.t1.ORDER.BY.a;VACUUM..f.M. |
977a0 | 00 85 51 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..Q..CREATE.TABLE.t1(a.INTEGER.P |
977c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
977e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
97800 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
97820 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c | UES(1,8),(2,11),(3,1),(2,15),(1, |
97840 | 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | 4),(1,99))...INSERT.INTO.main.t1 |
97860 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | .AS.t2(a,b).SELECT.a,.b.FROM.nx. |
97880 | 57 48 45 52 45 20 74 72 75 65 0a 4e 4f 54 4e 55 4c 4c 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | WHERE.true.NOTNULL....ON.CONFLIC |
978a0 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c | T(a).DO.UPDATE.SET.b=excluded.b, |
978c0 | 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .c=t2.c+1.WHERE.t2.b<excluded.b; |
978e0 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | ...SELECT.*,.'x'.FROM.t1.ORDER.B |
97900 | 59 20 61 3b 0a 82 5f 85 4c 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.a;.._.L...C..CREATE.TABLE.t1(a |
97920 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
97940 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
97960 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c | .VALUES(1,2),(3,4);...WITH.nx(a, |
97980 | 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c | b).AS.(VALUES(1,8),(2,11),(3,1), |
979a0 | 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | (2,15),(1,4),(1,99))...INSERT.IN |
979c0 | 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 | TO.main.t1.AS.t2(a,b).SELECT.a,. |
979e0 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | b.FROM.nx.WHERE.true.....ON.CONF |
97a00 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
97a20 | 2e 62 2f 20 63 3d 74 32 2e 63 2b 20 74 69 6d 65 28 31 2c 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 | .b/.c=t2.c+.time(1,1,1)<excluded |
97a40 | 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | .b;...SELECT.*,.'x'.FROM.t1.ORDE |
97a60 | 52 20 42 59 20 61 3b 0a 82 6b 85 4b 04 00 85 5b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | R.BY.a;..k.K...[..CREATE.TABLE.t |
97a80 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
97aa0 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
97ac0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
97ae0 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
97b00 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
97b20 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
97b40 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 | a,.b.FROM.nx.WHERE.true.....ON.C |
97b60 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
97b80 | 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 | ded.b,.c=t2.c+CURRENT_DATE<exclu |
97ba0 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 43 55 52 52 45 4e 54 5f 44 41 54 45 20 27 | ded.b;...SELECT.*,CURRENT_DATE.' |
97bc0 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 4a 04 00 85 43 20 | x'.FROM.t1.ORDER.BY.a;.._.J...C. |
97be0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
97c00 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
97c20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
97c40 | 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 | 3,4);...WITH.nx(a,b).AS.(VALUES( |
97c60 | 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 | 1,8),(2,11),(3,1),(2,15),(1,4),( |
97c80 | 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 | 1,99))...INSERT.INTO.main.t1.AS. |
97ca0 | 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | t2(a,b).SELECT.a,.b.FROM.nx.WHER |
97cc0 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
97ce0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 43 55 52 | ATE.SET.b=excluded.b,.c=t2.c+CUR |
97d00 | 52 45 4e 54 5f 44 41 54 45 2f 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | RENT_DATE/excluded.b;...SELECT.* |
97d20 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 49 04 00 | ,.'x'.FROM.t1.ORDER.BY.a;.._.I.. |
97d40 | 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .C..CREATE.TABLE.t1(a.INTEGER.PR |
97d60 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
97d80 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
97da0 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
97dc0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
97de0 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
97e00 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 | AS.t2(a,b).SELECT.a,.b.FROM.nx.W |
97e20 | 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | HERE.true.....ON.CONFLICT(a).DO. |
97e40 | 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b | UPDATE.SET.b=excluded.b,.c=t2.c+ |
97e60 | 31 20 57 48 45 52 45 20 74 32 2e 62 3c 74 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 | 1.WHERE.t2.b<txcluded.b;...SELEC |
97e80 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 | T.*,.'x'.FROM.t1.ORDER.BY.a;.._. |
97ea0 | 48 04 00 85 43 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | H...C..CREATE.TABLE.t1(a.INTEGER |
97ec0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
97ee0 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
97f00 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 | 1,2),(3,4);...WITH.nx(a,b).AS.(V |
97f20 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 | ALUES(1,8),(2,11),(3,1),(2,15),( |
97f40 | 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e | 1,4),(1,99))...INSERT.INTO.main. |
97f60 | 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e | t1.AS.t2(a,b).SELECT.a,.b.FROM.n |
97f80 | 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | x.WHERE.true.....ON.CONFLICT(a). |
97fa0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 | DO.UPDATE.SET.b=excluded.b,.c=t2 |
97fc0 | 2e 63 26 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | .c&CURRENT_DATE<excluded.b;...SE |
97fe0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
98000 | 0d 00 00 00 17 00 8c 00 1e 94 1d 28 1b b6 1a 41 18 c3 17 43 15 ce 14 5a 12 ee 11 82 10 16 0e 9e | ...........(...A...C...Z........ |
98020 | 0d 2c 0c 1a 0b 08 09 9a 08 37 06 bc 05 4b 03 d3 02 58 01 4b 00 8c 00 00 00 00 00 00 00 00 00 00 | .,.......7...K...X.K............ |
98040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
98060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
98080 | 00 00 00 00 00 00 00 00 00 00 00 00 81 3b 85 74 04 00 82 7b 20 20 43 52 45 41 54 45 20 54 41 42 | .............;.t...{..CREATE.TAB |
980a0 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
980c0 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
980e0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 41 54 54 41 43 | t1(a,b).VALUES(1,2),(3,4);.ATTAC |
98100 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
98120 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
98140 | 53 45 52 54 2a 2c 20 27 61 3b 0a 82 09 85 73 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c | SERT*,.'a;....s......CREATE.TABL |
98160 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
98180 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
981a0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
981c0 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 2c | .nx(a,b).AS.(VALUES(2001-01-011, |
981e0 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c | 8),(2,11),(3,1),(2,15),(1,4),(1, |
98200 | 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 | 99))...INSERT.INTO.main.t1.AS.t2 |
98220 | 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 | (a,b).SELECT.a,.b.FROM.nx.WHERE. |
98240 | 20 60 61 60 43 4f 4c 4c 41 54 45 20 43 32 30 30 31 2d 30 31 2d 30 31 0a 82 77 85 72 04 00 85 73 | .`a`COLLATE.C2001-01-01..w.r...s |
98260 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
98280 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
982a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
982c0 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
982e0 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c | (1,8),(2,11),(3,1),(2,15),(1,4), |
98300 | 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | (1,99))...INSERT.INTO.main.t1.AS |
98320 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 40 61 4f 52 32 30 30 31 2d 30 31 2d 30 31 20 74 72 | .t2(a,b).SELECT@aOR2001-01-01.tr |
98340 | 75 65 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 74 72 75 65 | ue,.b.FROM.nx.WHERE.true.OR.true |
98360 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
98380 | 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 | .b=excluded.b,.c=t2.c+1.WHERE.t2 |
983a0 | 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | .b<excluded.b;...SELECT.*,.'x'.F |
983c0 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 74 85 71 04 00 85 6d 20 20 43 52 45 | ROM.t1.ORDER.BY.a;..t.q...m..CRE |
983e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a.INTEGER.PRIMARY.K |
98400 | 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | EY,.b.int,.c.DEFAULT.0);...INSER |
98420 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
98440 | 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 | ;...WITH.nx(a,b).AS.(VALUES(1,8) |
98460 | 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 | ,(2,11),(3,1),(2,15),(1,4),(1,99 |
98480 | 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 | ))...INSERT.INTO.main.t1.AS.t2(a |
984a0 | 2c 62 29 20 53 45 4c 45 43 54 40 61 4f 52 20 74 72 75 65 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 | ,b).SELECT@aOR.true,.b.FROM.nx.W |
984c0 | 48 45 52 45 20 74 72 75 65 0a 4f 52 20 74 72 75 65 20 4f 52 20 74 72 75 65 20 20 20 4f 4e 20 43 | HERE.true.OR.true.OR.true...ON.C |
984e0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
98500 | 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 | ded.b,.c=t2.c+1.WHERE.t2.b<exclu |
98520 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | ded.b;...SELECT.*,.'x'.FROM.t1.O |
98540 | 52 44 45 52 20 42 59 20 61 3b 0a 82 6d 85 70 04 00 85 5f 20 20 43 52 45 41 54 45 20 54 41 42 4c | RDER.BY.a;..m.p..._..CREATE.TABL |
98560 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
98580 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t,.c.DEFAULT.0);...INSERT.INTO.t |
985a0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
985c0 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
985e0 | 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,1),(2,15),(1,4),(1,99))...INS |
98600 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
98620 | 43 54 40 61 4f 52 20 74 72 75 65 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 | CT@aOR.true,.b.FROM.nx.WHERE.tru |
98640 | 65 0a 4f 52 20 20 31 3d 31 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | e.OR..1=1....ON.CONFLICT(a).DO.U |
98660 | 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 | PDATE.SET.b=excluded.b,.c=t2.c+1 |
98680 | 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t2.b<excluded.b;...SELECT |
986a0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 77 85 6f | .*,.'x'.FROM.t1.ORDER.BY.a;..w.o |
986c0 | 04 00 85 73 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ...s..CREATE.TABLE.t1(a.INTEGER. |
986e0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
98700 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
98720 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 | ,2),(3,4);...WITH.nx(a,b).AS.(VA |
98740 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 | LUES(1,8),(2,11),(3,1),(2,15),(1 |
98760 | 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 | ,4),(1,99))...INSERT.INTO.main.t |
98780 | 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 40 61 4f 52 20 67 6c 6f 62 28 31 2c 31 | 1.AS.t2(a,b).SELECT@aOR.glob(1,1 |
987a0 | 29 20 74 72 75 65 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 | ).true,.b.FROM.nx.WHERE.true.OR. |
987c0 | 74 72 75 65 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | true....ON.CONFLICT(a).DO.UPDATE |
987e0 | 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 | .SET.b=excluded.b,.c=t2.c+1.WHER |
98800 | 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 | E.t2.b<excluded.b;...SELECT.*,.' |
98820 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 5f 85 6e 04 00 85 43 20 | x'.FROM.t1.ORDER.BY.a;.._.n...C. |
98840 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
98860 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
98880 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
988a0 | 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 | 3,4);...WITH.nx(a,b).AS.(VALUES( |
988c0 | 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 | 1,8),(2,11),(3,1),(2,15),(1,4),( |
988e0 | 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 | 1,99))...INSERT.INTO.main.t1.AS. |
98900 | 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 40 61 2c 24 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | t2(a,b).SELECT@a,$b.FROM.nx.WHER |
98920 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
98940 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t2.c+1.W |
98960 | 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | HERE.t2.b<excluded.b;...SELECT.* |
98980 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 6a 85 6d 04 00 | ,.'x'.FROM.t1.ORDER.BY.a;..j.m.. |
989a0 | 85 59 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .Y..CREATE.TABLE.t1(a.INTEGER.PR |
989c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
989e0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
98a00 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
98a20 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
98a40 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
98a60 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 6f 75 6e 64 28 31 2c 31 29 20 61 2c 20 | AS.t2(a,b).SELECT.round(1,1).a,. |
98a80 | 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | b.FROM.nx.WHERE.true.....ON.CONF |
98aa0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
98ac0 | 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 | .b,.c=t2.c+1.WHERE.t2.b<excluded |
98ae0 | 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | .b;...SELECT.*,.'x'.FROM.t1.ORDE |
98b00 | 52 20 42 59 20 61 3b 0a 82 0e 85 6c 04 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | R.BY.a;....l...!..CREATE.TABLE.t |
98b20 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
98b40 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
98b60 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
98b80 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
98ba0 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
98bc0 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
98be0 | 72 61 6e 64 6f 6d 28 29 49 53 4e 55 4c 4c 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | random()ISNULL.a,.b.FROM.nx.WHER |
98c00 | 45 20 74 72 75 65 0a 49 53 4e 55 4c 4c 20 43 4f 4e 46 4c 49 43 54 28 61 3b 0a 82 0e 85 6b 04 00 | E.true.ISNULL.CONFLICT(a;....k.. |
98c20 | 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .!..CREATE.TABLE.t1(a.INTEGER.PR |
98c40 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
98c60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
98c80 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
98ca0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
98cc0 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
98ce0 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 49 53 4e 55 4c 4c | AS.t2(a,b).SELECT.random()ISNULL |
98d00 | 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 49 53 20 75 6e 6c 69 | .a,.b.FROM.nx.WHERE.true.IS.unli |
98d20 | 6b 65 6c 79 28 31 29 54 28 61 3b 0a 82 6e 85 6a 04 00 85 61 20 20 43 52 45 41 54 45 20 54 41 42 | kely(1)T(a;..n.j...a..CREATE.TAB |
98d40 | 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 | LE.t1(a.INTEGER.PRIMARY.KEY,.b.i |
98d60 | 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | nt,.c.DEFAULT.0);...INSERT.INTO. |
98d80 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 | t1(a,b).VALUES(1,2),(3,4);...WIT |
98da0 | 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | H.nx(a,b).AS.(VALUES(1,8),(2,11) |
98dc0 | 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e | ,(3,1),(2,15),(1,4),(1,99))...IN |
98de0 | 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c | SERT.INTO.main.t1.AS.t2(a,b).SEL |
98e00 | 45 43 54 20 72 61 6e 64 6f 6d 28 29 49 53 40 55 4c 4c 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 | ECT.random()IS@ULL.a,.b.FROM.nx. |
98e20 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | WHERE.true.....ON.CONFLICT(a).DO |
98e40 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 | .UPDATE.SET.b=excluded.b,.c=t2.c |
98e60 | 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 | +1.WHERE.t2.b<excluded.b;...SELE |
98e80 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 74 | CT.*,.'x'.FROM.t1.ORDER.BY.a;..t |
98ea0 | 85 69 04 00 85 6d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .i...m..CREATE.TABLE.t1(a.INTEGE |
98ec0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
98ee0 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
98f00 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 | (1,2),(3,4);...WITH.nx(a,b).AS.( |
98f20 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c | VALUES(1,8),(2,11),(3,1),(2,15), |
98f40 | 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e | (1,4),(1,99))...INSERT.INTO.main |
98f60 | 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 | .t1.AS.t2(a,b).SELECT.random().a |
98f80 | 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 | ,.zeroblob(1).b.FROM.nx.WHERE.tr |
98fa0 | 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | ue.....ON.CONFLICT(a).DO.UPDATE. |
98fc0 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 | SET.b=excluded.b,.c=t2.c+1.WHERE |
98fe0 | 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 | .t2.b<excluded.b;...SELECT.*,.'x |
99000 | 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 68 85 68 04 00 85 55 20 20 | '.FROM.t1.GROUP.BY.a;..h.h...U.. |
99020 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
99040 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
99060 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
99080 | 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 | ,4);...WITH.nx(a,b).AS.(VALUES(1 |
990a0 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 | ,8),(2,11),(3,1),(2,15),(1,4),(1 |
990c0 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 | ,99))...INSERT.INTO.main.t1.AS.t |
990e0 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d | 2(a,b).SELECT.random().a,.b.FROM |
99100 | 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .nx.WHERE.true.....ON.CONFLICT(a |
99120 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
99140 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | t2.c+1.WHERE.t2.b<excluded.b;... |
99160 | 53 45 4c 45 43 54 20 73 75 6d 28 31 29 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 | SELECT.sum(1).FROM.t1.GROUP.BY.a |
99180 | 3b 0a 82 68 85 67 04 00 85 55 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;..h.g...U..CREATE.TABLE.t1(a.IN |
991a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
991c0 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ULT.0);...INSERT.INTO.t1(a,b).VA |
991e0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 | LUES(1,2),(3,4);...WITH.nx(a,b). |
99200 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c | AS.(VALUES(1,8),(2,11),(3,1),(2, |
99220 | 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 15),(1,4),(1,99))...INSERT.INTO. |
99240 | 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d | main.t1.AS.t2(a,b).SELECT.random |
99260 | 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f | ().a,.b.FROM.nx.WHERE.true.....O |
99280 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
992a0 | 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 | cluded.b,.c=t2.c+1.WHERE.t2.b<ex |
992c0 | 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 61 76 67 28 31 29 20 46 52 4f 4d 20 74 | cluded.b;...SELECT.avg(1).FROM.t |
992e0 | 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 68 85 66 04 00 85 55 20 20 43 52 45 41 54 45 20 54 | 1.GROUP.BY.a;..h.f...U..CREATE.T |
99300 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
99320 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
99340 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 | O.t1(a,b).VALUES(1,2),(3,4);...W |
99360 | 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | ITH.nx(a,b).AS.(VALUES(1,8),(2,1 |
99380 | 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 | 1),(3,1),(2,15),(1,4),(1,99))... |
993a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 | INSERT.INTO.main.t1.AS.t2(a,b).S |
993c0 | 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | ELECT.random().a,.b.FROM.nx.WHER |
993e0 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
99400 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t2.c+1.W |
99420 | 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 4e | HERE.t2.b<excluded.b;...SELECT.N |
99440 | 4f 54 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 70 85 65 04 00 | OT'x'.FROM.t1.ORDER.BY.a;..p.e.. |
99460 | 85 65 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 | .e..CREATE.TABLE.t1(a.INTEGER.PR |
99480 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a | IMARY.KEY,.b.int,.c.DEFAULT.0);. |
994a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
994c0 | 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 | ),(3,4);...WITH.nx(a,b).AS.(VALU |
994e0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 | ES(1,8),(2,11),(3,1),(2,15),(1,4 |
99500 | 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 | ),(1,99))...INSERT.INTO.main.t1. |
99520 | 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 | AS.t2(a,b).SELECT.random().a,.b. |
99540 | 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | FROM.nx.WHERE.true.....ON.CONFLI |
99560 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
99580 | 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 | ,.c=t2.c+1.WHERE.t2.b<excluded.b |
995a0 | 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | ;...SELECT.DISTINCT*,.'x'.FROM.t |
995c0 | 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 71 85 64 04 00 85 67 20 20 43 52 45 41 54 45 20 54 | 1.GROUP.BY.a;..q.d...g..CREATE.T |
995e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
99600 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
99620 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 | O.t1(a,b).VALUES(1,2),(3,4);...W |
99640 | 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 | ITH.nx(a,b).AS.(VALUES(1,8),(2,1 |
99660 | 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 | 1),(3,1),(2,15),(1,4),(1,99))... |
99680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 | INSERT.INTO.main.t1.AS.t2(a,b).S |
996a0 | 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 | ELECT.random().a,.b.FROM.nx.WHER |
996c0 | 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | E.true.....ON.CONFLICT(a).DO.UPD |
996e0 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 | ATE.SET.b=excluded.b,.c=t2.c+1.W |
99700 | 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a | HERE.t2.b<excluded.b;...SELECT.* |
99720 | 2c 20 74 6f 74 61 6c 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 | ,.total(1).'x'.FROM.t1.GROUP.BY. |
99740 | 61 3b 0a 82 7c 85 63 04 00 85 7d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a;..|.c...}..CREATE.TABLE.t1(a.I |
99760 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
99780 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
997a0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 | ALUES(1,2),(3,4);...WITH.nx(a,b) |
997c0 | 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 | .AS.(VALUES(1,8),(2,11),(3,1),(2 |
997e0 | 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ,15),(1,4),(1,99))...INSERT.INTO |
99800 | 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f | .main.t1.AS.t2(a,b).SELECT.rando |
99820 | 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 | m().a,.b.FROM.nx.WHERE.true..... |
99840 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
99860 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 | xcluded.b,.c=t2.c+1.WHERE.t2.b<e |
99880 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 | xcluded.b;...SELECT.*,.json_grou |
998a0 | 70 5f 61 72 72 61 79 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 | p_array(1).'x'.FROM.t1.GROUP.BY. |
998c0 | 61 3b 0a 82 7a 85 62 04 00 85 79 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a;..z.b...y..CREATE.TABLE.t1(a.I |
998e0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
99900 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
99920 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 | ALUES(1,2),(3,4);...WITH.nx(a,b) |
99940 | 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 | .AS.(VALUES(1,8),(2,11),(3,1),(2 |
99960 | 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ,15),(1,4),(1,99))...INSERT.INTO |
99980 | 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f | .main.t1.AS.t2(a,b).SELECT.rando |
999a0 | 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 | m().a,.b.FROM.nx.WHERE.true..... |
999c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
999e0 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 | xcluded.b,.c=t2.c+1.WHERE.t2.b<e |
99a00 | 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e | xcluded.b;...SELECT.*,.group_con |
99a20 | 63 61 74 28 3f 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b | cat(?,1).'x'.FROM.t1.GROUP.BY.a; |
99a40 | 0a 82 71 85 61 04 00 85 67 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ..q.a...g..CREATE.TABLE.t1(a.INT |
99a60 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
99a80 | 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | LT.0);...INSERT.INTO.t1(a,b).VAL |
99aa0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 | UES(1,2),(3,4);...WITH.nx(a,b).A |
99ac0 | 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 | S.(VALUES(1,8),(2,11),(3,1),(2,1 |
99ae0 | 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d | 5),(1,4),(1,99))...INSERT.INTO.m |
99b00 | 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 | ain.t1.AS.t2(a,b).SELECT.random( |
99b20 | 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e | ).a,.b.FROM.nx.WHERE.true.....ON |
99b40 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
99b60 | 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 | luded.b,.c=t2.c+1.WHERE.t2.b<exc |
99b80 | 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 63 6f 75 6e 74 28 31 29 20 27 78 | luded.b;...SELECT.*,.count(1).'x |
99ba0 | 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 6e 85 60 04 00 85 61 20 20 | '.FROM.t1.GROUP.BY.a;..n.`...a.. |
99bc0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a.INTEGER.PRIMAR |
99be0 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e | Y.KEY,.b.int,.c.DEFAULT.0);...IN |
99c00 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
99c20 | 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 | ,4);...WITH.nx(a,b).AS.(VALUES(1 |
99c40 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 | ,8),(2,11),(3,1),(2,15),(1,4),(1 |
99c60 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 | ,99))...INSERT.INTO.main.t1.AS.t |
99c80 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d | 2(a,b).SELECT.random().a,.b.FROM |
99ca0 | 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .nx.WHERE.true.....ON.CONFLICT(a |
99cc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
99ce0 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 | t2.c+1.WHERE.t2.b<excluded.b;... |
99d00 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 | SELECT.*,.'x'.FROM.t1.ORDER.BY.a |
99d20 | 3b 56 41 43 55 55 4d 0a 82 68 85 5f 04 00 85 55 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ;VACUUM..h._...U..CREATE.TABLE.t |
99d40 | 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 | 1(a.INTEGER.PRIMARY.KEY,.b.int,. |
99d60 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | c.DEFAULT.0);...INSERT.INTO.t1(a |
99d80 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
99da0 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
99dc0 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
99de0 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
99e00 | 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 | random().a,.b.FROM.nx.WHERE.true |
99e20 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
99e40 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 | T.b=excluded.b,.c=t2.c+1.WHERE.t |
99e60 | 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | 2.b<excluded.b;...SELECT.*,.'x'. |
99e80 | 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 40 61 3b 0a 82 68 85 5e 04 00 85 55 20 20 43 52 | FROM.t1.GROUP.BY@a;..h.^...U..CR |
99ea0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
99ec0 | 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 | KEY,.b.int,.c.DEFAULT.0);...INSE |
99ee0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
99f00 | 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 | );...WITH.nx(a,b).AS.(VALUES(1,8 |
99f20 | 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 | ),(2,11),(3,1),(2,15),(1,4),(1,9 |
99f40 | 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 | 9))...INSERT.INTO.main.t1.AS.t2( |
99f60 | 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e | a,b).SELECT.random().a,.b.FROM.n |
99f80 | 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | x.WHERE.true.....ON.CONFLICT(a). |
99fa0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 | DO.UPDATE.SET.b=excluded.b,.c=t2 |
99fc0 | 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | .c+1.WHERE.t2.b<excluded.b;...SE |
99fe0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 2b 61 3b 0a | LECT.*,.'x'.FROM.t1.GROUP.BY+a;. |
9a000 | 0d 1e 5d 00 11 02 70 00 1f 72 1e 63 1d 3d 1c 1b 1b 04 19 e4 18 ce 17 aa 16 90 14 f9 13 62 12 05 | ..]...p..r.c.=...............b.. |
9a020 | 11 10 0f a0 0b 3e 06 d2 02 70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....>...p...................... |
9a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9a260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 5e 86 05 04 00 91 41 20 20 43 52 45 41 54 45 | .................^.....A..CREATE |
9a280 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
9a2a0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | .b.int,.c.DEFAULT.0)WITHOUT.ROWI |
9a2c0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c | D;...CREATE.TABLE.record(x.TEXT, |
9a2e0 | 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 | .y.TEXT);...CREATE.TRIGGER.r1.BE |
9a300 | 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FORE.INSERT.ON.t1.BEGIN.....INSE |
9a320 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
9a340 | 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | ES('before-insert',printf('%d,%d |
9a360 | 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ,%d',new.a,new.b,new.c));...END; |
9a380 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 | ...CREATE.TRIGGER.r2.AFTER.INSER |
9a3a0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | T.ON.t1.BEGIN.....INSERT.INTO.re |
9a3c0 | 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 | cord(x,y).....VALUES('after-inse |
9a3e0 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
9a400 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
9a420 | 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | ER.r3.BEFORE.UPDATE.ON.t1.BEGIN. |
9a440 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
9a460 | 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | ....VALUES('before-update',print |
9a480 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
9a4a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e | .............old.a,old.b,old.c,n |
9a4c0 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 | ew.a,new.b,new.c));...END;...CRE |
9a4e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r4.AFTER.UPDATE.ON.t |
9a500 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
9a520 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 | ,y).........VALUES('after-update |
9a540 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
9a560 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9a580 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e | ....old.a,old.b,old.c,new.a,new. |
9a5a0 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b,new.c));...END;...INSERT.INTO. |
9a5c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
9a5e0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
9a600 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
9a620 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 | DO.UPDATE.SET.c=t1.c+1;...SELECT |
9a640 | 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | .*.FROM.record;...DELETE.FROM.re |
9a660 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
9a680 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
9a6a0 | 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 00 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 | DATE.SET.c=c+1.WHERE.c<0;...SELE |
9a6c0 | 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 68 86 04 04 00 91 55 20 20 43 52 45 41 | CT.*.FROM.record;..h.....U..CREA |
9a6e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
9a700 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f | Y,.b.int,.c.DEFAULT.0)WITHOUT.RO |
9a720 | 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 | WID;...CREATE.TABLE.record(x.TEX |
9a740 | 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | T,.y.TEXT);...CREATE.TRIGGER.r1. |
9a760 | 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e | BEFORE.INSERT.ON.t1.BEGIN.....IN |
9a780 | 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 | SERT.INTO.record(x,y).........VA |
9a7a0 | 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | LUES('before-insert',printf('%d, |
9a7c0 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
9a7e0 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 | D;...CREATE.TRIGGER.r2.AFTER.INS |
9a800 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ERT.ON.t1.BEGIN.....INSERT.INTO. |
9a820 | 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e | record(x,y).....VALUES('after-in |
9a840 | 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',printf('%d,%d,%d',new.a,ne |
9a860 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
9a880 | 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r3.BEFORE.UPDATE.ON.t1.BEGI |
9a8a0 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 | N.....INSERT.INTO.record(x,y)... |
9a8c0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 | ......VALUES('before-update',pri |
9a8e0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
9a900 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
9a920 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 | ,new.a,new.b,new.c));...END;...C |
9a940 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r4.AFTER.UPDATE.ON |
9a960 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
9a980 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 | (x,y).........VALUES('after-upda |
9a9a0 | 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a | te',printf('%d,%d,%d/%d,%d,%d',. |
9a9c0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9a9e0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
9aa00 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | w.b,new.c));...END;...INSERT.INT |
9aa20 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 | O.t1(a,b).VALUES(1,2);...DELETE. |
9aa40 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | FROM.record;...INSERT.INTO.t1(a, |
9aa60 | 62 29 20 56 41 4c 55 45 53 28 31 20 67 6c 6f 62 28 31 2c 31 29 2c 32 29 0a 20 20 20 20 4f 4e 20 | b).VALUES(1.glob(1,1),2).....ON. |
9aa80 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
9aaa0 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
9aac0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
9aae0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
9ab00 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.SET.c=c+1.WHERE |
9ab20 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 5e | .c<0;...SELECT.*.FROM.record;..^ |
9ab40 | 86 03 04 00 91 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .....A..CREATE.TABLE.t1(a.INTEGE |
9ab60 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
9ab80 | 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | 0)WITHOUT.ROWID;...CREATE.TABLE. |
9aba0 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
9abc0 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
9abe0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
9ac00 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
9ac20 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
9ac40 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
9ac60 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
9ac80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
9aca0 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
9acc0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
9ace0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
9ad00 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
9ad20 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
9ad40 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
9ad60 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | %d',.......................old.a |
9ad80 | 2c 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 29 | ,.sqlite_compileoption_used(1))) |
9ada0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
9adc0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
9ade0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
9ae00 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
9ae20 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
9ae40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
9ae60 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
9ae80 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
9aea0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
9aec0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
9aee0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
9af00 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
9af20 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
9af40 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
9af60 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
9af80 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
9afa0 | 82 6c 86 02 04 00 85 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .l.....]..CREATE.TABLE.t1(a.INTE |
9afc0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
9afe0 | 54 20 30 29 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | T.0);EXPLAIN...INSERT.INTO.t1(a, |
9b000 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 | b).VALUES(1,2),(3,4);...WITH.nx( |
9b020 | 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | a,b).AS.(VALUES(1,8),(2,11),(3,1 |
9b040 | 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 | ),(2,15),(1,4),(1,99))...INSERT. |
9b060 | 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 | INTO.main.t1.AS.t2(a,b).SELECT.a |
9b080 | 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f | ,.b.FROM.nx.WHERE.true.....ON.CO |
9b0a0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 | NFLICT(a).DO.UPDATE.SET.b=exclud |
9b0c0 | 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 | ed.b,.c=t2.c+1.WHERE.t2.b<exclud |
9b0e0 | 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 | ed.b;...SELECT.*,.'x'.FROM.t1.OR |
9b100 | 44 45 52 20 42 59 20 61 3b 56 41 43 55 55 4d 0a 81 71 86 01 04 00 83 67 20 20 43 52 45 41 54 45 | DER.BY.a;VACUUM..q.....g..CREATE |
9b120 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
9b140 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 45 58 50 4c 41 49 4e 0a 20 20 49 | .b.int,.c.DEFAULT.0);EXPLAIN...I |
9b160 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
9b180 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
9b1a0 | 45 53 28 31 2c 38 29 2c 28 20 63 68 61 72 28 20 22 61 22 0d 29 2c 31 29 0a 20 20 20 20 4f 4e 20 | ES(1,8),(.char(."a".),1).....ON. |
9b1c0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
9b1e0 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+1.WHERE.t1.b<exclude |
9b200 | 64 2e 62 3b 0a 82 59 86 00 04 00 85 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | d.b;..Y.....7..CREATE.TABLE.t1(a |
9b220 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | .INTEGER.PRIMARY.KEY,.b.int,.c.D |
9b240 | 45 46 41 55 4c 54 20 30 29 3b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 | EFAULT.0);.WITH.c(x).AS.(values( |
9b260 | 31 29 29 20 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | 1))....INSERT.INTO.t1(a,b).VALUE |
9b280 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 | S(1,2),(3,4);...WITH.nx(a,b).AS. |
9b2a0 | 28 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 31 31 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 | (VALUES(.avg(1),11),(.json_group |
9b2c0 | 5f 61 72 72 61 79 28 31 29 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 | _array(1),99))...INSERT.INTO.mai |
9b2e0 | 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d | n.t1.AS.t2(a,b).SELECT.a,.b.FROM |
9b300 | 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | .nx.WHERE.true.....ON.CONFLICT(a |
9b320 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
9b340 | 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 61 | t2.c+1.WHERE.t2.b<excluded.b;..a |
9b360 | 3b 0a 83 13 85 7f 04 00 86 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;........+..CREATE.TABLE.t1(a.IN |
9b380 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.int,.c.DEFA |
9b3a0 | 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 57 49 | ULT.0);...INSERT.INTO.t1(a,b).WI |
9b3c0 | 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 31 | TH.c(x).AS.(values(1))..VALUES(1 |
9b3e0 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 20 57 | ,2),(3,4);...WITH.nx(a,b).AS.(.W |
9b400 | 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 | ITH.c(x).AS.(values(1)).VALUES(1 |
9b420 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 | ,8),(2,11),(3,1),(2,15),(1,4),(1 |
9b440 | 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 | ,99))...INSERT.INTO.main.t1.AS.t |
9b460 | 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 | 2(a,b).SELECT.a,.b.FROM.nx.WHERE |
9b480 | 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | .true.....ON.CONFLICT(a).DO.UPDA |
9b4a0 | 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 | TE.SET.b=excluded.b,.c=t2.c+1.WH |
9b4c0 | 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c | ERE.t2.b<excluded.b;...SELECT.*, |
9b4e0 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 83 13 85 7e 04 00 86 | .'x'.FROM.t1.ORDER.BY.a;....~... |
9b500 | 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 | +..CREATE.TABLE.t1(a.INTEGER.PRI |
9b520 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
9b540 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 57 49 54 48 20 63 28 78 29 20 41 | .INSERT.INTO.t1(a,b).WITH.c(x).A |
9b560 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | S.(values(1))..VALUES(1,2),(3,4) |
9b580 | 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 20 57 49 54 48 20 63 28 78 29 20 | ;...WITH.nx(a,b).AS.(.WITH.c(x). |
9b5a0 | 41 53 20 28 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 31 31 | AS.(.WITH.c(x).AS.(values(1)).11 |
9b5c0 | 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 | ),(3,1),(2,15),(1,4),(1,99))...I |
9b5e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
9b600 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 | LECT.a,.b.FROM.nx.WHERE.true.... |
9b620 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
9b640 | 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c | excluded.b,.c=t2.c+1.WHERE.t2.b< |
9b660 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | excluded.b;...SELECT.*,.'x'.FROM |
9b680 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 16 85 7d 04 00 84 31 20 20 43 52 45 41 54 45 | .t1.ORDER.BY.a;....}...1..CREATE |
9b6a0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
9b6c0 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .b.int,.c.DEFAULT.0);...INSERT.I |
9b6e0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 | NTO.t1(a,b).VALUES(9,2),(3,4);.. |
9b700 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 | .INSERT.INTO.t1(a,b).VALUES(1,8) |
9b720 | 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,(2,11),(3,1).....ON.CONFLICT(a) |
9b740 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 | .DO.UPDATE.SET.b=excluded.b,.c=c |
9b760 | 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 | +1.WHERE.t1.b<excluded.b;...SELE |
9b780 | 43 54 20 7a 65 72 6f 62 6c 6f 62 28 41 29 20 41 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 | CT.zeroblob(A).A,.'x'.FROM.t1.OR |
9b7a0 | 44 45 52 20 42 59 20 61 3b 0a 82 20 85 7c 04 00 84 45 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | DER.BY.a;....|...E..CREATE.TABLE |
9b7c0 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
9b7e0 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
9b800 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(9,2),(3,4);...INSER |
9b820 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | T.INTO.t1(a,b).VALUES(1,8),(2,11 |
9b840 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
9b860 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
9b880 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 7a 65 72 | RE.t1.b<excluded.b;...SELECT.zer |
9b8a0 | 6f 62 6c 6f 62 28 32 30 30 31 2d 30 31 2d 30 31 31 29 20 41 2c 20 27 78 27 20 46 52 4f 4d 20 74 | oblob(2001-01-011).A,.'x'.FROM.t |
9b8c0 | 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 12 85 7b 04 00 84 29 20 20 43 52 45 41 54 45 20 54 | 1.ORDER.BY.a;....{...)..CREATE.T |
9b8e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
9b900 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
9b920 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 | O.t1(a,b).VALUES(9,2),(3,4);...I |
9b940 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,8),( |
9b960 | 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | 2,11),(3,1).....ON.CONFLICT(a).D |
9b980 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 | O.UPDATE.SET.b=excluded.b,.c=c+1 |
9b9a0 | 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 | .WHERE.t1.b<excluded.b;...SELECT |
9b9c0 | 20 44 49 53 54 49 4e 43 54 3f 3c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | .DISTINCT?<.'x'.FROM.t1.ORDER.BY |
9b9e0 | 20 61 3b 0a 82 1c 85 7a 04 00 84 3d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;....z...=..CREATE.TABLE.t1(a. |
9ba00 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
9ba20 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
9ba40 | 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(9,2),(3,4);...INSERT.INTO |
9ba60 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(a,b).VALUES(1,8),(2,11),(3,1 |
9ba80 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
9baa0 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
9bac0 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 32 2c 20 67 72 6f 75 70 5f | b<excluded.b;...SELECT.2,.group_ |
9bae0 | 63 6f 6e 63 61 74 28 31 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 | concat(1,1).'x'.FROM.t1.GROUP.BY |
9bb00 | 20 61 3b 0a 82 13 85 79 04 00 84 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;....y...+..CREATE.TABLE.t1(a. |
9bb20 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
9bb40 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
9bb60 | 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(9,2),(3,4);...INSERT.INTO |
9bb80 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(a,b).VALUES(1,8),(2,11),(3,1 |
9bba0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
9bbc0 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
9bbe0 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 74 6f 74 61 6c 28 | b<excluded.b;...SELECT.*,.total( |
9bc00 | 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 1e 85 78 04 | 1).'x'.FROM.t1.GROUP.BY.a;....x. |
9bc20 | 00 84 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..A..CREATE.TABLE.t1(a.INTEGER.P |
9bc40 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
9bc60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 39 2c | ...INSERT.INTO.t1(a,b).VALUES(9, |
9bc80 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | 2),(3,4);...INSERT.INTO.t1(a,b). |
9bca0 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 | VALUES(1,8),(2,11),(3,1).....ON. |
9bcc0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
9bce0 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+1.WHERE.t1.b<exclude |
9bd00 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 | d.b;...SELECT.*,.json_group_arra |
9bd20 | 79 28 3f 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 1c 85 | y(?).'x'.FROM.t1.ORDER.BY.a;.... |
9bd40 | 77 04 00 84 3d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 | w...=..CREATE.TABLE.t1(a.INTEGER |
9bd60 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 | .PRIMARY.KEY,.b.int,.c.DEFAULT.0 |
9bd80 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | );...INSERT.INTO.t1(a,b).VALUES( |
9bda0 | 39 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | 9,2),(3,4);...INSERT.INTO.t1(a,b |
9bdc0 | 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f | ).VALUES(1,8),(2,11),(3,1).....O |
9bde0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 | N.CONFLICT(a).DO.UPDATE.SET.b=ex |
9be00 | 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 | cluded.b,.c=c+1.WHERE.t1.b<exclu |
9be20 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 | ded.b;...SELECT.*,.group_concat( |
9be40 | 31 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 00 00 00 | 1,1).'x'.FROM.t1.GROUP.BY.a;.... |
9be60 | 06 04 00 82 0b 85 76 04 00 84 1b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ......v......CREATE.TABLE.t1(a.I |
9be80 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
9bea0 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
9bec0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 | ALUES(1,2),(3,4);EXPLAIN...INSER |
9bee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 6a 73 6f 6e 28 31 29 | T.INTO.t1(a,b).VALUES(1,.json(1) |
9bf00 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
9bf20 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
9bf40 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | b<excluded.b;...SELECT.*,.'x'.FR |
9bf60 | 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 81 0a 85 75 04 00 82 19 20 20 43 52 45 41 | OM.t1.ORDER.BY.a;....u......CREA |
9bf80 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
9bfa0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
9bfc0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
9bfe0 | 0a 44 45 54 41 43 48 20 6e 78 28 61 2c 62 29 20 41 53 20 74 31 2e 65 64 2e 62 3b 0a 20 20 3b 0a | .DETACH.nx(a,b).AS.t1.ed.b;...;. |
9c000 | 0d 00 00 00 0b 01 e3 00 1b 97 17 49 12 ef 0e 80 0d 10 0b a0 0a 30 08 c0 07 3e 02 f1 01 e3 00 00 | ...........I.........0...>...... |
9c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9c1e0 | 00 00 00 82 0a 86 10 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | .............CREATE.TABLE.t1(a.I |
9c200 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
9c220 | 41 55 4c 54 20 b0 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT..);...INSERT.INTO.t1(a,b).V |
9c240 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ALUES(1,2),(3,4);...INSERT.INTO. |
9c260 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 | t1(a,b).VALUES(1,8),(2,11),(3,1) |
9c280 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
9c2a0 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 | T.b=excluded.b,.c=c+1.WHERE.t1.b |
9c2c0 | 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f | <excluded.b;...SELECT.*,.'x'.FRO |
9c2e0 | 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 88 49 86 0f 04 00 91 17 20 20 43 52 45 41 54 | M.t1.ORDER.BY.a;..I........CREAT |
9c300 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.INTEGER.PRIMARY.KEY |
9c320 | 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 48 29 3b 0a 20 20 43 52 45 41 54 45 20 | ,.b.int,.c.DEFAULT.H);...CREATE. |
9c340 | 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 | TABLE.record(x.TEXT,.y.TEXT);... |
9c360 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 | CREATE.TRIGGER.r1.BEFORE.INSERT. |
9c380 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
9c3a0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 | rd(x,y).........VALUES('before-i |
9c3c0 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 20 6c 74 72 69 6d 28 | nsert',printf('%d,%d,%d',.ltrim( |
9c3e0 | 31 2c 31 29 49 53 4e 55 4c 4c 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | 1,1)ISNULL));...END;...CREATE.TR |
9c400 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 63 54 20 4f 4e 20 45 52 54 20 49 4e 54 | IGGER.r2.AFTER.INSEcT.ON.ERT.INT |
9c420 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
9c440 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
9c460 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
9c480 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
9c4a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
9c4c0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 55 74 65 27 2c 70 | ........VALUES('before-updUte',p |
9c4e0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
9c500 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
9c520 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
9c540 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
9c560 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
9c580 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
9c5a0 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
9c5c0 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
9c5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
9c600 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
9c620 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(a,b).VALUES(1,2); |
9c640 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 36 54 20 | ...DELETE.FROM.record;...INSE6T. |
9c660 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
9c680 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 7f 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.U.DATE.SET.c=t1.c |
9c6a0 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
9c6c0 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
9c6e0 | 74 31 28 61 2c 62 11 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b..VALUES(1,2).....ON.CONFL |
9c700 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 00 00 00 ff 20 63 3d 63 2b 31 20 57 48 45 52 45 | ICT(a).DO.UPDATE.....c=c+1.WHERE |
9c720 | 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 82 7e | .c<0;...SELECT.*.FROM.record;..~ |
9c740 | 86 0e 04 00 86 01 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | ........CREATE.TABLE.t1(a.INTEGE |
9c760 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
9c780 | 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 0)WITHOUT.ROWID;...INSERT.INTO.t |
9c7a0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 | 1(a,b).VALUES(1,2),(3,4);...WITH |
9c7c0 | 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | .nx(a,b).AS.(VALUES(1,8),(2,11), |
9c7e0 | 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 | (3,1),(2,15),(1,4),(1,99))...INS |
9c800 | 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 | ERT.INTO.main.t1.AS.t2(a,b).SELE |
9c820 | 43 54 20 61 2c 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 20 62 20 46 52 4f 4d 20 6e | CT.a,.strftime(1,1,1,1).b.FROM.n |
9c840 | 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | x.WHERE.true.....ON.CONFLICT(a). |
9c860 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 | DO.UPDATE.SET.b=excluded.b,.c=t2 |
9c880 | 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | .c+CURRENT_DATE<excluded.b;...SE |
9c8a0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
9c8c0 | 82 6c 86 0d 04 00 85 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .l.....]..CREATE.TABLE.t1(a.INTE |
9c8e0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
9c900 | 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | T.0)WITHOUT.ROWID;...INSERT.INTO |
9c920 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 | .t1(a,b).VALUES(1,2),(3,4);...WI |
9c940 | 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | TH.nx(a,b).AS.(VALUES(1,8),(2,11 |
9c960 | 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 | ),(3,1),(2,15),(1,4),(1,99))...I |
9c980 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
9c9a0 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 | LECT.a,.b.FROM.nx.WHERE.true.... |
9c9c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
9c9e0 | 65 78 63 6c 75 64 65 64 2e 62 3c 20 63 3d 74 32 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c | excluded.b<.c=t2.c+CURRENT_DATE< |
9ca00 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | excluded.b;...SELECT.*,.'x'.FROM |
9ca20 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 6c 86 0c 04 00 85 5d 20 20 43 52 45 41 54 45 | .t1.ORDER.BY.a;..l.....]..CREATE |
9ca40 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
9ca60 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | .b.int,.c.DEFAULT.0)WITHOUT.ROWI |
9ca80 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
9caa0 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 | 1,2),(3,4);...WITH.nx(a,b).AS.(V |
9cac0 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 | ALUES(1,8),(2,11),(3,1),(2,15),( |
9cae0 | 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e | 1,4),(1,99))...INSERT.INTO.main. |
9cb00 | 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e | t1.AS.t2(a,b).SELECT.a,.b.FROM.n |
9cb20 | 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | x.WHERE.true.....ON.CONFLICT(a). |
9cb40 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 | DO.UPDATE.SET.b=excluded.b,.c=t2 |
9cb60 | 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | .c+CURRENT_DATE<excluded.b;...SE |
9cb80 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
9cba0 | 82 6c 86 0b 04 00 85 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .l.....]..CREATE.TABLE.t1(a.INTE |
9cbc0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
9cbe0 | 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | T.0)WITHOUT.ROWID;...INSERT.INTO |
9cc00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 | .t1(a,b).VALUES(1,2),(3,4);...WI |
9cc20 | 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 | TH.nx(a,b).AS.(VALUES(1,8),(2,11 |
9cc40 | 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 | ),(3,1),(2,15),(1,4),(1,99))...I |
9cc60 | 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 | NSERT.INTO.main.t1.AS.t2(a,b).SE |
9cc80 | 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 67 6c 6f 62 28 31 2c 31 | LECT.a,.b.FROM.nx.WHERE.glob(1,1 |
9cca0 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | )ON.CONFLICT(a).DO.UPDATE.SET.b= |
9ccc0 | 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c | excluded.b,.c=t2.c+CURRENT_DATE< |
9cce0 | 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | excluded.b;...SELECT.*,.'x'.FROM |
9cd00 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 6c 86 0a 04 00 85 5d 20 20 43 52 45 41 54 45 | .t1.ORDER.BY.a;..l.....]..CREATE |
9cd20 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t1(a.INTEGER.PRIMARY.KEY, |
9cd40 | 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | .b.int,.c.DEFAULT.0)WITHOUT.ROWI |
9cd60 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
9cd80 | 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 | 1,2),(3,4);...WITH.nx(a,b).AS.(V |
9cda0 | 41 4c 55 45 53 28 31 2c 38 29 2c 28 20 73 75 62 73 74 72 28 31 2c 31 2c 31 29 2c 31 35 29 2c 28 | ALUES(1,8),(.substr(1,1,1),15),( |
9cdc0 | 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e | 1,4),(1,99))...INSERT.INTO.main. |
9cde0 | 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 61 2c 20 62 20 46 52 4f 4d 20 6e | t1.AS.t2(a,b).SELECT.a,.b.FROM.n |
9ce00 | 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | x.WHERE.true.....ON.CONFLICT(a). |
9ce20 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 | DO.UPDATE.SET.b=excluded.b,.c=t2 |
9ce40 | 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | .c+CURRENT_DATE<excluded.b;...SE |
9ce60 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
9ce80 | 88 6b 86 09 04 00 91 5b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .k.....[..CREATE.TABLE.t1(a.INTE |
9cea0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
9cec0 | 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | T.0)WITHOUT.ROWID;...CREATE.TABL |
9cee0 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 57 49 54 48 4f 55 54 20 | E.record(x.TEXT,.y.TEXT)WITHOUT. |
9cf00 | 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 | ROWID;...CREATE.TRIGGER.r1.BEFOR |
9cf20 | 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.INSERT.ON.t1.BEGIN.....INSERT. |
9cf40 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
9cf60 | 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-insert',printf('%d,%d,%d |
9cf80 | 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | ',new.a,new.b,new.c));...END;... |
9cfa0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
9cfc0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
9cfe0 | 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 | d(x,y).....VALUES('after-insert' |
9d000 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
9d020 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
9d040 | 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 | r3.BEFORE.UPDATE.ON.t1.BEGIN.... |
9d060 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
9d080 | 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | .VALUES('before-update',printf(' |
9d0a0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
9d0c0 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
9d0e0 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
9d100 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
9d120 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
9d140 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
9d160 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
9d180 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9d1a0 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
9d1c0 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
9d1e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
9d200 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
9d220 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
9d240 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
9d260 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
9d280 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
9d2a0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
9d2c0 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
9d2e0 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 56 86 08 04 00 91 31 20 20 43 52 45 41 54 45 20 | *.FROM.record;..V.....1..CREATE. |
9d300 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
9d320 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | b.int,.c.DEFAULT.0)WITHOUT.ROWID |
9d340 | 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 | ;...CREATE.TABLE.record(x.TEXT,. |
9d360 | 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | y.TEXT);...CREATE.TRIGGER.r1.BEF |
9d380 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
9d3a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
9d3c0 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
9d3e0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
9d400 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
9d420 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | .ON.t1.BEGIN.INSERT.INTO.record( |
9d440 | 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | x,y).....VALUES('after-insert',p |
9d460 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
9d480 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | .c));...END;...CREATE.TRIGGER.r3 |
9d4a0 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
9d4c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
9d4e0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-update',printf('%d |
9d500 | 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d/%d,%d,%d',............... |
9d520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
9d540 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
9d560 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r4.AFTER.UPDATE.O |
9d580 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 | N.t1.BEGIN.....INSERT.INTO.recor |
9d5a0 | 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 | d(x,y).........VALUES('after-upd |
9d5c0 | 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c | ate',printf('%d,%d,%d/%d,%d,%d', |
9d5e0 | 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9d600 | 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | .......old.a,ol.a,old.b,old.c,ne |
9d620 | 77 2e 61 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 a9 29 | w.ad.b,old.c,new.a,new.b,new.c.) |
9d640 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ;...END;...INSERT.INTO.t1(a,b).V |
9d660 | 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | ALUES(1,2);...DELETE.FROM.record |
9d680 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
9d6a0 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
9d6c0 | 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 | .SET.c=t1.c+1;...SELECT.*.FROM.r |
9d6e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 | NSERT.INTO.t1(a,b).VALUES(1,2).. |
9d700 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 2d 54 20 | ...ON.CONFLICT(a).DO.UPDATE.S-T. |
9d720 | 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | c=c+1.WHERE.c<0;...SELECT.*.FROM |
9d740 | 20 72 65 63 6f 72 64 3b 0a 88 4a 86 07 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .record;..J........CREATE.TABLE. |
9d760 | 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.INTEGER.PRIMARY.KEY,.b.int, |
9d780 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 | .c.DEFAULT.0)WITHOUT.ROWID;...CR |
9d7a0 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
9d7c0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
9d7e0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
9d800 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
9d820 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
9d840 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
9d860 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
9d880 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
9d8a0 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
9d8c0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
9d8e0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
9d900 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
9d920 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
9d940 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 3c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update'<printf('%d,% |
9d960 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d/%d,%d,%d',................. |
9d980 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,old.b,old.c,new.a,ne |
9d9a0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
9d9c0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
9d9e0 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
9da00 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 3c 70 72 69 6e 74 | .....VALUES('after-update'<print |
9da20 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
9da40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
9da60 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
9da80 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ));...END;...INSERT.INTO.t1(a,b) |
9daa0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f | .VALUES(1,2);...DELETE.FROM.reco |
9dac0 | 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | rd;...INSERT.INTO.t1(a,b).VALUES |
9dae0 | 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | (1,2).ON.CONFLICT(a).DO.UPDATE.S |
9db00 | 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | ET.c=t1.c+1;.record;...DELETE.FR |
9db20 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
9db40 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
9db60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 | DO.UPDATE.SET.c=c+1.WHERE.c<0;.. |
9db80 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 65 86 06 04 00 91 4f 20 | .SELECT.*.FROM.record;..e.....O. |
9dba0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
9dbc0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 57 49 54 48 4f | RY.KEY,.b.int,.c.DEFAULT.0)WITHO |
9dbe0 | 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | UT.ROWID;...CREATE.TABLE.record( |
9dc00 | 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y.TEXT);...CREATE.TRIGGE |
9dc20 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
9dc40 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
9dc60 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
9dc80 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
9dca0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
9dcc0 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
9dce0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
9dd00 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
9dd20 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
9dd40 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
9dd60 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
9dd80 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
9dda0 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
9ddc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
9dde0 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
9de00 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 | ;...CREATE.TRIGGER.r4.AFTER.UPDA |
9de20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | TE.ON.t1.BEGIN.....INSERT.INTO.r |
9de40 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 | ecord(x,y).........VALUES('after |
9de60 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
9de80 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
9dea0 | 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 | ...........old.a,old.b,old.c,new |
9dec0 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 | .a,new.b,new.c));...END;...INSER |
9dee0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | T.INTO.t1(a,b).VALUES(1,2);...DE |
9df00 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
9df20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | t1(a,b).VALUES(1,2).....ON.CONFL |
9df40 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 | ICT(a).DO.UPDATE.SET.c=t1.c+1;.. |
9df60 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 | .SELECT.*.FROM.record;...DELETE. |
9df80 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | FROM.record;EXPLAIN...INSERT.INT |
9dfa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
9dfc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
9dfe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
9e000 | 0d 00 00 00 10 01 5c 00 1b 9e 17 4f 12 f2 11 e4 10 78 0c 2b 0a bb 09 a1 08 8b 07 ad 06 97 05 81 | ......\....O.....x.+............ |
9e020 | 04 6b 03 00 01 ea 01 5c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .k.....\........................ |
9e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
9e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 0a 86 20 | ................................ |
9e160 | 04 00 82 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t1(a.INTEGER. |
9e180 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 63 68 61 72 32 30 30 31 2d 30 | PRIMARY.KEY,.b.int,.c.char2001-0 |
9e1a0 | 31 2d 30 31 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 1-01N.CONFLICT(a).DO.UPDATE.SET. |
9e1c0 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 31 2e 63 2b 31 20 57 48 45 52 45 20 74 31 2e | b=excluded.b,.c=t1.c+1.WHERE.t1. |
9e1e0 | 62 3c 65 78 65 64 2e 62 3b 0a 82 12 86 1f 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | b<exed.b;........)..CREATE.TABLE |
9e200 | 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a.INTEGER.PRIMARY.KEY,.b.int |
9e220 | 2c 20 63 20 63 68 61 72 28 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | ,.c.char(1).DEFAULT.0);...INSERT |
9e240 | 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(c,b).VALUES(1,2),(3,4); |
9e260 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
9e280 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 8),(2,11),(3,1).....ON.CONFLICT( |
9e2a0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 3c 20 63 | a).DO.UPDATE.SET.b=excluded.b<.c |
9e2c0 | 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 | =c+1.WHERE.t1.b<excluded.b;...SE |
9e2e0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
9e300 | 82 67 86 1e 04 00 85 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 | .g.....S..CREATE.TABLE.t1(a.INTE |
9e320 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 63 68 61 72 28 31 | GER.PRIMARY.KEY,.b.int,.c.char(1 |
9e340 | 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ).DEFAULT.0);...INSERT.INTO.t1(a |
9e360 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
9e380 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
9e3a0 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
9e3c0 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
9e3e0 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 | a,.b.FROM.nx.WHERE.true.....ON.C |
9e400 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
9e420 | 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 | ded.b,.c=t2.c+1.WHERE.t2.b<exclu |
9e440 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | ded.b;...SELECT.*,.'x'.FROM.t1.O |
9e460 | 52 44 45 52 20 42 59 20 61 3b 0a 82 12 86 1d 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c | RDER.BY.a;........)..CREATE.TABL |
9e480 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
9e4a0 | 74 2c 20 63 20 63 68 61 72 28 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | t,.c.char(1).DEFAULT.0);...INSER |
9e4c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
9e4e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(c,b).VALUES(1 |
9e500 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,8),(2,11),(3,1).....ON.CONFLICT |
9e520 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 | (a).DO.UPDATE.SET.b=excluded.b,. |
9e540 | 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 | c=c+1.WHERE.t1.b<excluded.b;...S |
9e560 | 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b | ELECT.*,.'x'.FROM.t1.GROUP.BY.c; |
9e580 | 0a 82 12 86 1c 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ........)..CREATE.TABLE.t1(a.INT |
9e5a0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 63 68 61 72 28 | EGER.PRIMARY.KEY,.b.int,.c.char( |
9e5c0 | 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | 1).DEFAULT.0);...INSERT.INTO.t1( |
9e5e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
9e600 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(3,11) |
9e620 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
9e640 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 3c 20 63 3d 63 2b 31 20 57 48 45 52 | ATE.SET.b=excluded.b<.c=c+1.WHER |
9e660 | 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 | E.t1.b<excluded.b;...SELECT.*,.' |
9e680 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 12 86 1b 04 00 84 29 20 | x'.FROM.t1.ORDER.BY.a;........). |
9e6a0 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.INTEGER.PRIMA |
9e6c0 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 63 68 61 72 28 31 29 20 44 45 46 41 55 4c 54 | RY.KEY,.b.int,.c.char(1).DEFAULT |
9e6e0 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
9e700 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | S(1,2),(3,4);...INSERT.INTO.t1(a |
9e720 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 | ,b).VALUES(1,8),(2,11),(3,1).... |
9e740 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
9e760 | 65 78 63 6c 75 64 65 64 2e 62 3c 20 63 3d 63 3c 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 | excluded.b<.c=c<1.WHERE.t1.b<exc |
9e780 | 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | luded.b;...SELECT.*,.'x'.FROM.t1 |
9e7a0 | 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 81 5a 86 1a 04 00 83 39 20 20 43 52 45 41 54 45 20 54 41 | .ORDER.BY.a;..Z.....9..CREATE.TA |
9e7c0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a.INTEGER.PRIMARY.KEY,.b. |
9e7e0 | 69 6e 74 2c 20 63 20 63 68 61 72 28 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | int,.c.char(1).DEFAULT.0);...INS |
9e800 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
9e820 | 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 4);...INSERT.INTO.t1(a,b).VALUES |
9e840 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | (1,8),(2,11),(3,1).....ON.CONFLI |
9e860 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
9e880 | 3c 20 63 3d 63 3b 31 20 57 3b 0a 82 12 86 19 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c | <.c=c;1.W;........)..CREATE.TABL |
9e8a0 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
9e8c0 | 74 2c 20 63 20 63 68 61 72 28 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 | t,.c.char(1).DEFAULT.0);...INSER |
9e8e0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
9e900 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
9e920 | 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,8),(2,11),(3,1).....ON.CONFLICT |
9e940 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 3c 20 | (a).DO.UPDATE.SET.b=excluded.b<. |
9e960 | 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 | c=c+1.WHERE.t1.b<excluded.b;...S |
9e980 | 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b | ELECT.*,.'x'.FROM.t1.ORDER.BY.a; |
9e9a0 | 0a 82 16 86 18 04 00 84 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ........1..CREATE.TABLE.t1(a.INT |
9e9c0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 63 68 61 72 28 | EGER.PRIMARY.KEY,.b.int,.c.char( |
9e9e0 | 31 29 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | 1).DEFAULT.0);...INSERT.INTO.t1( |
9ea00 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 | a,b).VALUES(1,2),(3,4);...INSERT |
9ea20 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 | .INTO.t1(a,b).VALUES(1,8),(2,11) |
9ea40 | 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | ,(3,1).....ON.CONFLICT(a).DO.UPD |
9ea60 | 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 20 7c 7c 20 2b 31 20 | ATE.SET.b=excluded.b,.c=c.||.+1. |
9ea80 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
9eaa0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 63 3b 0a 82 6c 86 17 04 | *,.'x'.FROM.t1.GROUP.BY.c;..l... |
9eac0 | 00 85 5d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ..]..CREATE.TABLE.t1(a.INTEGER.P |
9eae0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 a0 30 29 57 | RIMARY.KEY,.b.int,.c.DEFAULT.0)W |
9eb00 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ITHOUT.ROWID;...INSERT.INTO.t1(a |
9eb20 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 | ,b).VALUES(1,2),(3,4);...WITH.nx |
9eb40 | 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | (a,b).AS.(VALUES(1,8),(2,11),(3, |
9eb60 | 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 | 1),(2,15),(1,4),(1,99))...INSERT |
9eb80 | 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 | .INTO.main.t1.AS.t2(a,b).SELECT. |
9eba0 | 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 | a,.b.FROM.nx.WHERE.true.....ON.C |
9ebc0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 | ONFLICT(a).DO.UPDATE.SET.b=exclu |
9ebe0 | 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 43 55 52 52 45 4e 54 5f 44 41 54 45 3c 65 78 63 6c 75 | ded.b,.c=t2.c+CURRENT_DATE<exclu |
9ec00 | 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | ded.b;...SELECT.*,.'x'.FROM.t1.O |
9ec20 | 52 44 45 52 20 42 59 20 61 3b 0a 88 49 86 16 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c | RDER.BY.a;..I........CREATE.TABL |
9ec40 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
9ec60 | 74 2c 20 63 20 44 45 46 41 55 4c 54 a0 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
9ec80 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
9eca0 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
9ecc0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
9ece0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
9ed00 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
9ed20 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
9ed40 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
9ed60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
9ed80 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
9eda0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
9edc0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
9ede0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
9ee00 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
9ee20 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
9ee40 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
9ee60 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
9ee80 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
9eea0 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
9eec0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
9eee0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
9ef00 | 25 64 2c 25 2e 2a 73 6f 6e 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%.*son%d,%d,%d',............. |
9ef20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
9ef40 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
9ef60 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
9ef80 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
9efa0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
9efc0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
9efe0 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
9f000 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
9f020 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
9f040 | 20 20 4f 4e 20 43 64 4e 46 4c 49 43 54 28 61 29 20 44 4f 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | ..ON.CdNFLICT(a).DO1.WHERE.c<0;. |
9f060 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 82 68 86 15 04 00 85 55 | ..SELECT.*.FROM.record;..h.....U |
9f080 | 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t1(a.INTEGER.PRIM |
9f0a0 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 2e 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
9f0c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
9f0e0 | 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 | (3,4);...WITH.nx(a,b).AS.(VALUES |
9f100 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c | (1,8),(2,11),(3,1),(2,15),(1,4), |
9f120 | 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 | (1,99))...INSERT.INTO.main.t1.AS |
9f140 | 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 | .t2(a,b).SELECT.random().a,.b.FR |
9f160 | 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | OM.nx.WHERE.true.....ON.CONFLICT |
9f180 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 | (a).DO.UPDATE.SET.b=excluded.b,. |
9f1a0 | 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a | c=t2.c+1.WHERE.t2.b<excluded.b;. |
9f1c0 | 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 | ..SELECT.*,.'x'.FROM.t1.ORDER.BY |
9f1e0 | 20 61 3b 0a 82 0a 86 14 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;...........CREATE.TABLE.t1(a. |
9f200 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b.int,.c.DE |
9f220 | 46 41 55 4c 54 2e 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | FAULT.0);...INSERT.INTO.t1(a,b). |
9f240 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | VALUES(1,2),(3,4);...INSERT.INTO |
9f260 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 | .t1(a,b).VALUES(1,8),(2,11),(3,1 |
9f280 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
9f2a0 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e | ET.b=excluded.b,.c=c+1.WHERE.t1. |
9f2c0 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 43 27 78 27 20 46 52 | b<excluded.b;...SELECT.*,C'x'.FR |
9f2e0 | 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 88 59 86 13 04 00 91 37 20 20 43 52 45 41 | OM.t1.GROUP.BY.a;..Y.....7..CREA |
9f300 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.INTEGER.PRIMARY.KE |
9f320 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 2e 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
9f340 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
9f360 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
9f380 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
9f3a0 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
9f3c0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 6c 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%l,%d,%d',new.a, |
9f3e0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
9f400 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.INSERT.ON.t1.BEG |
9f420 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INSERT.INTO.record(x,y).. |
9f440 | 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ...VALUES('after-insert',printf( |
9f460 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
9f480 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 | ..END;...CREATE.TRIGGER.r3.BEFOR |
9f4a0 | 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | E.UPDATE.ON.t1.BEGIN.....INSERT. |
9f4c0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
9f4e0 | 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | 'before-update',printf('%d,%d,%d |
9f500 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
9f520 | 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e | ..........old.a,old.b,old.c,new. |
9f540 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
9f560 | 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r4.AFTER.UPDATE.ON.t1.B |
9f580 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
9f5a0 | 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 | .........VALUES('after-update',p |
9f5c0 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
9f5e0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
9f600 | 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | .old.a,old.b,old.c,new.a,new.b,n |
9f620 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ew.c));...END;...INSERT.INTO.t1( |
9f640 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | a,b).VALUES(1,2);...DELETE.FROM. |
9f660 | 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | record;...INSERT.INTO.t1(a,b).VA |
9f680 | 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | LUES(1,2).....ON.CONFLICT(a).DO. |
9f6a0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | UPDATE.SET.c=t1.c+1;...SELECT.*. |
9f6c0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 | FROM.record;...DELETE.FROM.recor |
9f6e0 | 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | d;...INSERT.INTO.t1(a,b).VALUES( |
9f700 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a).DO.UPDAT |
9f720 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 | E.SET.c=c+1.WHERE.c<0;...SELECT. |
9f740 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4b 86 12 04 00 91 1b 20 20 43 52 45 41 54 45 20 | *.FROM.record;..K........CREATE. |
9f760 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a.INTEGER.PRIMARY.KEY,. |
9f780 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 2e 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 | b.int,.c.DEFAULT.0);...CREATE.TA |
9f7a0 | 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 | BLE.record(x.TEXT,.y.TEXT);...CR |
9f7c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e | EATE.TRIGGER.r1.BEFORE.INSERT.ON |
9f7e0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 | .t1.BEGIN.....INSERT.INTO.record |
9f800 | 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 | (x,y).........VALUES('before-ins |
9f820 | 65 72 74 27 2c 70 72 69 6e 74 66 28 20 74 72 69 6d 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 | ert',printf(.trim(1,1),new.a,new |
9f840 | 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 | .b,new.c));...END;...CREATE.TRIG |
9f860 | 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.INSERT.ON.t1.BEGIN. |
9f880 | 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 | ....INSERT.INTO.record(x,y)..... |
9f8a0 | 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 20 67 6c | VALUES('after-insert',printf(.gl |
9f8c0 | 6f 62 28 31 2c 31 29 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ob(1,1),new.a,new.b,new.c));...E |
9f8e0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
9f900 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
9f920 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 | O.record(x,y).........VALUES('be |
9f940 | 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fore-update',printf('%d,%d,%d/%d |
9f960 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | ,%d,%d',...............old.a,old |
9f980 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
9f9a0 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 | END;...CREATE.TRIGGER.r4.AFTER.U |
9f9c0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | PDATE.ON.t1.BEGIN.....INSERT.INT |
9f9e0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 | O.record(x,y).........VALUES('af |
9fa00 | 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ter-update',printf('%d,%d,%d/%d, |
9fa20 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
9fa40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c | ..............old.a,old.b,old.c, |
9fa60 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e | new.a,new.b,new.c));...END;...IN |
9fa80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 | SERT.INTO.t1(a,b).VALUES(1,2);.. |
9faa0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
9fac0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 4f 4e 46 4c 49 | TO.t1(a,b).VALUES(1,2).ON.CONFLI |
9fae0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 | CT(a).DO.UPDATE.SET.c=t1.c+1;... |
9fb00 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | SELECT.*.FROM.record;...DELETE.F |
9fb20 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
9fb40 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
9fb60 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
9fb80 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a 88 5e | ..SELECT.*.FROM.record;VACUUM..^ |
9fba0 | 86 11 04 00 91 41 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 | .....A..CREATE.TABLE.t1(a.INTEGE |
9fbc0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 2d | R.PRIMARY.KEY,.b.int,.c.DEFAULT- |
9fbe0 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 | 0);...CREATE.TABLE.record(x.TEXT |
9fc00 | 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | ,.y.TEXT);...CREATE.TRIGGER.r1.B |
9fc20 | 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.INSERT.ON.t1.BEGIN.....INS |
9fc40 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
9fc60 | 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-insert',printf('%d,% |
9fc80 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
9fca0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ;...CREATE.TRIGGER.r2.AFTER.INSE |
9fcc0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
9fce0 | 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 | ecord(x,y).....VALUES('after-ins |
9fd00 | 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 20 2a 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | ert',printf('%.*c.%d,%d',new.a,n |
9fd20 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
9fd40 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
9fd60 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
9fd80 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
9fda0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
9fdc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c | ........................old.a,ol |
9fde0 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
9fe00 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
9fe20 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
9fe40 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
9fe60 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
9fe80 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
9fea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
9fec0 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
9fee0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 2d 31 31 2c 32 | NSERT.INTO.t1(a,b).VALUES(.-11,2 |
9ff00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
9ff20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
9ff40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
9ff60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
9ff80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
9ffa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
9ffc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
9ffe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
a0000 | 0d 00 00 00 0c 01 a9 00 1b a3 17 54 13 04 11 86 0d 1b 0b ae 07 60 06 52 05 45 04 37 03 15 01 a9 | ...........T.........`.R.E.7.... |
a0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a0180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a01a0 | 00 00 00 00 00 00 00 00 00 82 68 86 2c 04 00 85 55 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ..........h.,...U..CREATE.TABLE. |
a01c0 | 74 31 28 61 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c | t1(a.char(1).PRIMARY.KEY,.b.int, |
a01e0 | 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | .c.DEFAULT.0);...INSERT.INTO.t1( |
a0200 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e | a,b).VALUES(1,2),(3,4);...WITH.n |
a0220 | 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 | x(a,b).AS.(VALUES(1,8),(2,11),(3 |
a0240 | 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 | ,1),(2,15),(1,4),(1,99))...INSER |
a0260 | 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 | T.INTO.main.t1.AS.t2(a,b).SELECT |
a0280 | 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 | .random().a,.b.FROM.nx.WHERE.tru |
a02a0 | 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | e.....ON.CONFLICT(a).DO.UPDATE.S |
a02c0 | 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 | ET.b=excluded.b,.c=t2.c+1.WHERE. |
a02e0 | 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | t2.b<excluded.b;...SELECT.*,.'x' |
a0300 | 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 61 3b 0a 82 1e 86 2b 04 00 84 41 20 20 43 | .FROM.t1.GROUP.BY.a;....+...A..C |
a0320 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a.char(1).PRIMARY |
a0340 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
a0360 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
a0380 | 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 4);...INSERT.INTO.t1(a,b).VALUES |
a03a0 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | (1,8),(2,11),(3,1).....ON.CONFLI |
a03c0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
a03e0 | 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 | ,.c=c+1.WHERE.t1.b<excluded.b;.. |
a0400 | 20 53 45 4c 45 43 54 20 2a 2c 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 41 29 20 27 | .SELECT.*,.json_group_array(A).' |
a0420 | 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 86 2a 04 00 84 19 20 | x'.FROM.t1.ORDER.BY.a;....*..... |
a0440 | 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 | .CREATE.TABLE.t1(a.char(1).PRIMA |
a0460 | 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 | RY.KEY,.b.int,.c.DEFAULT.0);...I |
a0480 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
a04a0 | 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | 3,4);...INSERT.INTO.t1(a,b).VALU |
a04c0 | 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | ES(1,8),(2,11),(3,1).....ON.CONF |
a04e0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 | LICT(a).DO.UPDATE.SET.b=excluded |
a0500 | 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b | .b,.c=c+1.WHERE.t1.b<excluded.b; |
a0520 | 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 | ...SELECT.*,.'x'.FROM.t1.GROUP.B |
a0540 | 59 20 61 3b 0a 82 09 86 29 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.a;....)......CREATE.TABLE.t1(a |
a0560 | 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 | .blobGER.PRIMARY.KEY,.b.INT,.c.D |
a0580 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | EFAULT.0);...CREATE.UNIQUE.INDEX |
a05a0 | 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | .t1x1.ON.t1(a+b);...INSERT.INTO. |
a05c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | t1(a,b).VALUES(7,8).ON.CONFLICT( |
a05e0 | 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | a+b).DO.NOTHING;...INSERT.INTO.t |
a0600 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 | 1(a,b).VALUES(8,7),(9,6).ON.CONF |
a0620 | 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 | LICT(a+b).DO.NOTHING;...SELECT.D |
a0640 | 49 53 54 49 4e 43 54 3f 20 46 52 4f 4d 20 74 31 3b 0a 82 0a 86 28 04 00 84 19 20 20 43 52 45 41 | ISTINCT?.FROM.t1;....(......CREA |
a0660 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 ce 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a.I.TEGER.PRIMARY.KE |
a0680 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 | Y,.b.int,.c.DEFAULT.0);...INSERT |
a06a0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b | .INTO.t1(a,b).VALUES(1,2),(3,4); |
a06c0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a06e0 | 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 8),(2,11),(3,1).....ON.CONFLICT( |
a0700 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 | a).DO.UPDATE.SET.b=excluded.b,.c |
a0720 | 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 31 29 3b 0a 20 20 53 45 | =.randomblob(12001-01-011);...SE |
a0740 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | LECT.*,.'x'.FROM.t1.ORDER.BY.a;. |
a0760 | 88 4a 86 27 04 00 91 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 6e 73 | .J.'......CREATE.TABLE.t1(a.INns |
a0780 | 65 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | eER.PRIMARY.KEY,.b.int,.c.DEFAUL |
a07a0 | 54 20 30 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | T.0)WITHOUT.ROWID;...CREATE.TABL |
a07c0 | 45 20 72 65 63 6f 72 64 28 78 20 43 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.CEXT,.y.TEXT);...CREA |
a07e0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
a0800 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
a0820 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
a0840 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
a0860 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
a0880 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
a08a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
a08c0 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
a08e0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
a0900 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
a0920 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
a0940 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
a0960 | 72 65 2d 75 70 64 61 74 65 27 3c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update'<printf('%d,%d,%d/%d,% |
a0980 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | d,%d',.......................old |
a09a0 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
a09c0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 | ));...END;...CREATE.TRIGGER.r4.A |
a09e0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.UPDATE.ON.t1.BEGIN.....INSE |
a0a00 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 | RT.INTO.record(x,y).........VALU |
a0a20 | 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-update',printf('%d,%d, |
a0a40 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d/%d,%d,%d',................... |
a0a60 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c | ....................old.a,old.b, |
a0a80 | 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | old.c,new.a,new.b,new.c));...END |
a0aa0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
a0ac0 | 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 | ,2);...DELETE.FROM.record;...INS |
a0ae0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 20 4f 4e 20 | ERT.INTO.t1(a,b).VALUES(1,2).ON. |
a0b00 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
a0b20 | 2b 31 3b 0a 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 | +1;.record;...DELETE.FROM.record |
a0b40 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
a0b60 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
a0b80 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELECT.* |
a0ba0 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 82 69 86 26 04 00 85 57 20 20 43 52 45 41 54 45 20 54 | .FROM.record;..i.&...W..CREATE.T |
a0bc0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 65 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INeEGER.PRIMARY.KEY,.b |
a0be0 | 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .int,.c.DEFAULT.0);...INSERT.INT |
a0c00 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a | O.t1(a,b).VALUES(1,::::::::::::: |
a0c20 | 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 01 | ::::::::::2),(3,4);...WITH.nx(a. |
a0c40 | 00 29 20 41 53 20 28 56 52 45 50 4c 41 43 45 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c | .).AS.(VREPLACE,8),(2,11),(3,1), |
a0c60 | 28 19 7f 00 35 29 47 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e | (...5)G(1,4),(1,99))...INSERT.IN |
a0c80 | 54 4f 20 6d 61 69 6e 2e 74 31 20 37 53 20 74 32 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f | TO.main.t1.7S.t2................ |
a0ca0 | 8f 8f 8f 8f 8f 8f 8f 8f 8f 8f 78 20 57 48 45 52 45 20 74 72 75 65 0a 4f 52 20 74 72 75 65 20 20 | ..........x.WHERE.true.OR.true.. |
a0cc0 | 20 20 4f 4e a0 43 4f 4e 46 4c 5e 43 54 28 61 29 20 44 4f 22 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFL^CT(a).DO"UPDATE.SET.b |
a0ce0 | 3d 65 78 63 6c 75 64 65 64 2e 62 2c 4c 4f 42 74 32 2e 63 2b 31 20 43 48 45 52 45 20 74 32 54 20 | =excluded.b,LOBt2.c+1.CHERE.t2T. |
a0d00 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 88 67 86 25 04 | *,.'x'.FROM.t1.ORDER.BY.a;..g.%. |
a0d20 | 00 91 53 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 c5 52 20 50 | ..S..CREATE.TABLE.t1(a.INTEG.R.P |
a0d40 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
a0d60 | 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 | ...CREATE.TABLE.record(x.TEXT,.y |
a0d80 | 20 54 45 58 54 29 3b 0a 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | .TEXT);..DELETE.FROM.t1.WHERE.a= |
a0da0 | 37 3b 0a 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | 7;.INSERT.ON.t1.BEGIN.....INSERT |
a0dc0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
a0de0 | 28 27 62 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 | ('bsert',printf('%d,%d,%d',new.a |
a0e00 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 | ,new.b,new.c));...END;...CREATE. |
a0e20 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.INSERT.ON.t1.BE |
a0e40 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 | GIN.....INSERT.INTO.record(x,y). |
a0e60 | 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ....VALUES('after-insert',printf |
a0e80 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
a0ea0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f | ...END;...CREATE.TRIGGER.r3.BEFO |
a0ec0 | 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | RE.UPDATE.ON.t1.BEGIN.....INSERT |
a0ee0 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0e 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
a0f00 | 28 27 62 65 66 6f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 72 65 2d | ('befo***********************re- |
a0f20 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
a0f40 | 64 27 2c 0a 20 45 59 2c 20 62 20 69 6e 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 2c | d',..EY,.b.in.strftime(1,1,1,1), |
a0f60 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 8b 3b | old.b,old.c,new.a,new.b,new.c).; |
a0f80 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
a0fa0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
a0fc0 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
a0fe0 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 00 00 01 00 2f | 'after-update',printf('%d,%..../ |
a1000 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
a1020 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
a1040 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
a1060 | 54 29 3b 0a 0a 44 45 20 49 4e 53 45 20 43 4f 2d 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | T);..DE.INSE.CO-FLICT(a).DO.UPDA |
a1080 | 54 45 20 53 45 54 20 63 3d 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | TE.SET.c=..DELETE.FROM.record;.. |
a10a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
a10c0 | 0a 20 20 20 20 4f 4e 20 43 4f 2d 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CO-FLICT(a).DO.UPDATE.SE |
a10e0 | 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f | T.c=t1.c+1;...SELECT.*.FROM.reco |
a1100 | 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | rd;...DELETE.FROM.record;...INSE |
a1120 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
a1140 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | ON.CONFLICT(a).DO.UPDATE.SET.c=c |
a1160 | 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | +1.WHERE.c<0;...SELECT.*.FROM.re |
a1180 | 63 6f 72 64 3b 0a 82 7a 86 24 04 00 85 79 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | cord;..z.$...y..CREATE.TABLE.t1( |
a11a0 | 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 69 6e 74 2c 20 63 20 | a.INTEGER.PRIMARY.KEY,.b,int,.c. |
a11c0 | 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | DEFAULT.0);...INSERT.INTO.t1(a,b |
a11e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 | ).VALUES(1,2),(3,4);...WITH.nx(a |
a1200 | 2c 62 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 | ,b).AS.(VALUES(1,8),(2,11),(3,1) |
a1220 | 2c 28 32 2c 31 35 29 2c 28 31 2c 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 | ,(2,15),(1,4),(1,99))...INSERT.I |
a1240 | 4e 54 4f 20 6d 61 69 6e 2e 74 31 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 | NTO.main.t1.AS.t2(a,b).SELECT.ra |
a1260 | 6e 64 6f 6d 28 29 20 61 2c 20 62 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 | ndom().a,.b.FROM.nx.WHERE.true.. |
a1280 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
a12a0 | 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e | b=excluded.b,.c=t2.c+1.WHERE.t2. |
a12c0 | 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f | b<excluded.b;...SELECT.*,.group_ |
a12e0 | 63 6f 6e 63 61 74 28 31 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 | concat(1,1).'x'.FROM.t1.GROUP.BY |
a1300 | 20 61 3b 0a 88 4c 86 23 04 00 91 1d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a;..L.#......CREATE.TABLE.t1(a. |
a1320 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 69 6e 74 2c 20 63 20 44 45 | INTEGER.PRIMARY.KEY,.b,int,.c.DE |
a1340 | 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 | FAULT.0);...CREATE.TABLE.record( |
a1360 | 78 20 54 45 58 54 2c 20 79 2c 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | x.TEXT,.y,TEXT);...CREATE.TRIGGE |
a1380 | 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | R.r1.BEFORE.INSERT.ON.t1.BEGIN.. |
a13a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 | ...INSERT.INTO.record(x,y)...... |
a13c0 | 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 | ...VALUES('before-insert',printf |
a13e0 | 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | ('%d,%d,%d',new.a,new.b,new.c)); |
a1400 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r2.AFTE |
a1420 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.INSERT.ON.t1.BEGIN.....INSERT. |
a1440 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 | INTO.record(x,y).....VALUES('aft |
a1460 | 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 | er-insert',printf('%d,%d,%d',new |
a1480 | 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 | .a,new.b,new.c));...END;...CREAT |
a14a0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | E.TRIGGER.r3.BEFORE.UPDATE.ON.t1 |
a14c0 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
a14e0 | 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 | y).........VALUES('before-update |
a1500 | 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',printf('%d,%d,%d/%d,%d,%d',... |
a1520 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | ............................old. |
a1540 | 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,o,d.b,old.c,new.a,new.b,new.c) |
a1560 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
a1580 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
a15a0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
a15c0 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
a15e0 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
a1600 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
a1620 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
a1640 | 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | EXPLAIN...INSERT.INTO.t1(a,b).VA |
a1660 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
a1680 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a16a0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
a16c0 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | SET.c=t1.c+1;...SELd;...DELETE.F |
a16e0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ROM.record;...INSERT.INTO.t1(a,b |
a1700 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ).VALUES(1,2).....ON.CONFLICT(a) |
a1720 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a | .DO.UPDATE.SET.c=c+1.WHERE.c<0;. |
a1740 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 88 4b 86 22 04 00 91 1b 20 20 43 52 | ..SELECT.*.FROM.reco.K."......CR |
a1760 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t1(a.INTEGER.PRIMARY. |
a1780 | 4b 45 59 2c 20 62 2c 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 | KEY,.b,int,.c.DEFAULT.0);...CREA |
a17a0 | 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b | TE.TABLE.record(x.TEXT,.y.TEXT); |
a17c0 | 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 | ...CREATE.TRIGGER.r1.BEFORE.INSE |
a17e0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 | RT.ON.t1.BEGIN.....INSERT.INTO.r |
a1800 | 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 | ecord(x,y).........VALUES('befor |
a1820 | 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | e-insert',printf('%d,%d,%d',new. |
a1840 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
a1860 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.INSERT.ON.t1.B |
a1880 | 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 | EGIN.....INSERT.INTO.record(x,y) |
a18a0 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 | .....VALUES('after-insert',print |
a18c0 | 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | f('%d,%d,%d',new.a,new.b,new.c)) |
a18e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 | ;...END;...CREATE.TRIGGER.r3.BEF |
a1900 | 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.UPDATE.ON.t1.BEGIN.....INSER |
a1920 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
a1940 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
a1960 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e | %d/%d,%d,%d',...............old. |
a1980 | 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 | a,old.b,old.c,new.a,new.b,new.c) |
a19a0 | 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 | );...END;...CREATE.TRIGGER.r4.AF |
a19c0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | TER.UPDATE.ON.t1.BEGIN.....INSER |
a19e0 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
a1a00 | 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 | S('after-update',printf('%d,%d,% |
a1a20 | 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d/%d,%d,%d',.................... |
a1a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...................old.a,old.b,o |
a1a60 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b | ld.c,new.a,new.b,new.c));...END; |
a1a80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(c,b).VALUES(1, |
a1aa0 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
a1ac0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 4f 4e 20 43 | RT.INTO.t1(a,b).VALUES(1,2).ON.C |
a1ae0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
a1b00 | 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...SELECT.*.FROM.record;...DEL |
a1b20 | 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ETE.FROM.record;...INSERT.INTO.t |
a1b40 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(1,2).....ON.CONFLI |
a1b60 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | CT(a).DO.UPDATE.SET.c=c+1.WHERE. |
a1b80 | 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 | c<0;...SELECT.*.FROM.record;VACU |
a1ba0 | 55 4d 0a 88 59 86 21 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | UM..Y.!...7..CREATE.TABLE.t1(a.I |
a1bc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 43 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,Cc.DEF |
a1be0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
a1c00 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
a1c20 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
a1c40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
a1c60 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
a1c80 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
a1ca0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
a1cc0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
a1ce0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
a1d00 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
a1d20 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
a1d40 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
a1d60 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
a1d80 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
a1da0 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
a1dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 | ...........................old.a |
a1de0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
a1e00 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
a1e20 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
a1e40 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
a1e60 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
a1e80 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
a1ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
a1ec0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
a1ee0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
a1f00 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
a1f20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
a1f40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
a1f60 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
a1f80 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
a1fa0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
a1fc0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
a1fe0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
a2000 | 0d 00 00 00 0b 01 36 00 1c 11 1b 0c 1a 07 19 02 17 f5 16 e8 12 81 0e 2d 09 e0 05 83 01 36 00 00 | ......6................-.....6.. |
a2020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 86 37 04 00 91 17 20 20 | .......................I.7...... |
a2140 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t1(a..NTEGER.PRIMAR |
a2160 | 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 | Y.KEY,.b.int,.c.DEFAULT.0);...CR |
a2180 | 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 | EATE.TABLE.record(x.TEXT,.y.TEXT |
a21a0 | 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e | );...CREATE.TRIGGER.r1.BEFORE.IN |
a21c0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
a21e0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
a2200 | 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 | ore-insert',printf('%d,%d,%d',ne |
a2220 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 | w.a,new.b,new.c));...END;...CREA |
a2240 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.INSERT.ON.t1 |
a2260 | 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c | .BEGIN.....INSERT.INTO.record(x, |
a2280 | 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 | y).....VALUES('after-insert',pri |
a22a0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%d,%d,%d',new.a,new.b,new.c |
a22c0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 | ));...END;...CREATE.TRIGGER.r3.B |
a22e0 | 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | EFORE.UPDATE.ON.t1.BEGIN.....INS |
a2300 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
a2320 | 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | UES('before-update',printf('%d,% |
a2340 | 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c | d,%d/%d,%d,%d',...............ol |
a2360 | 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e | d.a,old.b,old.c,new.a,new.b,new. |
a2380 | 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 | c));...END;...CREATE.TRIGGER.r4. |
a23a0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 | AFTER.UPDATE.ON.t1.BEGIN.....INS |
a23c0 | 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c | ERT.INTO.record(x,y).........VAL |
a23e0 | 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 | UES('after-update',printf('%d,%d |
a2400 | 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d/%d,%d,%d',.................. |
a2420 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | .....................old.a,old.b |
a2440 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
a2460 | 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | D;...INSERT.INTO.t1(a,b).VALUES( |
a2480 | 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | 1,2);...DELETE.FROM.record;...IN |
a24a0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
a24c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ..ON.CONFLICT(a).DO.UPDATE.SET.a |
a24e0 | 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | =t1.c+1;...SELECT.*.FROM.record; |
a2500 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
a2520 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
a2540 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 63 2b 31 20 | CONFLICT(a).DO.UPDATE.SET.a=c+1. |
a2560 | 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 | WHERE.c<0;...SELECT.*.FROM.recor |
a2580 | 64 3b 0a 88 59 86 36 04 00 91 37 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 | d;..Y.6...7..CREATE.TABLE.t1(a.. |
a25a0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
a25c0 | 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 | AULT.0);...CREATE.TABLE.record(x |
a25e0 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
a2600 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
a2620 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
a2640 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 | ..VALUES('before-insert',printf( |
a2660 | 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | '%d,%d,%d',new.a,new.b,new.c));. |
a2680 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r2.AFTER |
a26a0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .INSERT.ON.t1.BEGIN.....INSERT.I |
a26c0 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | NTO.record(x,y).....VALUES('afte |
a26e0 | 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e | r-insert',printf('%d,%d,%d',new. |
a2700 | 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | a,new.b,new.c));...END;...CREATE |
a2720 | 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | .TRIGGER.r3.BEFORE.UPDATE.ON.t1. |
a2740 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
a2760 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 | ).........VALUES('before-update' |
a2780 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 | ,printf('%d,%d,%d/%d,%d,%d',.... |
a27a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 22 61 22 2c 22 62 22 | ........................."a","b" |
a27c0 | 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 | ,old.b,old.c,new.a,new.b,new.c)) |
a27e0 | 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 | ;...END;...CREATE.TRIGGER.r4.AFT |
a2800 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 | ER.UPDATE.ON.t1.BEGIN.....INSERT |
a2820 | 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 | .INTO.record(x,y).........VALUES |
a2840 | 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 | ('after-update',printf('%d,%d,%d |
a2860 | 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | /%d,%d,%d',..................... |
a2880 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c | ..................old.a,old.b,ol |
a28a0 | 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | d.c,new.a,new.b,new.c));...END;. |
a28c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t1(a,b).VALUES(1,2 |
a28e0 | 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 | );...DELETE.FROM.record;...INSER |
a2900 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f | T.INTO.t1(a,b).VALUES(1,2).....O |
a2920 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 | N.CONFLICT(a).DO.UPDATE.SET.c=t1 |
a2940 | 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | .c+1;...SELECT.*.FROM.record;... |
a2960 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | DELETE.FROM.record;...INSERT.INT |
a2980 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | O.t1(a,b).VALUES(1,2).....ON.CON |
a29a0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 | FLICT(a).DO.UPDATE.SET.c=c+1.WHE |
a29c0 | 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | RE.c<0;...SELECT.*.FROM.record;. |
a29e0 | 88 49 86 35 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 | .I.5......CREATE.TABLE.t1(a..NTE |
a2a00 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
a2a20 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
a2a40 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
a2a60 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
a2a80 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
a2aa0 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
a2ac0 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
a2ae0 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
a2b00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
a2b20 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
a2b40 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
a2b60 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
a2b80 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
a2ba0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
a2bc0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
a2be0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
a2c00 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c | ........................old.a,o, |
a2c20 | 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 | d.b,old.c,new.a,new.b,new.c));.. |
a2c40 | 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 | .END;...CREATE.TRIGGER.r4.AFTER. |
a2c60 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | UPDATE.ON.t1.BEGIN.....INSERT.IN |
a2c80 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | TO.record(x,y).........VALUES('a |
a2ca0 | 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 | fter-update',printf('%d,%d,%d/%d |
a2cc0 | 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d,%d',........................ |
a2ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 | ...............old.a,old.b,old.c |
a2d00 | 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 | ,new.a,new.b,new.c));...END;...I |
a2d20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a | NSERT.INTO.t1(a,b).VALUES(1,2);. |
a2d40 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
a2d60 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
a2d80 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b | ONFLICT(a).DO.UPDATE.SET.c=t1.c+ |
a2da0 | 31 3b 0a 20 20 53 45 4c 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | 1;...SELd;...DELETE.FROM.record; |
a2dc0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a2de0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
a2e00 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
a2e20 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 50 86 34 04 00 91 25 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..P.4...%..CREATE.TA |
a2e40 | 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a..NTEGER.PRIMARY.KEY,.b. |
a2e60 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
a2e80 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
a2ea0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
a2ec0 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
a2ee0 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
a2f00 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
a2f20 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
a2f40 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
a2f60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
a2f80 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
a2fa0 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
a2fc0 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 44 45 4c | ;...CREATE.TRIGGER.r3.BEFORE.DEL |
a2fe0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ETE.ON.t1.BEGIN.....INSERT.INTO. |
a3000 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
a3020 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
a3040 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | d,%d',...............old.a,old.b |
a3060 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
a3080 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
a30a0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
a30c0 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
a30e0 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
a3100 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
a3120 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
a3140 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 45 58 50 4c 41 49 4e | w.a,new.b,new.c));...END;EXPLAIN |
a3160 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a3180 | 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 | 2);...DELETE.FROM.record;...INSE |
a31a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 | RT.INTO.t1(a,b).VALUES(1,2)..... |
a31c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 | ON.CONFLICT(a).DO.UPDATE.SET.c=t |
a31e0 | 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 | 1.c+1;...SELECT.*.FROM.record;.. |
a3200 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | .DELETE.FROM.record;...INSERT.IN |
a3220 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f | TO.t1(a,b).VALUES(1,2).....ON.CO |
a3240 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 | NFLICT(a).DO.UPDATE.SET.c=c+1.WH |
a3260 | 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | ERE.c<0;...SELECT.*.FROM.record; |
a3280 | 0a 88 63 86 33 04 00 91 4b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 | ..c.3...K..CREATE.TABLE.t1(a..NT |
a32a0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 | EGER.PRIMARY.KEY,.b.int,.c.DEFAU |
a32c0 | 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 | LT.0);...CREATE.TABLE.record(x.T |
a32e0 | 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | EXT,.y.TEXT);...CREATE.TRIGGER.r |
a3300 | 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | 1.BEFORE.INSERT.ON.t1.BEGIN..... |
a3320 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 | INSERT.INTO.record(x,y)......... |
a3340 | 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 | VALUES('before-insert',printf('% |
a3360 | 64 2c 25 20 2a 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | d,%.*%d',new.a,new.b,new.c));... |
a3380 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 | END;...CREATE.TRIGGER.r2.AFTER.I |
a33a0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 | NSERT.ON.t1.BEGIN.....INSERT.INT |
a33c0 | 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d | O.record(x,y).....VALUES('after- |
a33e0 | 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c | insert',printf('%d,%d,%d',new.a, |
a3400 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
a3420 | 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | RIGGER.r3.BEFORE.UPDATE.ON.t1.BE |
a3440 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
a3460 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 | ........VALUES('before-update',p |
a3480 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 | rintf('%d,%d,%d/%d,%d,%d',...... |
a34a0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
a34c0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
a34e0 | 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 | ..END;...CREATE.TRIGGER.r4.AFTER |
a3500 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 | .UPDATE.ON.t1.BEGIN.....INSERT.I |
a3520 | 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 | NTO.record(x,y).........VALUES(' |
a3540 | 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 | after-update',printf('%d,%d,%d/% |
a3560 | 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d',....................... |
a3580 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e | ................old.a,old.b,old. |
a35a0 | 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 | c,new.a,new.b,new.c));...END;... |
a35c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b | INSERT.INTO.t1(a,b).VALUES(1,2); |
a35e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 | ...DELETE.FROM.record;...INSERT. |
a3600 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 | INTO.t1(a,b).VALUES(1,2).....ON. |
a3620 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 | CONFLICT(a).DO.UPDATE.SET.c=t1.c |
a3640 | 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 | +1;...SELECT.*.FROM.record;...DE |
a3660 | 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LETE.FROM.record;...INSERT.INTO. |
a3680 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 2e 32 30 30 31 2d 30 31 2d 30 31 29 0a 20 20 | t1(a,b).VALUES(1,.2001-01-01)... |
a36a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
a36c0 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
a36e0 | 72 65 63 6f 72 64 3b 0a 82 09 86 32 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | record;....2......CREATE.TABLE.t |
a3700 | 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 55 4e 49 51 55 | 1(a..NTEGER.PRIMARY.KEY,.b.UNIQU |
a3720 | 45 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | E.DEFAULT.0);...CREATE.UNIQUE.IN |
a3740 | 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | DEX.t1x1.ON.t1(a+b);...INSERT.IN |
a3760 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 | TO.t1(a,b).VALUES(7,8).ON.CONFLI |
a3780 | 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | CT(a+b).DO.NOTHING;...INSERT.INT |
a37a0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 | O.t1(a,b).VALUES(8,7),(9,6).ON.C |
a37c0 | 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 | ONFLICT(a+b).DO.NOTHING;...SELEC |
a37e0 | 54 20 44 49 53 54 49 4e 43 54 3f 20 46 52 4f 4d 20 74 31 3b 0a 82 09 86 31 04 00 84 17 20 20 43 | T.DISTINCT?.FROM.t1;....1......C |
a3800 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a..NTEGER.PRIMARY |
a3820 | 20 4b 45 59 2c 20 62 20 55 4e 49 51 55 45 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 | .KEY,.b.UNIQUE.DEFAULT.0);...CRE |
a3840 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 | ATE.UNIQUE.INDEX.t1x1.ON.t1(a+b) |
a3860 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 | ;...INSERT.INTO.t1(a,b).VALUES(7 |
a3880 | 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | ,8).ON.CONFLICT(a+b).DO.NOTHING; |
a38a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c | ...INSERT.INTO.t1(a,b).VALUES(8, |
a38c0 | 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 | 7),(9,6).ON.CONFLICT(a+b).DO.NOT |
a38e0 | 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 | HING;...SELECT.DISTINCT*.FROM.t1 |
a3900 | 3b 0a 82 01 86 30 04 00 84 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e | ;....0......CREATE.TABLE.t1(a..N |
a3920 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 | TEGER.PRIMARY.KEY,.b.INT,.c.DEFA |
a3940 | 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ULT.0);...CREATE.UNIQUE.INDEX.t1 |
a3960 | 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | x1.ON.t1(a+b);...INSERT.INTO.t1( |
a3980 | 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 | a,b).VALUES(7,8).ON.CONFLICT(a+b |
a39a0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ).DO.NOTHING;...INSERT.INTO.t1(a |
a39c0 | 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ,b).VALUES(8,7),(9,6).ON.CONFLIC |
a39e0 | 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 41 20 46 52 | T(a+b).DO.NOTHING;...SELECT.A.FR |
a3a00 | 4f 4d 20 74 31 3b 0a 82 01 86 2f 04 00 84 07 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | OM.t1;..../......CREATE.TABLE.t1 |
a3a20 | 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 | (a..NTEGER.PRIMARY.KEY,.b.INT,.c |
a3a40 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .DEFAULT.0);...CREATE.UNIQUE.IND |
a3a60 | 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | EX.t1x1.ON.t1(a+b);...INSERT.INT |
a3a80 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | O.t1(a,b).VALUES(7,8).ON.CONFLIC |
a3aa0 | 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | T./*.*/DO.NOTHING;...INSERT.INTO |
a3ac0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 4f 4e 20 43 4f | .t1(a,b).VALUES(8,7),(9,6).ON.CO |
a3ae0 | 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 | NFLICT./*.*/DO.NOTHING;...SELECT |
a3b00 | 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 82 01 86 2e 04 00 84 07 20 20 43 52 45 41 54 45 20 54 41 42 | .*.FROM.t1;...........CREATE.TAB |
a3b20 | 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 | LE.t1(a..NTEGER.PRIMARY.KEY,.b.I |
a3b40 | 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 20 2f 2a 20 2a | NT,.c.DEFAULT.0);...CREATE../*.* |
a3b60 | 2f 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 | /.INDEX.t1x1.ON.t1(a+b);...INSER |
a3b80 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f | T.INTO.t1(a,b).VALUES(7,8).ON.CO |
a3ba0 | 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 | NFLICT./*.*/DO.NOTHING;...INSERT |
a3bc0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 | .INTO.t1(a,b).VALUES(8,7),(9,6). |
a3be0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 | ON.CONFLICT./*.*/DO.NOTHING;...S |
a3c00 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 87 6b 86 2d 04 00 8f 5b 20 20 43 52 45 41 54 | ELECT.*.FROM.t1;..k.-...[..CREAT |
a3c20 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 64 4e 54 45 47 13 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a.dNTEG.R.PRIMARY.KEY |
a3c40 | 2c 20 79 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 00 00 00 80 20 43 00 45 41 54 45 20 | ,.y.int,.c.DEFAULT.0.....C.EATE. |
a3c60 | 54 41 42 00 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 10 54 45 58 54 29 3b 0a 20 20 | TAB.E.record(x.TEXT,.y.TEXT);... |
a3c80 | 43 52 45 41 54 45 20 54 52 49 47 41 45 52 20 72 31 20 42 45 46 4f ff 7f 20 49 4e 53 45 7b 54 20 | CREATE.TRIGAER.r1.BEFO...INSE{T. |
a3ca0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f | ON.t1.BEGIN.....INSERT.INTO.reco |
a3cc0 | 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 5e 6f 72 65 2d 69 | rd(x,y).........VALUES('be^ore-i |
a3ce0 | 6e 73 65 72 74 27 13 70 72 69 6e 74 66 28 27 25 64 2c 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 | nsert'.printf('%d,.END;...CREATE |
a3d00 | 20 54 52 49 17 47 45 52 20 54 20 4f 4f 0f 74 31 20 42 45 47 49 4e 0a 20 00 00 00 4b 4e 53 45 52 | .TRI.GER.T.OO.t1.BEGIN.....KNSER |
a3d20 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 | T.INTO.record(x,y).....VALUES('a |
a3d40 | 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e | fter-insert',printf('%d,%d,%d',n |
a3d60 | 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 20 54 52 49 c7 47 45 52 20 72 33 20 42 45 10 00 bf bf | ew.a,new.b,new.TRI.GER.r3.BE.... |
a3d80 | bf bf bf bf bf bf bf bf bf bf bf bf bf bf bf bf bf bf bf 46 4f 52 45 20 55 50 44 41 54 45 20 4f | ...................FORE.UPDATE.O |
a3da0 | ca ca 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e ac 45 52 54 20 49 4e 54 4f 20 72 65 63 | ..N.t1.BEGIN.....IN.ERT.INTO.rec |
a3dc0 | 6f 72 00 40 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | or.@x,y).........VA.t1(a,b).VALU |
a3de0 | 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 64 2c 25 64 2c 25 64 2f 25 64 2c 25 20 20 20 | ES(1,2);...DELETEd,%d,%d/%d,%... |
a3e00 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 7f 1a 62 | ...old.a,old.b,old.c,new.a,ne..b |
a3e20 | 2c 6e 65 77 2e 63 29 29 3b 0a 21 20 45 4e 44 3b 0e 20 20 43 5f 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));.!.END;...C_EATE.TRIGGE |
a3e40 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 fd 54 45 20 4f 4e 20 74 31 20 5a 45 78 2c 79 29 2a 20 | R.r4.AFTER.UPD.TE.ON.t1.ZEx,y)*. |
a3e60 | 20 20 20 20 20 20 20 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | .......after-update',printf('%d, |
a3e80 | 25 65 2c 25 64 2f 25 64 2c 25 64 2c 25 00 00 00 00 58 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %e,%d/%d,%d,%....X.............. |
a3ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 64 | ..................json_test1(1)d |
a3ec0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 6d 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 12 3b 0a 20 20 | .b,old.c,nem.a,new.b,new.c).;... |
a3ee0 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 26 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT&INTO.t1(a,b).VALUE |
a3f00 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
a3f20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
a3f40 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 20 53 45 54 20 63 3d 74 31 2e 63 2b | ....ON.CONFLICT(a).D.SET.c=t1.c+ |
a3f60 | 31 3b 0a 20 20 4f 00 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c | 1;...O.LECT.*.FROM.record;...DEL |
a3f80 | 45 54 45 20 46 52 4f 4d 20 72 65 ff ff 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4e ff 74 | ETE.FROM.re..rd;...INSERT.INTN.t |
a3fa0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 32 2c 32 29 0a 19 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 1(a,b).VALUES(2,2).....ON.CONFLI |
a3fc0 | 43 54 28 61 29 20 44 00 10 00 00 ff 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 45 58 54 | CT(a).D.....ATE.SET.c=c+1.WHEEXT |
a3fe0 | 52 45 54 45 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 64 6f 72 64 3b 0a | RETE<0;...SELECT.*.FROM.redord;. |
a4000 | 0d 00 00 00 14 00 72 00 1b ad 17 60 16 4a 15 3c 14 25 13 0d 11 fb 10 ed 0f cf 0e b9 0d 99 0c 83 | ......r....`.J.<.%.............. |
a4020 | 0b 75 0a 67 08 fb 07 ed 06 df 05 d1 04 bf 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .u.g...........r................ |
a4040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
a4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 88 49 86 4b 04 00 91 17 20 20 43 52 45 41 | ...................I.K......CREA |
a4080 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 43 48 45 43 4b 28 31 29 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t1(a,CHECK(1)PRIMARY.KE |
a40a0 | 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 | Y,.b.int,.c.DEFAULT.0);...CREATE |
a40c0 | 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 | .TABLE.record(x.TEXT,.y.TEXT);.. |
a40e0 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 | .CREATE.TRIGGER.r1.BEFORE.INSERT |
a4100 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
a4120 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 73 65 72 74 27 2c | ord(x,y).........VALUES('bsert', |
a4140 | 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | printf('%d,%d,%d',new.a,new.b,ne |
a4160 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
a4180 | 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 2.AFTER.INSERT.ON.t1.BEGIN.....I |
a41a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 | NSERT.INTO.record(x,y).....VALUE |
a41c0 | 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 71 2c 25 64 2c 25 | S('after-insert',printf('%q,%d,% |
a41e0 | 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | d',new.a,new.b,new.c));...END;.. |
a4200 | 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 | .CREATE.TRIGGER.r3.BEFORE.UPDATE |
a4220 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
a4240 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d | ord(x,y).........VALUES('before- |
a4260 | 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 | update',printf('%d,%d,%d/%d,%d,% |
a4280 | 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | d',.......................old.a, |
a42a0 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
a42c0 | 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 | ...END;...CREATE.TRIGGER.r4.AFTE |
a42e0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 | R.UPDATE.ON.t1.BEGIN.....INSERT. |
a4300 | 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 | INTO.record(x,y).........VALUES( |
a4320 | 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f | 'after-update',printf('%d,%d,%d/ |
a4340 | 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d',...................... |
a4360 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
a4380 | 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 | .c,new.a,new.b,new.c));...END;.. |
a43a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
a43c0 | 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 | ;...DELETE.FROM.record;...INSERT |
a43e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e | .INTO.t1(a,b).VALUES(1,2).....ON |
a4400 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e | .CONFLICT(a).DO.UPDATE.SET.c=t1. |
a4420 | 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 | c+1;...SELECT.*.FROM.record;...D |
a4440 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
a4460 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
a4480 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 | LICT(a).DO.UPDATE.SET.c=c+1.WHER |
a44a0 | 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 82 | E.c<0;...SELECT.*.FROM.record;.. |
a44c0 | 0e 86 4a 04 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 | ..J...!..CREATE.TABLE.t1(a..NTEG |
a44e0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 | ER.PRIMARY.KEY,.b,int,.c.DEFAULT |
a4500 | 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | .0);...INSERT.INTO.t1(a,b).VALUE |
a4520 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | S(1,2),(3,4);...INSERT.INTO.t1(a |
a4540 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 | ,b).VALUES(1,8),(2,11),(3,1).... |
a4560 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
a4580 | 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 | excluded.b,.c=c+1.WHERE.t1.b<exc |
a45a0 | 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | luded.b;...SELECT.*,.'x'.FROM.t1 |
a45c0 | 20 4f 52 44 45 52 20 42 59 20 69 6e 74 20 61 3b 0a 82 0a 86 49 04 00 84 19 20 20 43 52 45 41 54 | .ORDER.BY.int.a;....I......CREAT |
a45e0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a..NTEGER.PRIMARY.KEY |
a4600 | 2c 20 62 2c 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,.b,int,.c.DEFAULT.0);...INSERT. |
a4620 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a | INTO.t1(a,b).VALUES(1,2),(3,4);. |
a4640 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 | ..INSERT.INTO.t1(a,b).VALUES(1,8 |
a4660 | 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ),(2,11),(3,1).....ON.CONFLICT(a |
a4680 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d | ).DO.UPDATE.SET.b=excluded.b,.c= |
a46a0 | 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c | c+1.WHERE.t1.b<excluded.b;...SEL |
a46c0 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 | ECT.*,.'x'.FROM.t1.ORDER.BY.a,b. |
a46e0 | 0a 86 48 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 | ..H......CREATE.TABLE.t1(a..NTEG |
a4700 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 69 6e 74 2c 20 63 20 44 45 46 41 20 61 2c | ER.PRIMARY.KEY,.b,int,.c.DEFA.a, |
a4720 | 62 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | b0);...INSERT.INTO.t1(a,b).VALUE |
a4740 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | S(1,2),(3,4);...INSERT.INTO.t1(a |
a4760 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 | ,b).VALUES(1,8),(2,11),(3,1).... |
a4780 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
a47a0 | 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 | excluded.b,.c=c+1.WHERE.t1.b<exc |
a47c0 | 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | luded.b;...SELECT.*,.'x'.FROM.t1 |
a47e0 | 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 0a 86 47 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 | .ORDER.BY.a;....G......CREATE.TA |
a4800 | 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a..NTEGER.PRIMARY.KEY,.b. |
a4820 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
a4840 | 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(c,b).VALUES(1,2),(3,4);...IN |
a4860 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
a4880 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
a48a0 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
a48c0 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
a48e0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 68 86 46 04 | *,.'x'.FROM.t1.ORDER.BY.a,b.h.F. |
a4900 | 00 85 55 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 | ..U..CREATE.TABLE.t1(a..NTEGER.P |
a4920 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
a4940 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a4960 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 57 49 54 48 20 6e 78 28 61 2c 62 29 20 41 53 20 28 56 41 4c | 2),(3,4);...WITH.nx(a,b).AS.(VAL |
a4980 | 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 2c 28 32 2c 31 35 29 2c 28 31 2c | UES(1,8),(2,11),(3,1),(2,15),(1, |
a49a0 | 34 29 2c 28 31 2c 39 39 29 29 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 6d 61 69 6e 2e 74 31 | 4),(1,99))...INSERT.INTO.main.t1 |
a49c0 | 20 41 53 20 74 32 28 61 2c 62 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 62 | .AS.t2(a,b).SELECT.random().a,.b |
a49e0 | 20 46 52 4f 4d 20 6e 78 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | .FROM.nx.WHERE.true.....ON.CONFL |
a4a00 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e | ICT(a).DO.UPDATE.SET.b=excluded. |
a4a20 | 62 2c 20 63 3d 74 32 2e 63 2b 31 20 57 48 45 52 45 20 74 32 2e 62 3c 65 78 63 6c 75 64 65 64 2e | b,.c=t2.c+1.WHERE.t2.b<excluded. |
a4a40 | 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 | b;...SELECT.*,.'x'.FROM.t1.GROUP |
a4a60 | 20 42 59 20 61 3b 0a 82 0a 86 45 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | .BY.a;....E......CREATE.TABLE.t1 |
a4a80 | 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 | (a..NTEGER.PRIMARY.KEY,.b.int,.c |
a4aa0 | 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .DEFAULT.0);...INSERT.INTO.t1(a, |
a4ac0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 | b).VALUES(1,2),(3,4);...INSERT.I |
a4ae0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 33 2c 31 31 29 2c 28 | NTO.t1(a,b).VALUES(1,8),(3,11),( |
a4b00 | 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 3,1).....ON.CONFLICT(a).DO.UPDAT |
a4b20 | 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 | E.SET.b=excluded.b,.c=c+1.WHERE. |
a4b40 | 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | t1.b<excluded.b;...SELECT.*,.'x' |
a4b60 | 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 0a 86 44 04 00 84 19 20 20 43 | .FROM.t1.ORDER.BY.a,b...D......C |
a4b80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t1(a..NTEGER.PRIMARY |
a4ba0 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 | .KEY,.b.int,.c.DEFAULT.0);...INS |
a4bc0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
a4be0 | 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 4);...INSERT.INTO.t1(a,b).VALUES |
a4c00 | 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | (1,8),(2,11),(3,1).....ON.CONFLI |
a4c20 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 | CT(a).DO.UPDATE.SET.b=excluded.b |
a4c40 | 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 | ,.c=c+1.WHERE.t1.b<excluded.b;.. |
a4c60 | 20 53 45 4c 45 43 54 20 61 62 73 28 31 29 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 | .SELECT.abs(1).FROM.t1.ORDER.BY. |
a4c80 | 61 2c 62 82 12 86 43 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 | a,b...C...)..CREATE.TABLE.t1(a.. |
a4ca0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 | NTEGER.PRIMARY.KEY,.b.int,.c.DEF |
a4cc0 | 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | AULT.0);...INSERT.INTO.t1(a,b).V |
a4ce0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ALUES(1,2),(3,4);...INSERT.INTO. |
a4d00 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 | t1(a,b).VALUES(1,8),(2,11),(3,1) |
a4d20 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(a).DO.UPDATE.SE |
a4d40 | 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 | T.b=excluded.b,.c=c+1.WHERE.t1.b |
a4d60 | 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 40 31 | <excluded.b;...SELECT.DISTINCT@1 |
a4d80 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 1c 86 42 04 00 84 | .'x'.FROM.t1.ORDER.BY.a,b...B... |
a4da0 | 3d 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 | =..CREATE.TABLE.t1(a..NTEGER.PRI |
a4dc0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
a4de0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
a4e00 | 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ,(3,4);...INSERT.INTO.t1(a,b).VA |
a4e20 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f | LUES(1,8),(2,11),(3,1).....ON.CO |
a4e40 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 | NFLICT(a).DO.UPDATE.SET.b=exclud |
a4e60 | 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e | ed.b,.c=c+1.WHERE.t1.b<excluded. |
a4e80 | 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 6c 69 6b 65 6c 79 28 31 29 | b;...SELECT.DISTINCT*,.likely(1) |
a4ea0 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 12 86 41 04 00 84 | .'x'.FROM.t1.ORDER.BY.a;....A... |
a4ec0 | 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 | )..CREATE.TABLE.t1(a..NTEGER.PRI |
a4ee0 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 | MARY.KEY,.b.int,.c.DEFAULT.0);.. |
a4f00 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
a4f20 | 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ,(3,4);...INSERT.INTO.t1(a,b).VA |
a4f40 | 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f | LUES(1,8),(2,11),(3,1).....ON.CO |
a4f60 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 | NFLICT(a).DO.UPDATE.SET.b=exclud |
a4f80 | 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e | ed.b,.c=c+1.WHERE.t1.b<excluded. |
a4fa0 | 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | b;...SELECT.DISTINCT*,.'x'.FROM. |
a4fc0 | 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 1a 86 40 04 00 84 39 20 20 43 52 45 41 54 45 20 | t1.ORDER.BY.a,b...@...9..CREATE. |
a4fe0 | 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t1(a..NTEGER.PRIMARY.KEY,. |
a5000 | 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | b.int,.c.DEFAULT.0);...INSERT.IN |
a5020 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 | TO.t1(a,b).VALUES(1,2),(3,4);... |
a5040 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c | INSERT.INTO.t1(a,b).VALUES(1,8), |
a5060 | 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | (2,11),(3,1).....ON.CONFLICT(a). |
a5080 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b | DO.UPDATE.SET.b=excluded.b,.c=c+ |
a50a0 | 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 | 1.WHERE.t1.b<excluded.b;...SELEC |
a50c0 | 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | T.DISTINCT*,.'x'.FROM.t1.ORDER.B |
a50e0 | 59 20 61 2c 20 22 61 22 2c 22 62 22 62 82 0a 86 3f 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 | Y.a,."a","b"b...?......CREATE.TA |
a5100 | 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a..NTEGER.PRIMARY.KEY,.b. |
a5120 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
a5140 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
a5160 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
a5180 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
a51a0 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
a51c0 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
a51e0 | 40 31 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 0e 86 3e 04 | @1.'x'.FROM.t1.ORDER.BY.a,b...>. |
a5200 | 00 84 21 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 | ..!..CREATE.TABLE.t1(a..NTEGER.P |
a5220 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.int,.c.DEFAULT.0); |
a5240 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a5260 | 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | 2),(3,4);...INSERT.INTO.t1(a,b). |
a5280 | 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 | VALUES(1,8),(2,11),(3,1).....ON. |
a52a0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c | CONFLICT(a).DO.UPDATE.SET.b=excl |
a52c0 | 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 | uded.b,.c=c+1.WHERE.t1.b<exclude |
a52e0 | 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 32 20 60 61 60 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | d.b;...SELECT.2.`a`,.'x'.FROM.t1 |
a5300 | 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 14 86 3d 04 00 84 2d 20 20 43 52 45 41 54 45 20 54 41 | .ORDER.BY.a;....=...-..CREATE.TA |
a5320 | 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a..NTEGER.PRIMARY.KEY,.b. |
a5340 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | int,.c.DEFAULT.0);...INSERT.INTO |
a5360 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e | .t1(a,b).VALUES(1,2),(3,4);...IN |
a5380 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 | SERT.INTO.t1(a,b).VALUES(1,8),(2 |
a53a0 | 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ,11),(3,1).....ON.CONFLICT(a).DO |
a53c0 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 | .UPDATE.SET.b=excluded.b,.c=c+1. |
a53e0 | 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 | WHERE.t1.b<excluded.b;...SELECT. |
a5400 | 2a 2c 32 30 30 31 2d 30 31 2d 30 31 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | *,2001-01-01.'x'.FROM.t1.ORDER.B |
a5420 | 59 20 61 2c 62 82 13 86 3c 04 00 84 2b 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | Y.a,b...<...+..CREATE.TABLE.t1(a |
a5440 | 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 | ..NTEGER.PRIMARY.KEY,.b.int,.c.D |
a5460 | 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | EFAULT.0);...INSERT.INTO.t1(a,b) |
a5480 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .VALUES(1,2),(3,4);...INSERT.INT |
a54a0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c | O.t1(a,b).VALUES(1,8),(2,11),(3, |
a54c0 | 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 1).....ON.CONFLICT(a).DO.UPDATE. |
a54e0 | 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 | SET.b=excluded.b,.c=c+1.WHERE.t1 |
a5500 | 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 6d 61 78 28 31 | .b<excluded.b;...SELECT.*,.max(1 |
a5520 | 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c 62 82 0a 86 3b | ,1).'x'.FROM.t1.ORDER.BY.a,b...; |
a5540 | 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t1(a..NTEGER. |
a5560 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 | PRIMARY.KEY,.b.int,.c.DEFAULT.0) |
a5580 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...INSERT.INTO.t1(a,b).VALUES(1 |
a55a0 | 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | ,2),(3,4);...INSERT.INTO.t1(a,b) |
a55c0 | 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e | .VALUES(1,8),(2,11),(3,1).....ON |
a55e0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 | .CONFLICT(a).DO.UPDATE.SET.b=exc |
a5600 | 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 | luded.b,.c=c+1.WHERE.t1.b<exclud |
a5620 | 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 | ed.b;...SELECT.*,.'x'.FROM.t1.OR |
a5640 | 44 45 52 20 42 59 20 61 2c 62 82 12 86 3a 04 00 84 29 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 | DER.BY.a,b...:...)..CREATE.TABLE |
a5660 | 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 | .t1(a..NTEGER.PRIMARY.KEY,.b.int |
a5680 | 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,.c.DEFAULT.0);...INSERT.INTO.t1 |
a56a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 | (a,b).VALUES(1,2),(3,4);...INSER |
a56c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 31 31 | T.INTO.t1(a,b).VALUES(.sum(1),11 |
a56e0 | 29 2c 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ),(3,1).....ON.CONFLICT(a).DO.UP |
a5700 | 44 41 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 | DATE.SET.b=excluded.b,.c=c+1.WHE |
a5720 | 52 45 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 | RE.t1.b<excluded.b;...SELECT.DIS |
a5740 | 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a | TINCT*,.'x'.FROM.t1.ORDER.BY.a;. |
a5760 | 88 49 86 39 04 00 91 17 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 | .I.9......CREATE.TABLE.t1(a..NTE |
a5780 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c | GER.PRIMARY.KEY,.b.int,.c.DEFAUL |
a57a0 | 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 | T.0);...CREATE.TABLE.record(x.TE |
a57c0 | 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | XT,.y.TEXT);...CREATE.TRIGGER.r1 |
a57e0 | 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.INSERT.ON.t1.BEGIN.....I |
a5800 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
a5820 | 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 | ALUES('before-insert',printf('%d |
a5840 | 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 | ,%d,%d',new.a,new.b,new.c));...E |
a5860 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e | ND;...CREATE.TRIGGER.r2.AFTER.IN |
a5880 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | SERT.ON.t1.BEGIN.....INSERT.INTO |
a58a0 | 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | .record(x,y).....VALUES('after-i |
a58c0 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
a58e0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
a5900 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
a5920 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
a5940 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
a5960 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
a5980 | 63 6f 61 6c 65 73 63 65 28 31 2c 31 29 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c | coalesce(1,1),old.b,old.c,new.a, |
a59a0 | 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 | new.b,new.c));...END;...CREATE.T |
a59c0 | 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r4.AFTER.UPDATE.ON.t1.BEG |
a59e0 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
a5a00 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 | .......VALUES('after-update',pri |
a5a20 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
a5a40 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f | ...............................o |
a5a60 | 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | ld.a,old.b,old.c,new.a,new.b,new |
a5a80 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .c));...END;...INSERT.INTO.t1(a, |
a5aa0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 | b).VALUES(1,2);...DELETE.FROM.re |
a5ac0 | 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | cord;...INSERT.INTO.t1(a,b).VALU |
a5ae0 | 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ES(1,2).....ON.CONFLICT(a).DO.UP |
a5b00 | 44 41 54 45 20 53 45 54 20 61 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 | DATE.SET.a=t1.c+1;...SELECT.*.FR |
a5b20 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | OM.record;...DELETE.FROM.record; |
a5b40 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a5b60 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
a5b80 | 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 | SET.c=c+1.WHERE.c<0;...SELECT.*. |
a5ba0 | 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4f 86 38 04 00 91 23 20 20 43 52 45 41 54 45 20 54 41 | FROM.record;..O.8...#..CREATE.TA |
a5bc0 | 42 4c 45 20 74 31 28 61 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | BLE.t1(a..NTEGER.PRIMARY.KEY,.b. |
a5be0 | 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c | int,.c.DEFAULT.0);...CREATE.TABL |
a5c00 | 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 | E.record(x.TEXT,.y.TEXT);...CREA |
a5c20 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 | TE.TRIGGER.r1.BEFORE.INSERT.ON.t |
a5c40 | 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1.BEGIN.....INSERT.INTO.record(x |
a5c60 | 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 | ,y).........VALUES('before-inser |
a5c80 | 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | t',printf('%d,%d,%d',new.a,new.b |
a5ca0 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
a5cc0 | 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.INSERT.ON.t1.BEGIN... |
a5ce0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 | ..INSERT.INTO.record(x,y).....VA |
a5d00 | 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 | LUES('after-insert',printf('%d,% |
a5d20 | 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 | d,%d',new.a,new.b,new.c));...END |
a5d40 | 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 | ;...CREATE.TRIGGER.r3.BEFORE.UPD |
a5d60 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
a5d80 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f | record(x,y).........VALUES('befo |
a5da0 | 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 | re-update',printf('%d,%d,%d/%d,% |
a5dc0 | 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 | d,%d',...............old.a,old.b |
a5de0 | 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | ,old.c,new.a,new.b,new.c));...EN |
a5e00 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 | D;...CREATE.TRIGGER.r4.AFTER.UPD |
a5e20 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ATE.ON.t1.BEGIN.....INSERT.INTO. |
a5e40 | 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 | record(x,y).........VALUES('afte |
a5e60 | 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 | r-update',printf('%d,%d,%d/%d,%d |
a5e80 | 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,%d',........................... |
a5ea0 | 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 | ............old.a,old.b,old.c,ne |
a5ec0 | 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 | w.a,new.b,new.c));...END;...INSE |
a5ee0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 | RT.INTO.t1(a,b).VALUES(1,2);...D |
a5f00 | 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ELETE.FROM.record;...INSERT.INTO |
a5f20 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .t1(a,b).VALUES(1,2).....ON.CONF |
a5f40 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 74 31 2e 63 2b 31 3b 0a | LICT(a).DO.UPDATE.SET.a=t1.c+1;. |
a5f60 | 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 | ..SELECT.*.FROM.record;...DELETE |
a5f80 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
a5fa0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b).VALUES(1,2).....ON.CONFLICT( |
a5fc0 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 | a).DO.UPDATE.SET.c=c+1.WHERE.c<0 |
a5fe0 | 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 56 41 43 55 55 4d 0a | ;...SELECT.*.FROM.record;VACUUM. |
a6000 | 0d 00 00 00 15 00 41 00 1e f3 1a d9 19 cc 18 be 14 6e 0f f5 0b ef 07 60 06 c0 06 33 05 a6 05 19 | ......A..........n.....`...3.... |
a6020 | 04 8c 03 ff 03 72 02 e5 02 58 01 c1 01 34 00 ce 00 41 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....r...X...4...A.............. |
a6040 | 00 81 09 86 60 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 41 53 20 6e 75 6c 6c 69 66 28 31 2c | ....`.....ATTACH(x).AS.nullif(1, |
a6060 | 31 29 00 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | 1)...b.INRY.KEY(a,b).).WITHOUT.R |
a6080 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
a60a0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | (1,2),(3,4),(1,2)ON.CONFLICT(a,b |
a60c0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 63 86 5f 04 00 81 4b 20 41 54 54 41 43 48 28 78 29 20 | ).DO.NOTHING;.c._...K.ATTACH(x). |
a60e0 | 41 53 20 63 68 61 72 28 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | AS.char(1);.INSERT.INTO.t1(a,b). |
a6100 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | VALUES(1,2),(3,4),(1,2)ON.CONFLI |
a6120 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 5e 04 00 82 17 20 41 54 54 | CT(a,b).DO.NOTHING;....^.....ATT |
a6140 | 41 43 48 28 78 29 20 41 53 20 61 66 66 69 6e 69 74 79 28 31 29 00 20 20 62 20 49 4e 52 59 20 4b | ACH(x).AS.affinity(1)...b.INRY.K |
a6160 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
a6180 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
a61a0 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
a61c0 | 0a 81 13 86 5d 04 00 82 2b 20 41 54 54 41 43 48 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 32 | ....]...+.ATTACH(x).AS.(values(2 |
a61e0 | 30 30 31 2d 30 31 2d 30 31 31 29 29 00 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | 001-01-011))...b.INRY.KEY(a,b).) |
a6200 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
a6220 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f | ,b).VALUES(1,2),(3,4),(1,2)ON.CO |
a6240 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 5c 04 00 82 17 | NFLICT(a,b).DO.NOTHING;....\.... |
a6260 | 20 41 54 54 41 43 48 28 78 29 20 41 53 20 28 54 45 cd 50 4f 52 41 52 59 29 00 20 20 62 20 49 4e | .ATTACH(x).AS.(TE.PORARY)...b.IN |
a6280 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
a62a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
a62c0 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
a62e0 | 49 4e 47 3b 0a 81 09 86 5b 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 41 53 20 28 54 45 4d d0 | ING;....[.....ATTACH(x).AS.(TEM. |
a6300 | 4f 52 41 52 59 29 00 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | ORARY)...b.INRY.KEY(a,b).).WITHO |
a6320 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
a6340 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | LUES(1,2),(3,4),(1,2)ON.CONFLICT |
a6360 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 5a 04 00 82 17 20 41 54 54 41 43 | (a,b).DO.NOTHING;....Z.....ATTAC |
a6380 | 48 28 78 29 20 41 53 20 28 54 45 4d 50 4f 52 41 52 59 29 00 20 20 62 20 49 4e 52 59 20 4b 45 59 | H(x).AS.(TEMPORARY)...b.INRY.KEY |
a63a0 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
a63c0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | TO.t1(a,b).VALUES(1,2),(3,4),(1, |
a63e0 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
a6400 | 09 86 59 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 41 53 20 28 40 61 6c 75 65 73 28 31 29 29 | ..Y.....ATTACH(x).AS.(@alues(1)) |
a6420 | 00 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ...b.INRY.KEY(a,b).).WITHOUT.ROW |
a6440 | 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ID;.INSERT.INTO.t1(a,b).VALUES(1 |
a6460 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | ,2),(3,4),(1,2)ON.CONFLICT(a,b). |
a6480 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 58 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 41 | DO.NOTHING;....X.....ATTACH(x).A |
a64a0 | 53 20 28 20 75 70 70 65 72 28 31 29 29 00 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a | S.(.upper(1))...b.INRY.KEY(a,b). |
a64c0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
a64e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | a,b).VALUES(1,2),(3,4),(1,2)ON.C |
a6500 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 57 04 00 82 | ONFLICT(a,b).DO.NOTHING;....W... |
a6520 | 17 20 41 54 54 41 43 48 28 78 29 20 41 53 20 28 20 6d 70 69 6c 65 6f 70 74 29 00 20 20 62 20 49 | ..ATTACH(x).AS.(.mpileopt)...b.I |
a6540 | 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | NRY.KEY(a,b).).WITHOUT.ROWID;.IN |
a6560 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
a6580 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
a65a0 | 48 49 4e 47 3b 0a 81 09 86 56 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 41 53 20 28 20 6c 6f | HING;....V.....ATTACH(x).AS.(.lo |
a65c0 | 77 65 72 28 31 29 29 00 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | wer(1))...b.INRY.KEY(a,b).).WITH |
a65e0 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
a6600 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ALUES(1,2),(3,4),(1,2)ON.CONFLIC |
a6620 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 55 04 00 82 17 20 41 54 54 41 | T(a,b).DO.NOTHING;....U.....ATTA |
a6640 | 43 48 28 78 29 20 41 53 20 20 6c 74 72 69 6d 28 31 2c 31 29 00 20 20 62 20 49 4e 52 59 20 4b 45 | CH(x).AS..ltrim(1,1)...b.INRY.KE |
a6660 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
a6680 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
a66a0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
a66c0 | 81 1c 86 54 04 00 82 3d 20 41 54 54 41 43 48 28 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b | ...T...=.ATTACH(++++++++++++++++ |
a66e0 | 2b 2b 2b 78 29 20 41 53 20 a8 76 61 6c 75 65 73 28 31 29 29 20 20 20 62 20 49 4e 52 59 20 4b 45 | +++x).AS..values(1))...b.INRY.KE |
a6700 | 59 28 61 31 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a1b).).WITHOUT.ROWID;.INSERT.I |
a6720 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
a6740 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
a6760 | 89 0b 86 53 04 00 92 1b 20 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 43 52 45 41 54 45 20 | ...S......VALUES(1,2);...CREATE. |
a6780 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 26 50 52 74 31 28 55 45 53 28 31 2c 32 29 | TABLE.t1(a.INTEGER&PRt1(UES(1,2) |
a67a0 | 49 4d 65 63 6f 72 41 52 59 20 4b 45 69 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | IMecorARY.KEi,.b.int,.c.DEFAULT. |
a67c0 | 30 29 3b 0a 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 | 0);.TEXT);...CREATE.TRIGGER.r1.B |
a67e0 | 45 46 4f 52 45 20 49 33 53 20 61 76 67 28 31 29 74 31 20 42 45 47 49 4e 0a 20 20 20 27 49 4e 53 | EFORE.I3S.avg(1)t1.BEGIN....'INS |
a6800 | 45 52 4d 20 49 4e 54 4f 20 72 84 63 6f 72 64 28 78 2c 79 29 20 6a 73 6f 6e 5f 69 6e 73 65 72 74 | ERM.INTO.r.cord(x,y).json_insert |
a6820 | 28 31 2c 31 2c 31 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 6e 28 27 62 65 66 55 45 53 52 45 | (1,1,1).........VALUEn('befUESRE |
a6840 | 41 54 45 20 54 52 43 41 53 45 52 20 72 07 7c 7c 20 34 20 80 46 54 45 52 20 55 6f 72 65 2d 69 6e | ATE.TRCASER.r.||.4..FTER.Uore-in |
a6860 | 73 65 72 74 27 2c 70 72 69 45 58 54 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 | sert',priEXT('%d,%d,%d',new.a,ne |
a6880 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 42 45 47 | w.b,new.c));...END;...CREATE.BEG |
a68a0 | 49 4e 0a 20 20 20 20 49 4e 53 2e 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 | IN.....INS.RT.INTO.record(x,y).. |
a68c0 | 20 20 20 56 30 4c 55 45 53 28 27 61 66 28 01 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | ...V0LUES('af(.%d,%d,%d',new.a,n |
a68e0 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 01 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;....REATE.TR |
a6900 | 49 47 47 45 52 20 72 33 20 4e 4f 54 48 49 4e 47 42 45 46 4f 52 45 20 55 50 44 63 2b 31 3b 0a 20 | IGGER.r3.NOTHINGBEFORE.UPDc+1;.. |
a6920 | 20 41 54 45 20 4f 4e 20 74 31 20 42 45 4e 4e 4e 4e 4e 4e 4e 4e 4e 4e 4e 4e 52 54 20 49 4e 54 4f | .ATE.ON.t1.BENNNNNNNNNNNNRT.INTO |
a6940 | 20 72 65 63 6f 00 01 00 00 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .reco....,y).........VALUES('bef |
a6960 | 6f 72 65 2d 75 70 64 61 74 65 4c 45 4e 44 55 45 53 28 27 61 66 28 27 25 64 62 25 64 2c 25 64 27 | ore-updateLENDUES('af('%db%d,%d' |
a6980 | 2c 6e 65 77 2e 61 2c 6e 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ,new.a,n',...................... |
a69a0 | 20 20 20 20 20 20 20 20 20 6f dc 64 2e 61 2c 6f 59 64 2a 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 | .........o.d.a,oYd*b,old.c,new.a |
a69c0 | 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 4e 44 3b 0a 20 20 | ,new.b,new.c));...END;...CND;... |
a69e0 | 49 4e 53 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 20 56 41 4c 55 45 53 52 45 41 54 45 20 | INS('%d,%d,%d/%d,%d.VALUESREATE. |
a6a00 | 54 52 43 41 53 45 52 20 72 07 7c 7c 20 34 20 80 46 54 45 52 20 55 50 44 41 54 45 20 4f 2b 20 74 | TRCASER.r.||.4..FTER.UPDATE.O+.t |
a6a20 | 31 21 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 | 1!BEGIN.....INSERT.INTO.record(x |
a6a40 | 2c 79 29 0a 00 10 00 00 20 20 20 20 56 41 4c 55 45 53 28 27 61 00 00 00 64 2d 75 70 64 61 74 65 | ,y).........VALUES('a...d-update |
a6a60 | 27 2c 70 72 69 6e 95 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 | ',prin.f('%d,%d,%d/%d,%d,%d',... |
a6a80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
a6aa0 | 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 71 2e 63 2c 6e 65 77 2e 61 2c 6e 65 28 27 | ....old.a,old.b,olq.c,new.a,ne(' |
a6ac0 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 | %d,%d,%d/%d,%d.VALUES(1,2);...DE |
a6ae0 | 4c 45 54 64 3b 0a 20 20 49 4e 53 45 52 54 20 65 63 6f 72 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | LETd;...INSERT.ecor.t1(a,b).VALU |
a6b00 | 45 53 28 31 2c 32 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 6f 45 20 20 1e 4f 20 55 50 | ES(1,2));...END;...CREAoE...O.UP |
a6b20 | 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 48 4c 45 03 54 1c 2a 20 46 52 | DATE.SET.c=t1.c+1;...SHLE.T.*.FR |
a6b40 | 4f 4d 20 02 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 e2 00 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 | OM..............cord;...DELETE.F |
a6b60 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 91 | ROM.record;..................... |
a6b80 | 91 91 91 20 20 49 4e 53 45 52 54 20 3b 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | .....INSERT.;NTO.t1(a,b).VALUES( |
a6ba0 | 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 28 46 4f 20 55 50 44 41 54 | 1,2).....ON.CONFLICT(a)(FO.UPDAT |
a6bc0 | 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 c7 53 45 4c 45 43 59 20 | E.SET.c=c+1.WHERE.c<0;...SELECY. |
a6be0 | 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 02 86 52 04 00 90 09 20 20 43 52 45 41 54 45 20 | *.FROM.record;....R......CREATE. |
a6c00 | 54 41 42 4c 45 20 74 52 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.tR(a.INTEGER.PRIMARY.KEY,. |
a6c20 | 62 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f | bDEFAULT.0);...CREATE.TABLE.reco |
a6c40 | 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 20 72 65 63 6f 72 64 28 78 2c 79 29 45 20 54 52 49 | rd(x.TEXT,.y.TE.record(x,y)E.TRI |
a6c60 | 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | GGER.r1.BEFORE.INSERT.ON.t1.BEGI |
a6c80 | 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 01 | N.....INSERT.INTO.record(x,y)... |
a6ca0 | 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 | ......VALUES('before-insert',pri |
a6cc0 | 6e 74 66 28 27 25 63 ac 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | ntf('%c.%d,%d',new.a,new.b,new.c |
a6ce0 | 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | ));...END;...CREATE.TRIGGER.r2.A |
a6d00 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 | FTER.INSERT.ON.t1.BEGIN.....INSE |
a6d20 | 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 45 53 0a 27 | RT.INTO.record(x,y).....VALUES.' |
a6d40 | 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | after-insert',printf('%d,%d,%d', |
a6d60 | 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 | ND;...CREATE.TRIGGER.r3.BEFORE.U |
a6d80 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 75 70 64 61 74 65 27 2c 70 72 69 | PDATE.ON.t1.BEGIN....update',pri |
a6da0 | 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 | ntf('%d,%d,%d/%d,%d,%d',........ |
a6dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
a6de0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
a6e00 | 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 66 52 49 47 47 45 52 20 72 34 20 47 49 4e 0a 20 20 20 | END;...CREATE.fRIGGER.r4.GIN.... |
a6e20 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 | .INSERT.INTO.record(x,y)........ |
a6e40 | 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 | .VALUES('after-update',printf('% |
a6e60 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
a6e80 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f | .........................old.a,o |
a6ea0 | 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a | ld.b,old.c,new.a,new.b,new.c));. |
a6ec0 | 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 61 20 49 4e 54 4f 20 74 31 28 61 2c 62 27 2c 0a 20 20 | ..END;...INSERa.INTO.t1(a,b',... |
a6ee0 | 20 20 20 20 20 20 20 20 20 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 | .........).VALUES(1,2);...DELETE |
a6f00 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .FROM.record;...INSERT.INTO.t1(a |
a6f20 | 2c 62 28 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 54 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,b(.VALUES(1,2).....TN.CONFLICT( |
a6f40 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c | a).DO.UPDATE.SET.c=t1.c+1;...SEL |
a6f60 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | ECT.*.FROM.record;...DELETE.FROM |
a6f80 | 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | .record;...INSERT.INTO.t1(a,b).V |
a6fa0 | 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | ALUES(1,2).....ON.CONFLICT(a).DO |
a6fc0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 | .UPDATE.SET.c=c+1.WHERE.c<0;...S |
a6fe0 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 75 86 51 04 00 91 6f 20 20 43 | ELECT.*.FROM.record;..u.Q...o..C |
a7000 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 67 65 73 20 49 4e 54 45 47 45 52 20 50 52 49 4d | REATE.TABLE.t1(ages.INTEGER.PRIM |
a7020 | 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 | ARY.KEY,.b.int,.c.DEFAULT.0);... |
a7040 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 | CREATE.TABLE.record(x.TEXT,.y.TE |
a7060 | 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 | XT);...CREATE.TRIGGER.r1.BEFORE. |
a7080 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e | INSERT.ON.t1.BEGIN.....INSERT.IN |
a70a0 | 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 | TO.record(x,y).........VALUES('b |
a70c0 | 65 66 6f 80 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c | efo.e-insert',printf('%d,%d,%d', |
a70e0 | 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 37 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | new.a,new.b,new7c));...END;...CR |
a7100 | 45 41 54 45 20 54 52 49 47 47 45 52 20 70 32 20 41 46 54 45 52 20 49 4e 53 45 52 73 20 4f 4e 20 | EATE.TRIGGER.p2.AFTER.INSERs.ON. |
a7120 | 62 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 20 72 65 63 6f 72 64 28 78 2c | b1.BEGIN.....INSERT.IN.record(x, |
a7140 | 79 29 20 20 20 20 20 56 41 4c 55 45 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 | y).....VALUEUES('after-insert',p |
a7160 | 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 | rintf('%d,%d,%d',new.a,new.b,new |
a7180 | 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 37 52 20 72 33 | .c));...END;...CREATE.TRIGG7R.r3 |
a71a0 | 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | .BEFORE.UPDATE.ON.t1.BEGIN.....I |
a71c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 3b 0a | NSERT.INTO.r..old.a,old.b,old.;. |
a71e0 | 20 20 43 52 45 41 54 45 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | ..CREATEecord(x,y).........VALUE |
a7200 | 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-update',printf('%d,%d, |
a7220 | 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 | %d/%d,%d,%d',................... |
a7240 | c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 c5 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
a7260 | 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 3b 0a 20 20 43 52 45 41 54 45 20 | .....old.a,old.b,old.;...CREATE. |
a7280 | 54 52 49 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r4.AFTER.UPDATE.ON.t1.BE |
a72a0 | 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a | GIN.....INSERT.INTO.record(x,y). |
a72c0 | 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 4d 75 70 64 61 74 65 27 2c 70 72 | ........VALUES('afterMupdate',pr |
a72e0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 17 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d.%d,%d,%d',....... |
a7300 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
a7320 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
a7340 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | w.c));...END;...INSERT.INTO.t1(a |
a7360 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 | ,b).VALUES(1,2);...DELETE.FROM.r |
a7380 | 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ecord;...INSERT.INTO.t1(a,b).VAL |
a73a0 | 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | UES(1,2).....ON.CONFLICT(a).DO.U |
a73c0 | 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | PDATE.SET.c=t1.c+1;...SELECT.*.F |
a73e0 | 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 11 4f 4d 20 72 65 63 6f 72 64 | ROM.record;...DELETE.F.OM.record |
a7400 | 3b 0a 20 20 49 86 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ;...I.SERT.INTO.t1(a,b).VALUES(1 |
a7420 | 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,2).....ON.CONFLICT(a).DO.UPDATE |
a7440 | 20 53 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 42 54 20 2a | .SET.c=c+1.WHERE.c<0;...SELEBT.* |
a7460 | 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 88 4c 86 50 04 00 91 1d 20 20 43 52 45 41 54 45 20 54 | .FROM.record;..L.P......CREATE.T |
a7480 | 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a,INTEGER.PRIMARY.KEY,.b |
a74a0 | 2c 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 | ,int,.c.DEFAULT.0);...CREATE.TAB |
a74c0 | 4c 45 20 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 | LE.record(x.TEXT,.y.TEXT);...CRE |
a74e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 | ATE.TRIGGER.r1.BEFORE.INSERT.ON. |
a7500 | 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 | t1.BEGIN.....INSERT.INTO.record( |
a7520 | 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 | x,y).........VALUES('before-inse |
a7540 | 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e | rt',printf('%d,%d,%d',new.a,new. |
a7560 | 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 | b,new.c));...END;...CREATE.TRIGG |
a7580 | 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.INSERT.ON.t1.BEGIN.. |
a75a0 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 | ...INSERT.INTO.record(x,y).....V |
a75c0 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-insert',printf('%d, |
a75e0 | 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e | %d,%d',new.a,new.b,new.c));...EN |
a7600 | 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 | D;...CREATE.TRIGGER.r3.BEFORE.UP |
a7620 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DATE.ON.t1.BEGIN.....INSERT.INTO |
a7640 | 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 | .record(x,y).........VALUES('bef |
a7660 | 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c | ore-update',printf('%d,%d,%d/%d, |
a7680 | 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d',......................... |
a76a0 | 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 2c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 | ......old.a,o,d.b,old.c,new.a,ne |
a76c0 | 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 | w.b,new.c));...END;...CREATE.TRI |
a76e0 | 47 47 45 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r4.AFTER.UPDATE.ON.t1.BEGIN |
a7700 | 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 | .....INSERT.INTO.record(x,y).... |
a7720 | 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 | .....VALUES('after-update',print |
a7740 | 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 | f('%d,%d,%d/%d,%d,%d',.......... |
a7760 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 | .............................old |
a7780 | 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 | .a,old.b,old.c,new.a,new.b,new.c |
a77a0 | 29 29 3b 0a 20 20 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ));...END;EXPLAIN...INSERT.INTO. |
a77c0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 | t1(a,b).VALUES(1,2);...DELETE.FR |
a77e0 | 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | OM.record;...INSERT.INTO.t1(a,b) |
a7800 | 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | .VALUES(1,2).....ON.CONFLICT(a). |
a7820 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 64 3b 0a | DO.UPDATE.SET.c=t1.c+1;...SELd;. |
a7840 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 | ..DELETE.FROM.record;...INSERT.I |
a7860 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 43 | NTO.t1(a,b).VALUES(1,2).....ON.C |
a7880 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 20 57 | ONFLICT(a).DO.UPDATE.SET.c=c+1.W |
a78a0 | 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 82 0a | HERE.c<0;...SELECT.*.FROM.reco.. |
a78c0 | 86 4f 04 00 84 19 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 45 47 45 | .O......CREATE.TABLE.t1(a,INTEGE |
a78e0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.int,.c.DEFAULT. |
a7900 | 30 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 0);...INSERT.INTO.t1(a,b).VALUES |
a7920 | 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | (1,2),(3,4);...INSERT.INTO.t1(a, |
a7940 | 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c 28 33 2c 31 29 0a 20 20 20 20 | b).VALUES(1,8),(2,11),(3,1)..... |
a7960 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 65 | ON.CONFLICT(a).DO.UPDATE.SET.b=e |
a7980 | 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 20 74 31 2e 62 3c 65 78 63 6c | xcluded.b,.c=c+1.WHERE.t1.b<excl |
a79a0 | 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | uded.b;...SELECT.*,.'x'.FROM.t1. |
a79c0 | 4f 52 44 45 52 20 42 59 20 61 3b 0a 82 09 86 4e 04 00 84 17 20 20 43 52 45 41 54 45 20 54 41 42 | ORDER.BY.a;....N......CREATE.TAB |
a79e0 | 4c 45 20 74 31 28 61 2c 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 | LE.t1(a,INTEGER.PR,MARY.KEY,.b.I |
a7a00 | 4e 54 2c 20 63 20 44 45 46 41 20 61 2c 62 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 | NT,.c.DEFA.a,b0);...CREATE.UNIQU |
a7a20 | 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 53 45 52 | E.INDEX.t1x1.ON.t1(a+b);...INSER |
a7a40 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 29 20 4f 4e 20 43 4f | T.INTO.t1(a,b).VALUES(7,8).ON.CO |
a7a60 | 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 49 4e 53 45 52 54 | NFLICT(a+b).DO.NOTHING;...INSERT |
a7a80 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 2c 28 39 2c 36 29 20 | .INTO.t1(a,b).VALUES(8,7),(9,6). |
a7aa0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 | ON.CONFLICT(a+b).DO.NOTHING;...S |
a7ac0 | 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a 88 16 86 4d 04 00 90 | ELECT.DISTINCT*.FROM.t1;....M... |
a7ae0 | 31 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 20 50 52 49 4d 41 52 59 | 1..CREATE.TABLE.t1(a,INT.PRIMARY |
a7b00 | 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 49 54 48 4f 55 | .KEY,.b.int,.c.DEFAULT.0).WITHOU |
a7b20 | 54 20 52 4f 57 49 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 | T.ROWID;...CREATE.TRIGGER.r1.BEF |
a7b40 | 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 | ORE.INSERT.ON.t1.BEGIN.....INSER |
a7b60 | 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 | T.INTO.record(x,y).........VALUE |
a7b80 | 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | S('before-insert',printf('%d,%d, |
a7ba0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
a7bc0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ..CREATE.TRIGGER.r2.AFTER.INSERT |
a7be0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 | .ON.t1.BEGIN.....INSERT.INTO.rec |
a7c00 | 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 69 | ord(x,y).........VALUES('after-i |
a7c20 | 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e | nsert',printf('%d,%d,%d',new.a,n |
a7c40 | 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 | ew.b,new.c));...END;...CREATE.TR |
a7c60 | 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | IGGER.r3.BEFORE.UPDATE.ON.t1.BEG |
a7c80 | 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 | IN.....INSERT.INTO.record(x,y).. |
a7ca0 | 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 | .......VALUES('before-update',pr |
a7cc0 | 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 | intf('%d,%d,%d/%d,%d,%d',....... |
a7ce0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | ................................ |
a7d00 | 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 | old.a,old.b,old.c,new.a,new.b,ne |
a7d20 | 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | w.c));...END;...CREATE.TRIGGER.r |
a7d40 | 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 | 4.AFTER.UPDATE.ON.t1.BEGIN.....I |
a7d60 | 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 | NSERT.INTO.record(x,y).........V |
a7d80 | 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c | ALUES('after-update',printf('%d, |
a7da0 | 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d/%d,%d,%d',................ |
a7dc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 | .......................old.a,old |
a7de0 | 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 | .b,old.c,new.a,new.b,new.c));... |
a7e00 | 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | END;...INSERT.INTO.t1(a,b).VALUE |
a7e20 | 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 | S(1,2);...DELETE.FROM.record;... |
a7e40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a | INSERT.INTO.t1(a,b).VALUES(1,2). |
a7e60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
a7e80 | 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | .c=t1.c+1;...DELETE.FROM.record; |
a7ea0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
a7ec0 | 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c | 2).ON.CONFLICT.DO.NOTHING;...SEL |
a7ee0 | 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 82 09 86 4c 04 00 84 17 20 20 43 52 45 | ECT.*.FROM.record;....L......CRE |
a7f00 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 2c 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t1(a,I,TEGER.PRIMARY.K |
a7f20 | 45 59 2c 20 62 20 55 4e 49 51 55 45 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 | EY,.b.UNIQUE.DEFAULT.0);...CREAT |
a7f40 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a | E.UNIQUE.INDEX.t1x1.ON.t1(a+b);. |
a7f60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 37 2c 38 | ..INSERT.INTO.t1(a,b).VALUES(7,8 |
a7f80 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 20 | ).ON.CONFLICT(a+b).DO.NOTHING;.. |
a7fa0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 38 2c 37 29 | .INSERT.INTO.t1(a,b).VALUES(8,7) |
a7fc0 | 2c 28 39 2c 36 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2b 62 29 20 44 4f 20 4e 4f 54 48 49 | ,(9,6).ON.CONFLICT(a+b).DO.NOTHI |
a7fe0 | 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 20 46 52 4f 4d 20 74 31 3b 0a | NG;...SELECT.DISTINCT*.FROM.t1;. |
a8000 | 0d 14 f5 00 39 00 90 00 1f 73 1e e6 1e 80 1e 1a 1d 8d 1c fd 1c 6d 1b de 1b 51 1a bc 1a 1d 19 90 | ....9....s...........m...Q...... |
a8020 | 19 03 18 66 17 ce 17 41 16 aa 16 1d 15 90 14 fb 14 68 13 da 13 4d 12 c0 12 33 11 a1 11 06 10 6f | ...f...A.........h...M...3.....o |
a8040 | 10 48 10 41 0f 16 0e 78 0d e8 0d 55 0c f0 0c 6c 0b ca 0b 33 0a e5 0a 8d 0a 08 09 8a 09 26 08 82 | .H.A...x...U...l...3.........&.. |
a8060 | 08 22 07 95 07 42 06 6a 05 c3 05 59 04 cb 04 1a 03 56 02 a1 01 e8 01 7c 00 90 00 00 00 00 00 00 | ."...B.j...Y.....V.....|........ |
a8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 68 87 19 04 00 83 55 23 52 45 41 54 45 20 54 | .................h.....U#REATE.T |
a80a0 | 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e | ABLE.t9(a.TEXT.PRIMARY.KEY,.b.IN |
a80c0 | 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | T.DEFAULT.1);.PRAGMA.count_chang |
a80e0 | 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 28 | es=ON;.INSERT.INTO.t9(b).VALUES( |
a8100 | 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 20 40 31 3d 27 61 62 63 27 | 'abc'),('def'),('ghi'.>.@1='abc' |
a8120 | 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e | ),('jkl'),('abc'),('ghi').....ON |
a8140 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 | .CONFLICT(a).DO.UPDATE.SET.b=b+1 |
a8160 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 69 87 18 04 | ;.PRAGMA.count_changes=OFF;.i... |
a8180 | 00 81 57 23 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..W#REATE.TABLE.t4(a.INT,.b.INT) |
a81a0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
a81c0 | 28 61 29 20 57 48 45 52 45 20 62 3c 3f 30 30 30 3b 0a 43 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | (a).WHERE.b<?000;.CFLICT(a).DO.N |
a81e0 | 4f 54 48 49 4e 47 3b 0a 81 35 87 17 04 00 82 6f 23 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | OTHING;..5.....o#REATE.TABLE.t2( |
a8200 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
a8220 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
a8240 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
a8260 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | ,2),(3,4),(1,5),(.?16,7),(3,1),( |
a8280 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 41 4e 41 4c 59 5a 45 | 8,9),(6,11),(1,1);VACUUM;ANALYZE |
a82a0 | 0a 81 31 87 16 04 00 82 67 23 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 | ..1.....g#REATE.TABLE.t1(a,b,c,d |
a82c0 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c | ,PRIMARY.KEY(b,d));.WITH.data(a, |
a82e0 | 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | b,c,d).AS.(VALUES(1,2,3,4),(5,6, |
a8300 | 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 7,8),(9,10,11,12)).INSERT.INTO.t |
a8320 | 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 28 64 61 74 61 29 4f 4e | 1(a,b,c,d).SELECT.*.FROM(data)ON |
a8340 | 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 0a 81 40 87 15 04 00 83 05 23 52 | .CONFLICT(b,d).UPDATE..@......#R |
a8360 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 | EATE.TABLE.t1(a,b,c.DEFAULT.0,PR |
a8380 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | IMARY.KEY(a,b));.INSERT.INTO.t1. |
a83a0 | 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c | AS.nx(a,b).VALUES(1,2),(3,4),(7, |
a83c0 | 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 | 8)...ON.CONFLICT(a,b).DO.....UPD |
a83e0 | 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 48 45 52 | ATE.SET.c=(SELECT.c.FROM.t2.WHER |
a8400 | 45 20 28 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 2d 87 14 04 00 | E.(a,b)=(eded.a,exed.b));..-.... |
a8420 | 82 5f 23 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | ._#REATE.TABLE.t1(...a.INT,...b. |
a8440 | 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 | INT.UNIQUE,...c.INT.DEFAULT.0,.. |
a8460 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY(a,b).).WITHOUT.ROWI |
a8480 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | D;.INSERT.INTO.t1(a,b).VALUES(1, |
a84a0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 2),(3,4),(1,2)ON.CONFLICT(a,b).D |
a84c0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0a 87 13 04 00 82 19 23 49 1e 33 10 0d 00 00 10 00 fd 31 e5 | O.NOTHING;.........#I.3.......1. |
a84e0 | fe 3d 20 28 31 0a 80 ff ff ff 33 46 34 19 4f 20 74 ff ff ff 80 20 7f 7f 80 fb fb 59 19 55 dd dd | .=.(1.....3F4.O.t..........Y.U.. |
a8500 | dd dd dd 20 20 80 20 80 54 09 1c ef fc 19 fc 54 09 dd dd dd dd dd 20 20 41 00 0a 20 20 80 20 80 | ........T......T........A....... |
a8520 | 54 09 1c ef fc 00 20 54 09 16 ef 20 69 6e 74 fc 19 fc 24 24 24 24 24 24 24 24 24 24 40 00 24 24 | T......T....int...$$$$$$$$$$@.$$ |
a8540 | 24 24 24 24 24 24 24 24 24 bc 24 ef fc 19 32 24 24 24 24 fb fb fb e8 3b 0a 67 87 12 04 00 81 53 | $$$$$$$$$.$...2$$$$....;.g.....S |
a8560 | 23 43 41 53 45 61 45 54 00 00 04 00 45 58 7e 51 80 22 31 29 74 31 28 0a 23 61 28 54 00 00 04 51 | #CASEaET....EX~Q."1)t1(.#a(T...Q |
a8580 | 34 22 31 29 74 31 28 0a 23 74 31 02 6f a4 28 31 49 4c 54 42 4f 20 4e 49 20 77 77 77 77 77 77 77 | 4"1)t1(.#t1.o.(1ILTBO.NI.wwwwwww |
a85a0 | 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 63 6f a4 28 33 49 4e | wwwwwwwwwwwwwwwwwwwwwwwwwco.(3IN |
a85c0 | 54 3b 0a 81 23 87 11 04 00 82 4b 23 23 23 23 fb 3d 23 0a 23 52 ff ff 54 3c 55 45 04 04 2c 31 7f | T;..#.....K####.=#.#R..T<UE..,1. |
a85e0 | 4e 4f 4d ff ea 00 00 54 00 00 00 02 56 10 00 32 29 28 56 41 aa aa aa aa e8 00 aa aa aa aa 2e 50 | NOM....T....V..2)(VA...........P |
a8600 | 12 23 0a 23 52 ff ff 54 3c 55 45 04 04 2c 00 54 00 00 05 02 56 10 00 32 29 28 56 41 aa aa aa aa | .#.#R..T<UE..,.T....V..2)(VA.... |
a8620 | e8 00 aa aa aa aa 2e 50 12 40 29 08 56 41 4c 36 47 53 28 31 ff 7f 43 2e 50 12 40 43 5a 28 7f 79 | .......P.@).VAL6GS(1..C.P.@CZ(.y |
a8640 | aa aa aa aa aa 20 00 20 d8 d8 d8 d8 20 75 6e 6c 69 6b 65 6c 79 28 31 29 9d 9d a9 02 56 10 00 01 | .............unlikely(1)....V... |
a8660 | 00 4e 6f 65 48 49 ff 7f 3b 0a 81 54 87 10 04 00 83 2d 23 23 23 23 23 23 a3 0a 23 52 45 7f 54 3b | .NoeHI..;..T.....-######..#RE.T; |
a8680 | 00 00 55 26 23 23 23 23 43 54 45 20 6e 6f 5a f1 f1 f1 f1 f1 f1 10 00 f1 f1 f1 f1 f1 f1 f1 f1 01 | ..U&####CTE.noZ................. |
a86a0 | 00 f1 f1 f1 f1 61 73 65 23 23 00 0e 00 7f 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 55 26 23 3e | .....ase##....#####.#RE.T...U&#> |
a86c0 | 23 23 0a 23 52 45 7f 54 1e 74 65 20 00 00 55 26 23 23 23 23 23 0a 23 eb eb eb eb eb eb eb eb eb | ##.#RE.T.te...U&#####.#......... |
a86e0 | eb 52 23 23 23 23 0a 23 52 45 7f 54 0a 23 4c 54 45 52 69 74 65 80 00 4c 45 23 23 23 23 23 23 0a | .R####.#RE.T.#LTERite..LE######. |
a8700 | 23 52 45 7f 54 20 00 00 55 26 23 23 23 23 23 0a 23 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 | #RE.T...U&#####.#UUUUUUUUUUUUUUU |
a8720 | 55 55 55 55 60 55 55 55 55 55 00 00 4c 45 01 00 d8 d8 ee ed f8 44 28 56 41 01 00 3e 48 49 ef 7f | UUUU`UUUUU..LE.......D(VA..>HI.. |
a8740 | 3b e7 50 87 0f 04 00 81 25 23 23 23 23 23 23 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 55 45 23 | ;.P.....%###########.#RE.T...UE# |
a8760 | 23 3a 23 23 0a 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 23 0a 23 64 65 ff 4c 41 54 2f 00 00 01 | #:##.#RE.T...UE#####.#de.LAT/... |
a8780 | 00 d8 d8 d8 ed f8 44 4e 56 41 01 00 56 6f 54 48 49 ff 7f 3b 0a 81 09 87 0e 04 00 82 17 23 23 23 | ......DNVA..VoTHI..;.........### |
a87a0 | 23 23 23 23 1b 23 52 45 7f 54 20 00 00 55 45 23 23 23 50 2c 32 45 3a 75 37 28 61 20 2e 50 2c 32 | ####.#RE.T...UE###P,2E:u7(a..P,2 |
a87c0 | 29 ff ff ff 7f 43 4f 4e 46 4c 52 45 74 80 ff 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f 49 43 5a | )....CONFLREt....UE#####.#RE.ICZ |
a87e0 | 28 28 3d 41 56 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 23 23 23 23 0a 23 52 45 7f 54 de 00 | ((=AVALAT/.........D####.#RE.T.. |
a8800 | 00 40 00 00 00 23 23 23 0a 23 52 45 7f 54 20 00 fe 80 00 4c 28 56 46 01 00 3e 6f 54 48 49 ff 7f | .@...###.#RE.T.....L(VF..>oTHI.. |
a8820 | 3b 0a 5d 87 0d 04 00 81 3f 23 23 23 23 23 23 23 0a 23 5d 45 41 54 20 45 2c 20 62 20 55 4e 49 51 | ;.].....?#######.#]EAT.E,.b.UNIQ |
a8840 | 15 45 29 35 35 35 7f 04 04 0a 23 04 04 2c 62 29 08 56 41 4c 55 47 35 04 04 04 0a 23 04 04 41 62 | .E)555....#..,b).VALUG5....#..Ab |
a8860 | 29 40 56 41 4c 55 47 53 28 04 04 04 ef 0a 23 04 04 2c 62 ff 08 56 41 4c 55 47 53 28 31 2c 32 29 | )@VALUGS(.....#..,b..VALUGS(1,2) |
a8880 | ff ff 81 20 87 0c 04 00 82 45 23 23 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 | .........E#######.#RE.T...UE#### |
a88a0 | 23 0a 23 52 45 7f 54 20 20 2c 61 73 9c 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 00 00 80 00 | #.#RE.T..,as._insert_rowid().... |
a88c0 | 4c 45 3a 75 86 28 54 20 00 80 33 45 23 23 23 23 23 0a 23 52 45 81 54 20 00 7f 00 00 4c 45 3a 75 | LE:u.(T...3E#####.#RE.T.....LE:u |
a88e0 | b7 7a 28 28 56 41 56 41 4c 41 54 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 14 56 41 01 00 3e | .z((VAVALATALAT/.........D.VA..> |
a8900 | 6f 54 62 49 ff 23 23 23 23 0a 23 52 45 7f 54 20 20 2c 61 73 9c 5f 69 6e 73 65 72 74 5f 72 6f 77 | oTbI.####.#RE.T..,as._insert_row |
a8920 | 69 64 28 7f 3b 0a 61 87 0b 04 00 81 47 23 23 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 55 45 23 | id(.;.a.....G#######.#RE.T...UE# |
a8940 | 23 23 23 23 0a 23 52 45 7f 54 20 00 00 80 00 4c 45 3a 75 37 28 61 20 2e 50 2c 32 29 ff ff ff 7f | ####.#RE.T.....LE:u7(a..P,2).... |
a8960 | 43 4f 4e 46 4c 49 43 7a 28 28 56 41 56 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 28 56 41 01 | CONFLICz((VAVALAT/.........D(VA. |
a8980 | 00 3e 6f 54 48 49 ff 7f 3b 0a 7b 87 0a 04 00 81 7b 23 23 23 23 23 23 23 0a 23 52 45 7f 54 20 00 | .>oTHI..;.{.....{#######.#RE.T.. |
a89a0 | 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 80 00 4c 45 3a 75 37 28 61 20 23 23 23 23 23 | .UE#####.#RE.T.....LE:u7(a.##### |
a89c0 | 0a 23 52 45 7f 54 20 00 00 80 00 4c 45 3a 75 37 28 61 20 2e 50 2e 50 2c 32 29 09 ff ff 7f 43 4f | .#RE.T.....LE:u7(a..P.P,2)....CO |
a89e0 | 4e 46 4c 49 43 7a 28 28 56 41 56 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 33 28 56 41 01 00 53 | NFLICz((VAVALAT/.........3(VA..S |
a8a00 | 53 53 53 53 53 53 53 53 81 01 87 09 04 00 82 07 23 23 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 | SSSSSSSS........#######.#RE.T... |
a8a20 | 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 80 00 4c 45 3a 72 3d 28 61 20 2e 50 2c 32 29 0a | UE#####.#RE.T.....LE:r=(a..P,2). |
a8a40 | 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 80 00 4c 45 3a 72 3d ff | #RE.T...UE#####.#RE.T.....LE:r=. |
a8a60 | ff ff 7f 43 4f 4e 46 4c 49 5b 7a 28 28 56 41 56 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 28 | ...CONFLI[z((VAVALAT/.........D( |
a8a80 | 56 41 01 00 3e 6f 54 48 49 ff 7f 3b 0a 55 87 08 04 00 81 2f 23 23 23 23 23 23 23 0a 23 52 45 7f | VA..>oTHI..;.U...../#######.#RE. |
a8aa0 | 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f | T...UE#####.#RE.T...UE#####.#RE. |
a8ac0 | 61 20 2e 50 2c 32 29 ff 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 28 56 41 ff ff 80 00 54 48 | a..P,2).ALAT/.........D(VA....TH |
a8ae0 | 49 74 72 69 0a 4b 87 07 04 00 81 1b 23 23 23 23 23 23 23 0a 23 52 45 7f 23 23 23 0a 23 52 45 a1 | Itri.K......#######.#RE.###.#RE. |
a8b00 | 54 20 00 00 f8 00 23 23 23 23 23 0a 23 52 45 7f 23 23 23 0a 23 52 40 56 41 01 6f 75 6e 74 73 2d | T.....#####.#RE.###.#R@VA.ounts- |
a8b20 | 75 70 64 61 74 65 d8 f6 f8 00 40 56 41 01 49 64 00 00 00 81 13 87 06 04 00 82 2b 23 23 23 23 23 | update....@VA.Id..........+##### |
a8b40 | 23 23 0a 23 52 45 41 54 20 00 0a 80 00 4c 45 20 75 37 28 61 20 55 7f 49 51 55 45 2c 20 62 20 55 | ##.#REAT.....LE.u7(a.U.IQUE,.b.U |
a8b60 | 4e 49 51 55 45 29 35 35 35 47 47 47 47 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 04 0a | NIQUE)555GGGG................... |
a8b80 | 04 04 04 2c 62 29 08 56 41 4c 55 47 53 28 31 35 31 29 2c 28 45 69 43 2e 50 2c 32 29 ff ff ff 7f | ...,b).VALUGS(151),(EiC.P,2).... |
a8ba0 | 43 4f 4e 46 4c 49 43 54 28 28 56 41 56 41 4c 41 54 2f 20 d8 d8 d8 d8 d8 d8 d8 d8 44 28 56 41 01 | CONFLICT((VAVALAT/.........D(VA. |
a8bc0 | 00 4e 6f 54 48 49 ff 7f 3b 0a 81 1e 87 05 04 00 82 41 23 23 23 23 23 23 23 0a 23 52 45 41 54 20 | .NoTHI..;........A#######.#REAT. |
a8be0 | 00 00 80 00 d8 44 28 4c 45 20 75 37 28 61 45 49 47 4e 4f 52 45 2c 20 62 23 0a 23 52 65 63 6f 72 | .....D(LE.u7(aEIGNORE,.b#.#Recor |
a8c00 | 45 41 54 20 00 00 80 00 4c 45 20 75 37 28 61 20 55 7f 49 51 55 45 2c 20 62 20 55 4e 20 55 4e 49 | EAT.....LE.u7(a.U.IQUE,.b.UN.UNI |
a8c20 | 51 49 45 29 35 35 00 00 00 40 4f 04 04 04 04 04 04 46 55 4c 4c 04 04 04 04 04 04 e9 04 04 04 04 | QIE)55...@O......FULL........... |
a8c40 | 04 0a 04 4f 4e 46 4c 49 43 54 28 28 56 41 56 41 4c 41 49 4e 54 4f d8 d8 d8 d8 d8 d8 d8 44 28 56 | ...ONFLICT((VAVALAINTO.......D(V |
a8c60 | 41 01 00 4e 00 00 00 40 ff 7f 3b 0a 81 00 87 04 04 00 82 05 23 23 23 23 23 23 23 0a 23 52 45 41 | A..N...@..;.........#######.#REA |
a8c80 | 54 1f e7 00 69 6d 65 80 00 4c 45 20 75 37 28 61 20 55 7f 49 51 55 45 2c 20 62 20 55 4e 49 51 55 | T...ime..LE.u7(a.U.IQUE,.b.UNIQU |
a8ca0 | 45 29 35 0a 23 35 35 47 47 47 47 04 04 03 04 04 04 0c 47 04 04 03 04 06 04 04 04 04 04 0a 04 04 | E)5.#55GGGG.......G............. |
a8cc0 | 04 2c 62 29 08 56 41 4c 55 47 53 28 31 35 31 29 2c 11 0a 0a 0a 03 04 04 04 0c 04 04 04 04 04 04 | .,b).VALUGS(151),............... |
a8ce0 | 04 04 04 04 04 04 04 04 04 0a 04 04 04 2c 62 0a 62 87 03 04 00 81 49 23 23 23 23 23 23 23 0a 23 | .............,b.b.....I#######.# |
a8d00 | 52 45 01 54 3a 4c 45 3a 75 37 ff 23 00 00 0a 23 52 45 6c 54 2e 00 76 67 65 73 ff ff 00 00 45 45 | RE.T:LE:u7.#...#RElT..vges....EE |
a8d20 | 7f 42 56 41 80 41 24 0f 00 00 65 01 00 d8 20 2e 75 37 ff 23 00 00 0a 23 66 45 6c 54 2e 00 76 67 | .BVA.A$...e.....u7.#...#fElT..vg |
a8d40 | 65 73 ff ff cd f8 44 28 56 41 01 00 3e 6f 54 48 49 ff 7f 3b 0a 81 0f 87 02 04 00 82 23 23 23 23 | es....D(VA..>oTHI..;........#### |
a8d60 | 23 0c 00 4e 0a 23 52 2f 00 00 01 00 d8 d8 d8 ed f8 44 28 56 41 01 00 2c 6f 54 48 49 ff 41 4c 45 | #..N.#R/.........D(VA..,oTHI.ALE |
a8d80 | 7f 54 20 ff fa 55 45 23 23 23 23 04 0a 23 52 45 3e 3e 3e 60 73 65 7a 3e 3e 3e 3e 3e 32 3e 3e 3e | .T...UE####..#RE>>>`sez>>>>>2>>> |
a8da0 | 3e 3e 3e 29 ff ff ff 7f 43 4f 4e 46 4c 49 43 6c 69 64 56 41 56 41 4c 41 54 2f 00 00 01 00 d8 d8 | >>>)....CONFLIClidVAVALAT/...... |
a8dc0 | 23 0c 00 4e 0a 23 52 2f 20 6a 73 6f 6e 5f 69 6e 73 65 72 74 28 31 2c 31 2c 31 29 00 00 01 00 d8 | #..N.#R/.json_insert(1,1,1)..... |
a8de0 | d8 d8 ed f8 44 28 56 41 81 0c 87 01 04 00 82 1d 23 23 23 10 23 23 23 0a 23 52 00 7f 54 20 01 00 | ....D(VA........###.###.#R..T... |
a8e00 | 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 20 23 23 23 23 0a 23 52 45 45 3a 75 37 28 61 20 2e | UE#####.#RE.T...####.#REE:u7(a.. |
a8e20 | 40 2c 32 29 80 00 4c 45 3a 75 37 2a 7f 20 2e 50 2c 32 29 ff ff ff 7f 43 4f 4e 46 41 56 41 4c 41 | @,2)..LE:u7*...P,2)....CONFAVALA |
a8e40 | 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 28 56 41 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 | T/.........D(VAT...UE#####.#RE.T |
a8e60 | 20 00 00 23 23 23 1b 0a 23 52 45 7f 54 01 00 3e 6b 54 2f 49 ff 7f 3b 0a 81 1a 87 00 04 00 82 39 | ...###..#RE.T..>kT/I..;........9 |
a8e80 | 23 23 23 10 23 23 23 0a 23 52 00 7f 54 20 01 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 20 | ###.###.#R..T...UE#####.#RE.T... |
a8ea0 | 23 23 23 23 0a 23 52 45 20 23 52 00 7f 54 20 01 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 | ####.#RE.#R..T...UE#####.#RE.T.. |
a8ec0 | 20 23 23 23 23 0a 23 52 45 2a 7f 20 2e 50 2c 32 29 ff ff ff 7f 43 4f 4e 46 41 56 41 4c 41 54 2f | .####.#RE*...P,2)....CONFAVALAT/ |
a8ee0 | 00 00 01 00 d8 d8 d8 ed f8 44 28 56 41 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f 54 20 00 | .........D(VAT...UE#####.#RE.T.. |
a8f00 | 00 23 23 23 1b 0a 23 52 45 7f 54 01 00 3e 6b 54 2f 49 ff 7f 3b 0a 82 27 86 7f 04 00 84 53 23 00 | .###..#RE.T..>kT/I..;..'.....S#. |
a8f20 | 6f 20 00 61 e3 de de de 00 ff fe 00 ff ff 04 ff ff 1a ff ff 67 65 63 6f 72 64 65 73 57 57 57 57 | o..a................gecordesWWWW |
a8f40 | 40 57 57 57 57 57 71 57 57 20 ff ff 57 66 57 57 ff 80 57 57 57 57 56 57 57 20 54 45 58 54 de ce | @WWWWWqWW...WfWW..WWWWVWW.TEXT.. |
a8f60 | de de de de de 20 20 56 41 4c 0f 50 45 49 3a 41 52 48 01 15 cb ff ff ff ff ff 01 ff 00 00 00 ff | .......VAL.PEI:ARH.............. |
a8f80 | 57 57 57 57 57 57 41 55 54 4f 49 4e 43 52 3e 4d 45 4e 54 57 57 57 57 57 69 57 20 52 43 55 52 56 | WWWWWWAUTOINCR>MENTWWWWWiW.RCURV |
a8fa0 | 41 4c 52 45 4e 54 fe fe fe f9 fe 45 53 65 63 6f 1a 27 fe fe fe fe fe f3 54 20 43 55 52 56 41 4c | ALRENT.....ESeco.'......T.CURVAL |
a8fc0 | 52 45 4e 54 fe fe fe f9 fe 45 53 65 63 6f 1a 27 fe fe fe fe fe f3 54 1e 57 57 57 57 57 57 57 57 | RENT.....ESeco.'......T.WWWWWWWW |
a8fe0 | 57 57 57 57 f7 fe ff ff 28 56 41 20 ff ff 1a ff ff 67 65 63 6f 72 64 65 73 57 57 57 57 40 57 57 | WWWW....(VA......gecordesWWWW@WW |
a9000 | 57 57 57 71 57 57 20 52 20 20 55 52 56 43 54 7f ff ff ff 29 20 44 4f 20 4e 49 4d 03 39 ff ff 7f | WWWqWW.R..URVCT....).DO.NIM.9... |
a9020 | 00 00 ff 02 00 29 54 20 ff ff 00 00 45 53 29 31 2c 32 00 54 7f ff ff ff 29 3f 44 4f 23 ff ff 54 | .....)T.....ES)1,2.T....)?DO#..T |
a9040 | 0a 04 86 7e 03 00 0f 23 24 86 7d 03 00 4f 22 00 49 49 54 49 4b 87 66 49 55 49 ff ff ff 7f 21 21 | ...~...#$.}..O".IITIK.fIUI....!! |
a9060 | 21 21 00 00 01 04 12 00 07 21 54 49 4e 54 0b 81 13 86 7c 04 00 82 2b 20 57 49 54 48 20 63 28 78 | !!.......!TINT....|...+.WITH.c(x |
a9080 | 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 2d 6a 73 6f 6e 5f 67 | ).AS.(values(1))...SELECT-json_g |
a90a0 | 72 6f 75 70 5f 61 72 72 61 79 28 32 30 30 31 2d 30 31 2d 30 31 31 29 52 4f 57 49 44 3b 0a 49 4e | roup_array(2001-01-011)ROWID;.IN |
a90c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
a90e0 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
a9100 | 48 49 4e 47 3b 0a 81 17 86 7b 04 00 82 33 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c | HING;....{...3.WITH.c(x).AS.(val |
a9120 | 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 73 75 62 73 74 72 28 31 2c 31 2c 31 29 2d 6a | ues(1))...SELECT.substr(1,1,1)-j |
a9140 | 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | son_group_array(1)ROWID;.INSERT. |
a9160 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
a9180 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
a91a0 | 0a 81 0e 86 7a 04 00 82 21 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | ....z...!.WITH.c(x).AS.(values(1 |
a91c0 | 29 29 20 20 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 57 48 | ))...SELECT.sqlite_source_id()WH |
a91e0 | 45 52 45 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | ERE.ROWID;.INSERT.INTO.t1(a,b).V |
a9200 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ALUES(1,2),(3,4),(1,2)ON.CONFLIC |
a9220 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 79 04 00 82 17 20 57 49 54 48 | T(a,b).DO.NOTHING;....y.....WITH |
a9240 | 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 | .c(x).AS.(values(1))...SELECT.js |
a9260 | 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 3f 2c 31 2c 3f 2c 31 29 52 4f 57 49 44 3b 0a 49 4e 53 45 | on_replace(1,?,1,?,1)ROWID;.INSE |
a9280 | 52 54 20 49 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 80 ff 29 2c 28 31 | RT.It1(a,b).VALUES(1,2),(3..),(1 |
a92a0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
a92c0 | 81 09 86 78 04 00 82 17 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 | ...x.....WITH.c(x).AS.(values(1) |
a92e0 | 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 3f 2c 31 29 52 4f | )...SELECT.json_replace(1,?,1)RO |
a9300 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
a9320 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 1,2),(3,4),(1,2)ON.CONFLICT(a,b) |
a9340 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 77 04 00 82 17 20 57 49 54 48 20 63 28 78 29 20 | .DO.NOTHING;....w.....WITH.c(x). |
a9360 | 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 72 65 70 | AS.(values(1))...SELECT.json_rep |
a9380 | 6c 61 63 65 28 20 40 31 2c 31 29 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | lace(.@1,1)ROWID;.INSERT.INTO.t1 |
a93a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | (a,b).VALUES(1,2),(3,4),(1,2)ON. |
a93c0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0a 86 76 04 00 | CONFLICT(a,b).DO.NOTHING;....v.. |
a93e0 | 82 19 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 | ...WITH.c(x).AS.(values(1))...SE |
a9400 | 4c 45 43 54 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 20 29 52 4f 57 49 44 3b 0a 49 4e 53 45 52 | LECT.json_replace(.)ROWID;.INSER |
a9420 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 55 | T.INTO.t1(a,b).VALUES(1,2),(3,4U |
a9440 | 4e 49 4f 4e 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | NION),(1,2)ON.CONFLICT(a,b).DO.N |
a9460 | 4f 54 48 49 4e 47 3b 0a 81 09 86 75 04 00 82 17 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 | OTHING;....u.....WITH.c(x).AS.(v |
a9480 | 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 | alues(1))...SELECT.json_replace( |
a94a0 | 20 20 22 61 22 29 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | .."a")ROWID;.INSERT.INTO.t1(a,b) |
a94c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | .VALUES(1,2),(3,4),(1,2)ON.CONFL |
a94e0 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 00 00 00 06 04 00 81 11 86 74 04 | ICT(a,b).DO.NOTHING;..........t. |
a9500 | 00 82 27 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 | ..'.WITH.c(x).AS.(values(1))...S |
a9520 | 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 2d 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 | ELECT.json(1)-json_group_array(1 |
a9540 | 29 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | )ROWID;.INSERT.INTO.t1(a,b).VALU |
a9560 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ES(1,2),(3,4),(1,2)ON.CONFLICT(a |
a9580 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 73 04 00 82 17 20 57 49 54 48 20 63 28 | ,b).DO.NOTHING;....s.....WITH.c( |
a95a0 | 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f | x).AS.(values(1))...SELECT.json_ |
a95c0 | 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 3f 2c 31 29 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | array_length(?,1)ID;.INSERT.INTO |
a95e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 | .t1(a,b).VALUES(1,2),(3,4),(1,2) |
a9600 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 | ON.CONFLICT(a,b).DO.NOTHING;.... |
a9620 | 72 04 00 82 17 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 | r.....WITH.c(x).AS.(values(1)).. |
a9640 | 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 2c 31 29 49 44 | .SELECT.json_array_length(1,1)ID |
a9660 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ;.INSERT.INTO.t1(a,b).VALUES(1,2 |
a9680 | 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | ),(3,4),(1,2)ON.CONFLICT(a,b).DO |
a96a0 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 13 86 71 04 00 82 2b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 | .NOTHING;....q...+.WITH.c(x).AS. |
a96c0 | 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 5f | (values(1))...SELECT.json_array_ |
a96e0 | 6c 65 6e 67 74 68 28 31 20 67 6c 6f 62 28 31 2c 31 29 2c 31 29 49 44 3b 0a 49 4e 53 45 52 54 20 | length(1.glob(1,1),1)ID;.INSERT. |
a9700 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
a9720 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
a9740 | 0a 81 09 86 70 04 00 82 17 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | ....p.....WITH.c(x).AS.(values(1 |
a9760 | 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 29 2c | ))...SELECT.json_array_length(), |
a9780 | 31 29 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | 1)ID;.INSERT.INTO.t1(a,b).VALUES |
a97a0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | (1,2),(3,4),(1,2)ON.CONFLICT(a,b |
a97c0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 14 86 6f 04 00 82 2d 20 57 49 54 48 20 63 28 78 29 | ).DO.NOTHING;....o...-.WITH.c(x) |
a97e0 | 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 | .AS.(values(1))...SELECT.json_ar |
a9800 | 72 61 79 5f 6c 65 6e 67 74 68 28 20 72 6f 75 6e 64 28 31 2c 31 29 20 2d 31 29 49 44 3b 0a 49 4e | ray_length(.round(1,1).-1)ID;.IN |
a9820 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
a9840 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
a9860 | 48 49 4e 47 3b 0a 81 19 86 6e 04 00 82 37 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c | HING;....n...7.WITH.c(x).AS.(val |
a9880 | 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 | ues(1))...SELECT.json_array_leng |
a98a0 | 74 68 28 20 6a 73 6f 6e 5f 73 65 74 28 31 2c 31 2c 31 29 20 2d 31 29 49 44 3b 0a 49 4e 53 45 52 | th(.json_set(1,1,1).-1)ID;.INSER |
a98c0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
a98e0 | 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e | ,(1,2)ON.CONFLICT(a,b).DO.NOTHIN |
a9900 | 47 3b 0a 81 09 86 6d 04 00 82 17 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 | G;....m.....WITH.c(x).AS.(values |
a9920 | 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 | (1))...SELECT.json_array_length( |
a9940 | 20 2d 31 29 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .-1)ID;.INSERT.INTO.t1(a,b).VALU |
a9960 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ES(1,2),(3,4),(1,2)ON.CONFLICT(a |
a9980 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 6c 04 00 82 17 20 57 49 54 48 20 63 28 | ,b).DO.NOTHING;....l.....WITH.c( |
a99a0 | 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f | x).AS.(values(1))...SELECT.json_ |
a99c0 | 61 72 72 32 30 30 31 2d 30 31 2d 30 31 20 2d 31 29 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | arr2001-01-01.-1)ID;.INSERT.INTO |
a99e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 | .t1(a,b).VALUES(1,2),(3,4),(1,2) |
a9a00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 1b 86 | ON.CONFLICT(a,b).DO.NOTHING;.... |
a9a20 | 6b 04 00 82 3b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 | k...;.WITH.c(x).AS.(values(1)).. |
a9a40 | 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 2d 6a 73 6f 6e 5f 67 | .SELECT.group_concat(1,1)-json_g |
a9a60 | 72 6f 75 70 5f 61 72 72 61 79 28 31 29 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | roup_array(1)ROWID;.INSERT.INTO. |
a9a80 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f | t1(a,b).VALUES(1,2),(3,4),(1,2)O |
a9aa0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 11 86 6a | N.CONFLICT(a,b).DO.NOTHING;....j |
a9ac0 | 04 00 82 27 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 | ...'.WITH.c(x).AS.(values(1))... |
a9ae0 | 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 | SELECT.DISTINCT.json_array(1,1,1 |
a9b00 | 29 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | ).ROWID;.INSERT.INTO.t1(a,b).VAL |
a9b20 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | UES(1,2),(3,4),(1,2)ON.CONFLICT( |
a9b40 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 69 04 00 82 17 20 57 49 54 48 20 63 | a,b).DO.NOTHING;....i.....WITH.c |
a9b60 | 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 32 30 30 31 | (x).AS.(values(1))...SELECT.2001 |
a9b80 | 2d 30 31 2d 30 31 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | -01-01.WITHOUT.ROWID;.INSERT.INT |
a9ba0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 | O.t1(a,b).VALUES(1,2),(3,4),(1,2 |
a9bc0 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0b | )ON.CONFLICT(a,b).DO.NOTHING;... |
a9be0 | 86 68 04 00 82 1b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 | .h.....WITH.c(x).AS.(values(1)). |
a9c00 | 20 20 53 45 4c 45 43 54 20 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 48 41 56 49 4e | ..SELECT..json_array(1,1,1)HAVIN |
a9c20 | 47 20 52 4f 57 49 44 3b 0a 49 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | G.ROWID;.IT.INTO.t1(a,b).VALUES( |
a9c40 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 1,2),(3,4),(1,2)ON.CONFLICT(a,b) |
a9c60 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 86 67 04 00 82 1d 20 41 54 54 41 43 48 28 78 29 20 | .DO.NOTHING;....g.....ATTACH(x). |
a9c80 | 41 53 2d 4e 4f 54 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 | AS-NOT(values(1))...b.INRY.KEY(a |
a9ca0 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
a9cc0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 | .t1(a,b).VALUES(1,2),(3,4),(1,2) |
a9ce0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 86 | ON.CONFLICT(a,b).DO.NOTHING;.... |
a9d00 | 66 04 00 82 1d 20 41 54 54 41 43 48 28 78 29 20 41 53 20 ac 76 61 6c 75 65 73 28 31 3d 29 20 49 | f.....ATTACH(x).AS..values(1=).I |
a9d20 | 4e 52 59 20 63 56 6e 4b 10 00 28 61 2c 62 54 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | NRY.cVnK..(a,bT.).WITHOUT.ROWID; |
a9d40 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 73 69 6f 74 47 28 61 2c 62 29 20 75 41 4c 55 45 53 28 | .INSERT.INTO.rsiotG(a,b).uALUES( |
a9d60 | 31 2c 32 29 2c 28 33 2c 34 29 0c 28 31 2c 32 29 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 00 | 1,2),(3,4).(1,2)ITHOUT.ROWID;.I. |
a9d80 | 00 63 6c 75 64 49 54 48 49 4e 47 3b 0a 81 09 86 65 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 | .cludITHING;....e.....ATTACH(x). |
a9da0 | 41 53 20 a8 76 61 6c 75 65 73 28 31 29 29 20 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 | AS..values(1))...b.INRY.KEY(a,b) |
a9dc0 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
a9de0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | (a,b).VALUES(1,2),(3,4),(1,2)ON. |
a9e00 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 63 86 64 04 00 81 | CONFLICT(a,b).DO.NOTHING;.c.d... |
a9e20 | 4b 20 41 54 54 41 43 48 28 78 29 20 41 53 20 a8 52 59 4f 57 49 44 3b 52 45 49 4e 44 45 58 20 49 | K.ATTACH(x).AS..RYOWID;REINDEX.I |
a9e40 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
a9e60 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
a9e80 | 63 86 63 04 00 81 4b 20 41 54 54 41 43 48 28 78 29 20 41 53 20 a8 52 59 4f 57 49 44 3b 41 4e 41 | c.c...K.ATTACH(x).AS..RYOWID;ANA |
a9ea0 | 4c 59 5a 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | LYZE.INTO.t1(a,b).VALUES(1,2),(3 |
a9ec0 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
a9ee0 | 48 49 4e 47 3b 0a 81 09 86 62 04 00 82 17 20 41 54 54 41 43 48 28 78 29 20 41 53 20 a8 50 52 49 | HING;....b.....ATTACH(x).AS..PRI |
a9f00 | 4d 41 52 59 20 4b 45 59 20 20 62 20 49 4e 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | MARY.KEY..b.INRY.KEY(a,b).).WITH |
a9f20 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
a9f40 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ALUES(1,2),(3,4),(1,2)ON.CONFLIC |
a9f60 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 86 61 04 00 82 17 20 41 54 54 41 | T(a,b).DO.NOTHING;....a.....ATTA |
a9f80 | 43 48 28 78 29 20 41 53 20 7a 65 72 6f 62 6c 6f 62 28 31 29 00 20 20 62 20 49 4e 52 59 20 4b 45 | CH(x).AS.zeroblob(1)...b.INRY.KE |
a9fa0 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
a9fc0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
a9fe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
aa000 | 0d 00 00 00 3b 00 c8 00 1f 71 1e 91 1d c8 1c ff 1c 3e 1b 75 1b 3e 1a df 1a 94 1a 49 19 fc 19 96 | ....;....q.......>.u.>.....I.... |
aa020 | 19 19 18 be 18 50 18 47 17 e7 17 c2 17 08 17 00 16 a6 16 4e 16 43 15 97 15 8d 15 3e 14 db 14 21 | .....P.G...........N.C.....>...! |
aa040 | 13 94 13 45 12 ba 12 6b 11 dd 11 50 10 b3 10 25 0e aa 0e 14 0d 02 0c 75 0b 9d 0b 0d 0a 74 09 c3 | ...E...k...P...%.......u.....t.. |
aa060 | 09 77 08 e7 08 57 07 ca 07 7c 06 ef 06 62 05 a9 04 9b 04 0c 03 3a 02 ad 01 f6 01 5f 00 c8 00 00 | .w...W...|...b.......:....._.... |
aa080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
aa0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
aa0c0 | 00 00 00 00 00 00 00 00 81 13 87 54 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ...........T...+CREATE.TABLE.t1( |
aa0e0 | 0a 20 20 61 20 49 4e 54 20 44 45 46 41 55 4c 54 20 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | ...a.INT.DEFAULT.NT,...b.INT.UNI |
aa100 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2e 0a 20 20 44 45 46 41 55 4c | QUE,...c.INT.DEFAULT.0....DEFAUL |
aa120 | 54 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 32 29 2c 28 33 2c 34 29 2c 28 31 00 | T.KEY(aa,b).VALUES(12),(3,4),(1. |
aa140 | 00 00 01 4e 20 43 4f 4e 46 4c 49 43 54 28 61 37 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | ...N.CONFLICT(a7b).DO.NOTHING;.. |
aa160 | 13 87 53 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 44 45 46 41 | ..S...+CREATE.TABLE.t1(...a.DEFA |
aa180 | 55 4c 54 20 30 58 44 45 46 41 41 44 44 61 2c 62 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | ULT.0XDEFAADDa,bNT.UNIQUE,...c.I |
aa1a0 | 4e 5a 20 44 45 46 41 55 4c 54 20 30 58 44 45 46 41 41 44 44 61 2c 62 29 0a 20 20 57 49 54 48 4f | NZ.DEFAULT.0XDEFAADDa,b)...WITHO |
aa1c0 | 55 54 20 52 4f 57 49 44 3a fe 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 | UT.ROWID:.INSERT1(a,b1,2)ON.CONF |
aa1e0 | 4c 49 43 4e 28 61 2c 62 29 20 44 4f 20 4e 71 54 48 49 4e 47 3b 0a 81 33 87 52 04 00 82 6b 43 52 | LICN(a,b).DO.NqTHING;..3.R...kCR |
aa200 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 | EATE.TABLE.t1(...a.COLLATE.nocas |
aa220 | 65 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | e..c.INT.DEFAULT.0,...PRIMARY.KE |
aa240 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
aa260 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
aa280 | 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 | ,2)....ON.CONFLICT(a,b).DO.UPDAT |
aa2a0 | 45 20 53 45 54 20 63 3d 63 2b 31 3b 0a 81 09 87 51 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c | E.SET.c=c+1;....Q....CREATE.TABL |
aa2c0 | 45 20 74 31 28 0a 20 20 61 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 49 51 55 45 2c 0a 20 20 63 20 49 | E.t1(...a.COLLATE.nocIQUE,...c.I |
aa2e0 | 4e 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | N).WITHOUT.ROWID;.INSERT.INTO.t1 |
aa300 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | (a,b).VALUES(1,2),(3,4),(1,2)ON. |
aa320 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 87 50 04 00 | CONFLICT(a,b).DO.NOTHING;..N.P.. |
aa340 | 83 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 31 28 | .!CREATE.TABLE.t(a,b).DO.NOTHI1( |
aa360 | 0a 14 20 61 45 58 50 4c 41 49 4e 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 4c 54 | ...aEXPLAIN.INT,...b.INT.UNIQULT |
aa380 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
aa3a0 | 20 52 4f 57 49 44 3b 0a ff 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;..NSERT.INTO.t1(a,b).VALU |
aa3c0 | 45 53 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 23 28 31 b5 b5 b5 b5 b5 | ES#######################(1..... |
aa3e0 | b5 b5 b5 b5 b5 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 43 52 | .....(1,2)ON.CONFLICT(a,b).DO.CR |
aa400 | 4f 53 53 4e 4f 54 48 49 4e 47 3b 0a 81 0b 87 4f 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 | OSSNOTHING;....O....CREATE.TABLE |
aa420 | 20 74 0d 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 56 41 | .t.(a,b,c,d,PRIMARY.KEY(b,d));VA |
aa440 | 43 55 55 4d 0a 3b 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 49 4e 53 45 52 54 20 49 4e 54 4f 20 | CUUM.;ITH.data(a,b,cINSERT.INTO. |
aa460 | 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f | t1(a,b,c,d).SELECT.*.FROM.data.O |
aa480 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 82 0a 87 4e 04 | N.CONFLICT(b,d).UPDATE.SET....N. |
aa4a0 | 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 b6 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 | ...CREATE.TABLE.s.(...a.INT.UNIQ |
aa4c0 | 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | UE.ON.CONFLICT.fail,...b.INT.UNI |
aa4e0 | 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 | QUE.ON.CONFLICT.replace,...c.INT |
aa500 | 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e | .UNIQUE.ON.CONFLICT.fail,...d.IN |
aa520 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a | T.UNIQUE.ON.CONFLICT.replace.);. |
aa540 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t6(a,b,c,d).VALUES(1 |
aa560 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 2c 30 | ,2,3,4),(5,6,7,8),(1,100,110,1,0 |
aa580 | 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | )...ON.CONFLICT(a).DO.UPDATE.SET |
aa5a0 | 20 61 3d 31 30 30 30 3b 0a 81 35 87 4d 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 b2 | .a=1000;..5.M...oCREATE.TABLE.s. |
aa5c0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
aa5e0 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
aa600 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
aa620 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c | 1,2),(3,4),(1,5),(.?16,7),(3,1), |
aa640 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 41 4e 41 4c 59 5a | (8,9),(6,11),(1,1);VACUUM;ANALYZ |
aa660 | 45 0a 81 09 87 4c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 b1 28 0a 20 20 61 20 49 | E....L....CREATE.TABLE.s.(...a.I |
aa680 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | NT,...b.INT.UNIQUE,...c.INT.DEFA |
aa6a0 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 2e 8a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b..).WITH |
aa6c0 | 4f 55 54 20 52 4f 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | OUT.RO,(3,4),(1,2)ON.CONFLICT(a, |
aa6e0 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 4b 04 00 82 17 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;....K....CREATE.TA |
aa700 | 42 4c 45 20 73 71 6c 69 74 65 5f 69 6f 6e 28 29 20 49 4e 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | BLE.sqlite_ion().INRIMARY.KEY(a, |
aa720 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
aa740 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f | t1(a,b).VALUES(1,2),(3,4),(1,2)O |
aa760 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 4b 87 4a 04 | N.CONFLICT(a,b).DO.NOTHING;.K.J. |
aa780 | 00 81 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 71 6c 00 ff 65 5f 4f 55 54 2f 52 4f 57 49 44 | ...CREATE.TABLE.sql..e_OUT/ROWID |
aa7a0 | 3b 0a 49 6e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 2b 2c 62 29 20 56 41 28 61 2c 62 29 20 44 4f | ;.InSERT.INTO.t1(+,b).VA(a,b).DO |
aa7c0 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 49 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 73 | .NOTHING;....I....CREATE.TABLE.s |
aa7e0 | 71 2c 69 74 65 5f 69 6f 6e 28 29 20 49 4e 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | q,ite_ion().INRIMARY.KEY(a,b).). |
aa800 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
aa820 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e | b).VALUES(1,2),(3,4),(1,2)ON.CON |
aa840 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 87 48 04 00 82 1d 43 | FLICT(a,b).DO.NOTHING;....H....C |
aa860 | 52 45 41 54 45 20 54 41 42 4c 45 20 53 51 54 f4 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | REATE.TABLE.SQT.4(a.INT,.b.INT); |
aa880 | 41 4e 41 4c 59 5a 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | ANALYZE.UNIQUE.INDEX.t4a1.ON.t4( |
aa8a0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | a).WHERE.b<1000;.CNTO.t4(a,b).VA |
aa8c0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
aa8e0 | 54 48 49 4e 47 3b 0a 81 0c 87 47 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 53 45 54 f4 | THING;....G....CREATE.TABLE.SET. |
aa900 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 41 4e 41 4c 59 5a 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);ANALYZE.UNIQUE.I |
aa920 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
aa940 | 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 | .CNTO.t4(a,b).VALUES(50,60).ON.C |
aa960 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 49 87 46 04 00 81 17 43 52 | ONFLICT(a).DO.NOTHING;.I.F....CR |
aa980 | 45 41 54 45 20 54 41 42 4c 45 20 53 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 51 55 45 2c 00 | EATE.TABLE.S7(a.UNIQUE,.b.UQUE,. |
aa9a0 | 7f 20 55 4e 49 51 55 45 29 3b 41 4e 41 4c 59 5a 45 20 49 4e 54 28 20 44 4f 20 4e 35 54 48 49 4e | ..UNIQUE);ANALYZE.INT(.DO.N5THIN |
aa9c0 | 47 3b 0a 81 2d 87 45 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 53 28 27 0a 20 20 61 20 | G;..-.E..._CREATE.TABLE.S('...a. |
aa9e0 | 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 | INT,...b.INT.UNIQUE,...c.INT.DEF |
aaa00 | 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 | AULT.0,...PRIMARY.KEY(a,b).).WIT |
aaa20 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | HOUT.ROWID;.INSERT.INTO.t1(a,b). |
aaa40 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | VALUES(1,2),(3,4),(1,2)ON.CONFLI |
aaa60 | 43 54 28 e1 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 15 87 44 04 00 82 2f 43 52 45 41 | CT(.,b).DO.NOTHING;....D.../CREA |
aaa80 | 54 45 20 54 41 42 4c 45 20 53 20 28 56 41 4c 55 45 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.S.(VALUE,d,PRIMARY.KEY( |
aaaa0 | 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 | b,d));.WITH.data(a,b,c,d).AS.(VA |
aaac0 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 33 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 | LUES(1,2,3,4),(5,3,7,8),(9,10,11 |
aaae0 | 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 | ,12)).INSERT.INTO.t1(a,b,c,d).SE |
aab00 | 4c 45 43 54 20 2a 20 46 52 4f 4d 00 0a 81 0c 87 43 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c | LECT.*.FROM.....C....CREATE.TABL |
aab20 | 45 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 | E.CURRENT_TIMESTAMPt1(a,b,c,d,PR |
aab40 | 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 29 3b 56 41 43 55 55 4d 0a 3b 49 54 48 20 64 61 74 61 | .json_test1(1));VACUUM.;ITH.data |
aab60 | 28 61 2c 62 2c 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 | (a,b,a,b,c,d).SELECT.*.FROM.data |
aab80 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 54 87 | .ON.CONFLICT(b,d).UPDATE.SET..T. |
aaba0 | 42 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 | B...-CREATE.TABLE.CURRENT_TIMEST |
aabc0 | 41 4d 50 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 47 2c 0a | AMPt1(...a.INT,...b.INT.UNIQUG,. |
aabe0 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..c.INT.DEFAULT.0,...PRIMARY.KEY |
aac00 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
aac20 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 36 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | TO.t1(a,b).VALUE6(1,2),(3,4),(1, |
aac40 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 45 59 28 61 2c 62 29 0a 29 20 57 49 | 2)ON.CONFLICT(a,b).DEY(a,b).).WI |
aac60 | 54 48 4f 55 54 20 52 4f 57 49 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 41 04 00 82 17 43 52 45 | THOUT.ROWIO.NOTHING;....A....CRE |
aac80 | 41 54 45 20 54 41 42 4c 45 20 43 55 52 52 45 4e 54 5f 44 41 54 52 45 47 45 58 50 20 61 20 49 4e | ATE.TABLE.CURRENT_DATREGEXP.a.IN |
aaca0 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 | T,...b.INT.UNTHOUT.ROWID;.INSERT |
aacc0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | .INTO.t1(a,b).VALUES(1,2),(3,4), |
aace0 | 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | (1,2)ON.CONFLICT(a,b).DO.NOTHING |
aad00 | 3b 0a 82 0e 87 40 04 00 84 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 43 41 53 45 74 36 28 0a 20 | ;....@...!CREATE.TABLE.CASEt6(.. |
aad20 | 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a | .a.INT.UNIQUE.ON.CONFLICT.fail,. |
aad40 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 | ..b.INT.UNIQUE.ON.CONFLICT.repla |
aad60 | 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | ce,...c.INT.UNIQUE.ON.CONFLICT.f |
aad80 | 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ail,...d.INT.UNIQUE.ON.CONFLICT. |
aada0 | 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c | replace.);.INSERT.INTO.t6(a,b,c, |
aadc0 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c | d).VALUES(1,2,3,4),(5,6,7,8),(1, |
aade0 | 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | 100,110,120)...ON.CONFLICT(a).DO |
aae00 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 81 12 87 3f 04 00 82 29 43 52 45 41 | .UPDATE.SET.a=1000;....?...)CREA |
aae20 | 54 45 20 54 41 42 4c 45 20 41 4e 41 4c 59 5a 45 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | TE.TABLE.ANALYZEt1(a,b,c,d,PRIMA |
aae40 | 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 56 41 43 55 55 4d 0a 3b 49 54 48 20 64 61 74 61 28 61 2c | RY.KEY(b,d));VACUUM.;ITH.data(a, |
aae60 | 62 2c 63 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 | b,cINSERT.INTO.t1(a,b,c,d).SELEC |
aae80 | 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 | T.*.FROM.data.ON.CONFLICT(b,d).U |
aaea0 | 50 44 41 54 45 20 53 45 54 0a 82 77 87 3e 04 00 85 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 41 | PDATE.SET..w.>...sCREATE.TABLE.A |
aaec0 | 42 4f 52 54 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 | BORTt1(a.INT,b.INTEGER,.c.TEXT,. |
aaee0 | 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 | d.BLOB,.e.ANY,.....UNIQUE(a).ON. |
aaf00 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
aaf20 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
aaf40 | 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 | ail.).WITHOUT.ROWID;.CREATE.INDE |
aaf60 | 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | X.t1d.ON.t1(d);.CREATE.UNIQUE.IN |
aaf80 | 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | DEX.t1e.ON.t1(e);.INSERT.INTO.t1 |
aafa0 | 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 | (a,b,c,d,e).VALUES(1,2,'abc','b3 |
aafc0 | 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c | ',3.5);.INSERT.INTO.t1.VALUES(2, |
aafe0 | 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 | 2,'xyz',NULL,4.25).ON.CONFLICT(b |
ab000 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 | ).DO.UPDATE.SET.e=max(e,excluded |
ab020 | 2e 65 29 3b 0a 81 0a 87 3d 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 40 49 4e 54 31 28 | .e);....=....CREATE.TABLE.@INT1( |
ab040 | 0f 20 20 61 20 49 4e 54 64 00 20 20 62 20 5c 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e | ...a.INTd...b.\NT.UNIQUE,...c.IN |
ab060 | 54 2c 44 45 46 41 55 4c 54 20 30 2c ff 7f 20 20 00 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 49 | T,DEFAULT.0,.....IMARY.KEY(a,b)I |
ab080 | 45 53 28 31 2c 32 29 33 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 49 4e 54 20 43 4f 4e 46 4c 49 43 | ES(1,2)3(3,4),(1,2)ONINT.CONFLIC |
ab0a0 | 54 28 61 2c 62 29 28 44 4f 64 4e 4f 35 48 49 4e 47 3b 0a 81 19 87 3c 04 00 82 37 43 52 45 41 54 | T(a,b)(DOdNO5HING;....<...7CREAT |
ab0c0 | 45 20 54 41 42 4c 45 20 20 61 2e 62 74 31 27 2c 0a 20 8c 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | E.TABLE..a.bt1',...b.INT.UNIQUE, |
ab0e0 | 0a 20 20 63 20 49 4e 54 17 44 45 46 41 66 66 66 66 66 66 66 66 66 66 66 66 66 41 52 59 20 55 45 | ...c.INT.DEFAfffffffffffffARY.UE |
ab100 | 2c 0a 20 20 63 20 49 4e 54 17 44 45 46 41 66 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | ,...c.INT.DEFAfKEY(a,b).).WITHOU |
ab120 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 | T.ROWID;.INSERT.INUE,...c.INT.DE |
ab140 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 74 31 27 0a 81 09 87 3b 04 00 82 17 43 52 45 41 54 45 20 3a | FAULT.0,...Pt1'....;....CREATE.: |
ab160 | 3a 3a 3a 3a 3a 3a 3a 3a 00 80 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 20 3d 45 e8 03 6a 73 6f | ::::::::..::::::::::::::.=E..jso |
ab180 | 6e 5f 70 61 74 6f 75 6e 74 73 ff 0a d7 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 28 7a 2c 20 56 61 | n_patounts...NSERT.INTO.t3(z,.Va |
ab1a0 | 2b 55 00 00 00 20 20 85 66 72 66 54 cf cf cf cf cf cf cf cf cf cf cf cf cf d1 66 66 66 66 66 64 | +U......frfT..............fffffd |
ab1c0 | 65 64 43 6b 4e 20 4c 49 43 54 28 61 2c 6b a9 44 61 00 49 6f 54 18 00 34 20 62 31 9d 0a 81 0a 87 | edCkN.LICT(a,k.Da.IoT..4.b1..... |
ab1e0 | 3a 04 00 82 19 42 45 47 49 4e 3b 10 6e 75 64 65 64 54 ff ff 4f 54 48 49 4e 20 50 52 49 53 45 54 | :....BEGIN;.nudedT..OTHIN.PRISET |
ab200 | 20 74 31 0c 0a 20 64 61 20 00 4e 46 2c 0a 20 80 ff ff ff 77 3f 20 55 55 54 00 80 ff ff 4c 54 20 | .t1...da..NF,......w?.UUT....LT. |
ab220 | 0d 2c 0a 20 20 50 56 49 4d 52 49 4e 4e 45 52 00 02 61 2c 62 29 64 20 50 20 64 61 20 00 4e 46 2c | .,...PVIMRINNER..a,b)d.P.da..NF, |
ab240 | 0a 20 80 ff ff ff 77 3f 74 31 28 0a 20 64 61 20 00 4e 54 3a 0a 20 20 62 44 4f 00 4e 61 29 4f 00 | ......w?t1(..da..NT:...bDO.Na)O. |
ab260 | 7f ff ff 4f 54 48 49 4e 47 3b 0a 4c 87 39 04 00 81 1d 41 4e 41 4c 59 5a 45 00 78 29 20 52 45 4e | ...OTHING;.L.9....ANALYZE.x).REN |
ab280 | 41 4d 45 58 33 57 49 4e 48 20 63 30 78 49 4e 54 70 5d 69 43 41 53 45 6e 74 66 28 31 2c 31 09 0d | AMEX3WINH.c0xINTp]iCASEntf(1,1.. |
ab2a0 | 41 7f ff ff 20 70 72 69 6e 74 66 28 31 2c 31 29 ff 76 61 6c 00 00 57 ab 54 48 81 07 87 38 04 00 | A....printf(1,1).val..W.TH...8.. |
ab2c0 | 82 13 40 f8 28 49 30 54 20 b1 bc 10 ff 33 41 4c 4b 64 53 28 36 3a 20 74 31 28 61 4d 41 52 59 20 | ..@.(I0T.....3ALKdS(6:.t1(aMARY. |
ab2e0 | 5a 00 59 2c 64 29 2a 3a c3 c3 28 31 31 16 32 2c 33 2c ce ce ce ce ce ce ce ce ce ce ce ce ce 20 | Z.Y,d)*:..(11.2,3,.............. |
ab300 | 6a 73 6f 6e 28 31 29 ce ce ce ce ce ce ce ce ce ce ce ce ce ce ce ce ce ce 34 29 2c 28 35 2c 45 | json(1)..................4),(5,E |
ab320 | 49 4e 54 00 00 00 80 36 80 00 29 2a 3a 7f 00 28 31 2c 62 2c 2c 19 45 58 41 44 41 54 ff 49 4e 54 | INT....6..)*:..(1,b,,.EXADAT.INT |
ab340 | ff ff ff ff 0a 4c 87 37 04 00 81 1d 40 52 28 6b 49 3e 6f 00 78 29 20 52 45 4e 41 4d 45 58 33 57 | .....L.7....@R(kI>o.x).RENAMEX3W |
ab360 | 49 4e 48 20 63 30 78 49 4e 54 70 5d 69 43 41 53 45 6e 74 66 28 31 2c 31 09 0d 41 7f ff ff 20 70 | INH.c0xINTp]iCASEntf(1,1..A....p |
ab380 | 72 69 6e 74 66 28 31 2c 31 29 ff 76 61 6c 00 00 57 ab 54 48 81 09 87 36 04 00 82 17 40 00 45 41 | rintf(1,1).val..W.TH...6....@.EA |
ab3a0 | 41 42 4c 45 20 74 31 28 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b | ABLE.t1(T.DEFAULT.0,...PRIMARY.K |
ab3c0 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
ab3e0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
ab400 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
ab420 | 0a 81 36 87 35 04 00 82 71 3b 53 41 56 45 50 4f 49 4e 54 0a 49 4e 53 3b 45 4e 44 0a 43 52 45 41 | ..6.5...q;SAVEPOINT.INS;END.CREA |
ab440 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
ab460 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
ab480 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 80 00 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREA...UNIQUE.INDEX.t4a2 |
ab4a0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a e8 03 6e 5f 72 65 6d 6f 76 65 28 41 | .ON.t4(a).WHERE.b>.j..n_remove(A |
ab4c0 | 4c 4c 29 3d 32 30 30 30 3b 53 41 56 45 50 4f 49 4e 54 0a 49 4e 53 3b 45 4e 44 0a 60 87 34 04 00 | LL)=2000;SAVEPOINT.INS;END.`.4.. |
ab4e0 | 81 45 3a 3a 3a 55 45 2c 0a 20 04 00 20 49 4e 54 7f 7f 10 00 00 00 45 46 20 4b 00 00 02 00 2c 62 | .E:::UE,.....INT......EF.K....,b |
ab500 | 29 1a 29 20 57 49 54 48 4f 55 54 20 88 4f 57 49 44 3b 23 49 4e 3e 45 52 74 33 4f 49 1a 29 20 57 | ).).WITHOUT..OWID;#IN>ERt3OI.).W |
ab520 | 65 54 48 4f 55 54 20 88 4f 57 49 44 3b 23 49 4e 3e 45 52 74 33 29 20 44 4f 20 4e 47 3b 0a 4c 87 | eTHOUT..OWID;#IN>ERt3).DO.NG;.L. |
ab540 | 33 04 00 81 1d 3a 3a 3a 3a 3a 33 56 40 28 55 ff 3e 3d 3a 3a 3a 3a 3a 3a 3a 28 56 41 3f ff b3 41 | 3....:::::3V@(U.>=:::::::(VA?..A |
ab560 | 00 02 09 fe b2 0a bc 00 fd b2 01 40 45 51 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 33 56 40 3f ff b3 bf 01 | ...........@EQ::::::::::3V@?.... |
ab580 | 40 45 31 1f 10 2d 56 41 64 00 11 31 1e 07 87 32 03 00 15 3a 3a 19 f0 81 28 87 31 04 00 82 55 2d | @E1..-VAd..1...2...::...(.1...U- |
ab5a0 | 2d 45 20 30 2c 0a 20 20 50 72 49 4d 41 52 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | -E.0,...PrIMAR.KEY(a,b).).WITHOU |
ab5c0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 49 4e 44 45 58 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(..INDEXT,...b.INT.U |
ab5e0 | 01 49 4e 54 20 44 45 46 41 55 4c 54 20 30 7f 0a 20 20 50 72 49 4d 41 52 59 20 4b 45 59 28 61 2c | .INT.DEFAULT.0....PrIMARY.KEY(a, |
ab600 | 62 29 0a 29 20 57 72 49 4d 41 52 59 20 00 00 02 00 61 2c 62 29 0a 29 20 57 31 20 63 6f 75 6e 74 | b).).WrIMARY.....a,b).).W1.count |
ab620 | 28 31 29 2c 32 29 38 55 4e 49 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e | (1),2)8UNIONFLICT(a,b).DO.NOTHIN |
ab640 | 47 2d 0a 08 87 30 03 00 17 2d 2d 41 53 2d 55 87 2f 04 00 81 2f 2d 2d 0f 20 00 57 49 50 48 20 63 | G-...0...--AS-U./.../--...WIPH.c |
ab660 | 28 56 29 20 5d 0f 6e 75 6c 6c 69 62 00 00 41 35 5e 5e 5e ff 74 65 29 76 62 4c 20 05 6d 48 4e 54 | (V).].nullib..A5^^^.te)vbL..mHNT |
ab680 | 62 7f 31 4c ff ff ff 80 20 66 75 6c 6c 6d 49 67 65 73 51 20 62 4f 65 5d 0f 6e 75 a9 6c 69 66 00 | b.1L.....fullmIgesQ.bOe].nu.lif. |
ab6a0 | 00 10 49 4e 54 0d 57 87 2e 04 00 81 33 2d 2d 0c 48 4e 54 28 45 53 00 15 2d 2d 0d 35 2d 0c 28 45 | ..INT.W.....3--.HNT(ES..--.5-.(E |
ab6c0 | 41 54 45 20 54 45 59 00 00 55 50 54 28 56 41 45 59 00 00 55 50 ed 59 00 07 04 20 31 28 61 2c 62 | ATE.TEY..UPT(VAEY..UP.Y....1(a,b |
ab6e0 | 2c 43 54 ff ff 55 41 54 45 04 20 39 28 61 2c 62 2c 43 54 ff ff 18 41 54 45 20 54 45 59 45 44 0a | ,CT..UATE..9(a,b,CT...ATE.TEYED. |
ab700 | 05 87 2d 03 00 11 2d 2d 81 36 87 2c 04 00 82 71 24 24 24 24 24 24 24 9e 86 24 24 d2 d2 d2 d2 d2 | ..-...--.6.,...q$$$$$$$..$$..... |
ab720 | d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 d2 47 52 4f 55 50 54 24 00 00 45 4e 73 43 52 54 35 | ................GROUPT$..ENsCRT5 |
ab740 | 41 29 02 49 4e 54 0f 24 24 ff 7f 00 00 24 24 24 24 24 26 24 38 3a 38 38 38 36 4e 73 28 00 00 00 | A).INT.$$....$$$$$&$8:8886Ns(... |
ab760 | 80 43 61 0a 01 49 54 29 27 64 38 00 00 00 a7 10 00 17 2d 73 28 00 00 21 14 21 21 21 20 73 74 72 | .Ca..IT)'d8.......-s(..!.!!!.str |
ab780 | 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 21 21 21 28 6a 00 00 80 5e 45 4c 00 86 25 24 00 49 4e | ftime(1,1,1,1)!!!(j...^EL..%$.IN |
ab7a0 | 54 49 4e 54 45 4e 73 43 49 54 35 41 28 ed 49 4e 54 07 24 24 20 64 6c 6f 6b ff 7f 00 65 45 4e 64 | TINTENsCIT5A(.INT.$$.dlok...eENd |
ab7c0 | 3b 0a 22 87 2b 03 00 4b 23 e8 03 0a 24 80 ff 70 4f d3 64 49 d0 4f 49 ff 7f d0 f1 49 41 f7 6f 9f | ;.".+..K#...$..pO.dI.OI....IA.o. |
ab7e0 | 28 31 48 4e 54 3b 0a 5d 87 2a 04 00 81 3f 23 bb 00 00 00 93 57 7e 51 77 22 4f 29 74 31 08 0a 23 | (1HNT;.].*...?#.....W~Qw"O)t1..# |
ab800 | 08 0a 23 61 28 00 0b 51 34 22 31 29 74 00 00 01 23 74 64 02 6f a4 28 31 43 4c fc fc fc fc 75 7f | ..#a(..Q4"1)t...#td.o.(1CL....u. |
ab820 | bb 00 00 00 93 57 7e 51 77 22 4f 29 74 31 08 0a 23 08 0a 23 61 28 00 0b 51 34 22 31 77 77 77 77 | .....W~Qw"O)t1..#..#a(..Q4"1wwww |
ab840 | 77 77 77 00 00 00 0a 06 87 29 03 00 13 23 ae 0a 6b 87 28 04 00 81 5b 23 7f 23 23 23 23 23 0b 0a | www......)...#..k.(...[#.#####.. |
ab860 | 23 52 5c 33 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 b9 b9 b9 b9 b9 0a 23 52 5c 33 54 20 00 00 | #R\3T...UE#####.#R......#R\3T... |
ab880 | 55 45 23 23 23 23 23 0a 23 52 b9 b9 b9 b9 b9 b9 b9 b9 b9 45 7f 54 4e 46 4c 49 43 7a 28 28 56 41 | UE#####.#R.........E.TNFLICz((VA |
ab8a0 | 56 41 4c 41 54 2f 00 00 01 00 d8 d8 d8 ed f8 44 28 56 41 01 00 3e 6f 54 48 49 ff 7f 3b 0a 58 87 | VALAT/.........D(VA..>oTHI..;.X. |
ab8c0 | 27 04 00 81 35 23 72 73 65 23 23 23 23 23 23 0a 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 23 0a | '...5#rse######.#RE.T...UE#####. |
ab8e0 | 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 23 0a 23 52 45 7f 61 20 2e 50 2c 32 29 ff 41 4c 41 54 | #RE.T...UE#####.#RE.a..P,2).ALAT |
ab900 | 23 52 45 7f 54 20 00 00 55 45 23 23 23 23 23 0a 23 00 54 48 49 74 72 69 0a 7a 87 26 04 00 81 79 | #RE.T...UE#####.#.THItri.z.&...y |
ab920 | 23 61 45 7a 3e 00 04 00 45 58 7e 51 80 22 31 29 74 31 28 0a 23 61 00 00 00 80 04 51 34 22 31 29 | #aEz>...EX~Q."1)t1(.#a.....Q4"1) |
ab940 | 74 31 28 0a 23 74 31 02 6f a4 7f 31 49 4c 54 42 4f 20 4e 49 20 77 77 77 77 77 77 77 77 77 20 5b | t1(.#t1.o..1ILTBO.NI.wwwwwwwww.[ |
ab960 | 61 5d 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 63 31 29 74 31 28 0a 23 61 00 00 | a]wwwwwwwwwwwwwwwwwwwc1)t1(.#a.. |
ab980 | 00 80 04 51 34 22 31 29 74 31 28 0a 23 6f a4 28 33 49 4e 54 3b 0a 63 87 25 04 00 81 4b 23 61 45 | ...Q4"1)t1(.#o.(3INT;.c.%...K#aE |
ab9a0 | 54 00 00 04 00 45 58 7e 51 80 22 31 29 74 31 28 0a 23 61 28 54 00 00 04 51 34 22 31 29 74 31 28 | T....EX~Q."1)t1(.#a(T...Q4"1)t1( |
ab9c0 | 0a 23 74 31 02 6f a4 28 31 49 4c 54 42 4f 20 4e 49 20 77 77 77 77 77 77 77 77 77 77 77 77 77 77 | .#t1.o.(1ILTBO.NI.wwwwwwwwwwwwww |
ab9e0 | 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 63 6f a4 28 33 49 4e 54 3b 0a 4a 87 24 04 | wwwwwwwwwwwwwwwwwwco.(3INT;.J.$. |
aba00 | 00 81 19 23 61 45 54 00 00 04 00 45 58 7e 51 34 1a 34 ff 80 22 31 29 74 31 28 0a 23 61 45 54 00 | ...#aET....EX~Q4.4.."1)t1(.#aET. |
aba20 | 00 04 00 45 58 7e 51 34 1a 34 ff 80 22 31 29 74 31 02 6f a4 28 31 49 4e 54 42 4f 20 4e 49 20 63 | ...EX~Q4.4.."1)t1.o.(1INTBO.NI.c |
aba40 | 6f a4 28 33 49 4e 54 3b 0a 48 87 23 04 00 81 15 23 61 45 54 00 00 04 00 45 58 7e 51 34 1a 34 ff | o.(3INT;.H.#....#aET....EX~Q4.4. |
aba60 | 80 14 31 29 74 31 28 0a 23 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 41 00 02 6f a4 28 | ..1)t1(.#...O.dIPOI....INTA..o.( |
aba80 | 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 48 87 22 04 00 81 15 23 61 45 54 00 | 1INTEO.NI.co.(1INT;.H."....#aET. |
abaa0 | 00 04 00 45 58 7e 51 34 1a 34 ff 80 14 31 29 74 31 28 0a 20 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f | ...EX~Q4.4...1)t1(.....O.dIPOI.. |
abac0 | d0 f1 49 4e 54 41 00 02 6f a4 28 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 5c | ..INTA..o.(1INTEO.NI.co.(1INT;.\ |
abae0 | 87 21 04 00 81 3d 23 61 45 54 00 00 04 00 45 58 7e 51 0a 23 61 28 54 00 00 04 51 34 22 31 29 74 | .!...=#aET....EX~Q.#a(T...Q4"1)t |
abb00 | 31 28 0a 23 74 31 02 6f a4 28 31 49 4c 54 42 4f 20 4e 49 20 77 77 77 77 77 77 0a 23 61 28 54 00 | 1(.#t1.o.(1ILTBO.NI.wwwwww.#a(T. |
abb20 | 00 04 51 34 22 31 29 74 31 28 0a 23 74 31 02 6f a4 28 31 49 4c 54 a4 28 33 49 4e 54 3b 0a 34 87 | ..Q4"1)t1(.#t1.o.(1ILT.(3INT;.4. |
abb40 | 20 03 00 6f 23 61 45 0a 20 80 ff 7f 00 01 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 41 01 02 6f a4 28 | ...o#aE.......dIPOI....INTA..o.( |
abb60 | 31 49 4e ff 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 81 45 87 1f 04 00 83 0f 23 52 45 | 1IN.TEO.NI.co.(1INT;..E......#RE |
abb80 | 41 54 45 20 54 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 | ATE.Ta.TEXT.PRIMARY.KEY,.b.INT.D |
abba0 | 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d | EFAULT.1);.PRAGMA.count_changes= |
abbc0 | 4f 4e 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 20 56 41 4c 55 45 53 28 27 61 62 | ON;EXPLAIN.QUERY.PLAN.VALUES('ab |
abbe0 | 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b | c'),('def'),('ghi'),('abc'),('jk |
abc00 | 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | l'),('abc'),('ghi').....ON.CONFL |
abc20 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 0a 81 3d | ICT(a).DO.UPDATE.SET.b=b+1;.P..= |
abc40 | 87 1e 04 00 82 7f 23 52 45 41 54 45 20 54 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | ......#REATE.Ta.TEXT.PRIMARY.KEY |
abc60 | 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | ,.b.INT.DEFAULT.1);.PRAGMA.count |
abc80 | 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 20 74 39 28 61 29 27 61 | _changes=ON;ANALYZE.INTO.t9(a)'a |
abca0 | 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a | bc'),('def'),('ghi'),('abc'),('j |
abcc0 | 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | kl'),('abc'),('ghi').....ON.CONF |
abce0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 0a 81 | LICT(a).DO.UPDATE.SET.b=b+1;.P.. |
abd00 | 45 87 1d 04 00 83 0f 23 52 45 41 54 45 20 54 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 | E......#REATE.Ta.TEXT.PRIMARY.KE |
abd20 | 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e | Y,.b.INT.DEFAULT.1);.PRAGMA.coun |
abd40 | 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 | t_changes=ON;.INSERT.INTO.t9(a). |
abd60 | 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 27 68 69 27 29 2c 28 27 | VALUES('abc'),('def'),(''hi'),(' |
abd80 | 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 | abc'),('jkl'),('abc'),('ghi')... |
abda0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
abdc0 | 3d 62 2b 31 3b 0a 50 0a 81 45 87 1c 04 00 83 0f 23 52 45 41 54 45 20 54 61 20 54 45 58 54 20 50 | =b+1;.P..E......#REATE.Ta.TEXT.P |
abde0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 | RIMARY.KEY,.b.INT.DEFAULT.1);.PR |
abe00 | 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4e 4f 3b 0a 49 4e 53 45 52 54 20 49 4e | AGMA.count_changes=NO;.INSERT.IN |
abe20 | 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 | TO.t9(a).VALUES('abc'),('def'),( |
abe40 | 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 | 'ghi'),('abc'),('jkl'),('abc'),( |
abe60 | 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | 'ghi').....ON.CONFLICT(a).DO.UPD |
abe80 | 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 0a 81 5c 87 1b 04 00 83 3d 23 52 45 41 54 45 20 | ATE.SET.b=b+1;.P..\.....=#REATE. |
abea0 | 54 61 20 49 4e 54 29 3b 0a 23 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | Ta.INT);.#REATE.TABLE.counts(v.I |
abec0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
abee0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 2e 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r..AFTER |
abf00 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
abf20 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
abf40 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ....ON.CONFLICT(vt1.SET.a=5.WHER |
abf60 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 81 0b 87 1a 04 00 82 1b 23 52 45 41 54 45 20 | E.a=4;.DELETE.FRO........#REATE. |
abf80 | 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 | TABLE.t9(a.TEXT.PRIMARY.KEY,.b.I |
abfa0 | 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e | NT.DEFAULT.1);.PRAGMA.count_chan |
abfc0 | 67 65 73 3d 4f 4e 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 20 56 41 4c 55 45 53 | ges=ON;EXPLAIN.QUERY.PLAN.VALUES |
abfe0 | 28 27 61 62 63 27 49 4e 28 53 45 4c 45 43 54 27 64 65 66 27 29 29 28 27 67 0a 20 43 54 28 61 0a | ('abc'IN(SELECT'def'))('g..CT(a. |
ac000 | 0d 00 00 00 30 00 e9 00 1f 53 1e 9c 1d e5 1d 2e 1c 7d 1b b8 1b 01 1a 50 19 9f 18 ee 18 91 17 da | ....0....S.......}.....P........ |
ac020 | 17 11 16 44 15 7b 14 b2 13 e9 13 38 12 ab 12 16 11 86 10 f9 10 69 0f d9 0f 4c 0e bf 0e 2d 0d a0 | ...D.{.....8.........i...L...-.. |
ac040 | 0d 13 0c 86 0b f9 0b 6c 0a d7 0a 4a 09 bd 09 0c 08 53 07 9f 06 eb 06 4f 05 b3 05 14 04 78 03 c1 | .......l...J.....S.....O.....x.. |
ac060 | 03 0d 02 59 01 a1 00 e9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ...Y............................ |
ac080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ac0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ac0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ac0e0 | 00 00 00 00 00 00 00 00 00 81 34 88 04 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ..........4.....mCREATE.TABLE.t1 |
ac100 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | (...a.INT,...b.INT.UNIQUE,...c.I |
ac120 | 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | NT.DEFAULT.0,...PRIMARY.KEY(a,b) |
ac140 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
ac160 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 3e 3e 31 3d 31 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | (a,b).VALUES(.?>>1=11,2),(3,4),( |
ac180 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
ac1a0 | 0a 81 34 88 03 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..4.....mCREATE.TABLE.t1(...a.IN |
ac1c0 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 | T,...b.INT.UNIQUE,...c.INT.DEFAU |
ac1e0 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(a,b).).WITHO |
ac200 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
ac220 | 4c 55 45 53 28 20 3f 3e 20 31 3e 31 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | LUES(.?>.1>11,2),(3,4),(1,2)ON.C |
ac240 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 02 04 00 82 | ONFLICT(a,b).DO.NOTHING;..0..... |
ac260 | 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | eCREATE.TABLE.t1(...a.INT,...b.I |
ac280 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNIQUE,...c.INT.DEFAULT.0,... |
ac2a0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY(a,b).).WITHOUT.ROWID |
ac2c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 35 | ;.INSERT.INTO.t1(a,b).VALUES(.?5 |
ac2e0 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 1,2),(3,4),(1,2)ON.CONFLICT(a,b) |
ac300 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 01 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..0.....eCREATE.TABL |
ac320 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
ac340 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.INT.DEFAULT.0,...PRIMARY.KEY( |
ac360 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | a,b).).WITHOUT.ROWID;.INSERT.INT |
ac380 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 33 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | O.t1(a,b).VALUES(.?31,2),(3,4),( |
ac3a0 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
ac3c0 | 0a 81 33 88 00 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..3.....kCREATE.TABLE.t1(...a.IN |
ac3e0 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 | T,...b.INT.UNIQUE,...c.INT.DEFAU |
ac400 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(a,b).).WITHO |
ac420 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
ac440 | 4c 55 45 53 28 20 3f 31 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 3f 31 31 2c 32 29 4f 4e 20 43 4f | LUES(.?11,2),(3,4),(.?11,2)ON.CO |
ac460 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 18 87 7f 04 00 82 35 | NFLICT(a,b).DO.NOTHING;........5 |
ac480 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREATE.TABLE.t1(...a.INT,...b.IN |
ac4a0 | 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 | T.UNIQUE,...c.INT.DEFAULT.0,...P |
ac4c0 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
ac4e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 31 31 | .INSERT.INTO.t1(a,b).VALUES(.?11 |
ac500 | 2c 20 40 31 28 33 2c 34 29 2c 3f 31 2c 20 40 31 4e 20 43 4f 81 1b 87 7e 04 00 82 3b 43 52 45 41 | ,.@1(3,4),?1,.@1N.CO...~...;CREA |
ac520 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
ac540 | 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,...c.INT.DEFAULT.0,...PRIMA |
ac560 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
ac580 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 31 31 2c 20 40 31 | ERT.INTO.t1(a,b).VALUES(.?11,.@1 |
ac5a0 | 28 33 2c 34 29 2c 3f 31 2c 20 3f 31 32 29 4f 4e 20 43 4f 81 18 87 7d 04 00 82 35 43 52 45 41 54 | (3,4),?1,.?12)ON.CO...}...5CREAT |
ac5c0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
ac5e0 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.0,...PRIMAR |
ac600 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
ac620 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 31 31 2c 20 40 31 28 | RT.INTO.t1(a,b).VALUES(.?11,.@1( |
ac640 | 33 2c 34 29 2c 3f 31 2c 20 3f 31 20 3f 31 4f 81 18 87 7c 04 00 82 35 43 52 45 41 54 45 20 54 41 | 3,4),?1,.?1.?1O...|...5CREATE.TA |
ac660 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
ac680 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT.0,...PRIMARY.KE |
ac6a0 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
ac6c0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 3f 31 0d 2c 20 40 31 28 33 2c 34 29 | NTO.t1(a,b).VALUES(.?1.,.@1(3,4) |
ac6e0 | 2c 3f 31 2c 20 3f 31 4e 20 43 4f 81 30 87 7b 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ,?1,.?1N.CO.0.{...eCREATE.TABLE. |
ac700 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 | t1(...a.INT,...b.INT.UNIQUE,...c |
ac720 | 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | .INT.DEFAULT.0,...PRIMARY.KEY(a, |
ac740 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
ac760 | 74 31 28 5f 52 4f 57 49 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | t1(_ROWIb).VALUES(1,2),(3,4),(1, |
ac780 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
ac7a0 | 30 87 7a 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | 0.z...eCREATE.TABLE.t1(...a.INT, |
ac7c0 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNIQUE,...c.INT.DEFAULT |
ac7e0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
ac800 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 5f 52 4f 57 2c 62 29 20 56 | .ROWID;.INSERT.INTO.t1(_ROW,b).V |
ac820 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ALUES(1,2),(3,4),(1,2)ON.CONFLIC |
ac840 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 35 87 79 04 00 82 6f 43 52 45 41 54 | T(a,b).DO.NOTHING;..5.y...oCREAT |
ac860 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
ac880 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.0,...PRIMAR |
ac8a0 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
ac8c0 | 52 54 20 49 4e 54 4f 20 74 31 28 5f 52 4f 4c 4c 42 41 43 4b 2c 62 29 20 56 41 4c 55 45 53 28 31 | RT.INTO.t1(_ROLLBACK,b).VALUES(1 |
ac8e0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | ,2),(3,4),(1,2)ON.CONFLICT(a,b). |
ac900 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 87 78 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..-.x..._CREATE.TABLE |
ac920 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 | .t1(...a.INT,...b.INT.UNIQUE,... |
ac940 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | c.INT.DEFAULT.0,...PRIMARY.KEY(a |
ac960 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
ac980 | 20 74 31 28 20 60 61 60 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 | .t1(.`a`.VALUES(1,2),(3,4),(1,2) |
ac9a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 | ON.CONFLICT(a,b).DO.NOTHING;.... |
ac9c0 | 77 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | w....CREATE.TABLE.t1(...a.INT,.. |
ac9e0 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNIQUE,...c.INT.DEFAULT.0 |
aca00 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
aca20 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 20 22 61 22 2c 22 62 22 55 45 53 | OWID;.INSERT.INTO.t1(."a","b"UES |
aca40 | 28 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 76 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | (NOTHING;....v....CREATE.TABLE.t |
aca60 | 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 | 1(...a.INT,...b.INT.UNIQUE,...c. |
aca80 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | INT.DEFAULT.0,...PRIMARY.KEY(a,b |
acaa0 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
acac0 | 31 28 20 22 61 22 2c 20 22 61 22 2c 22 62 22 4f 54 48 49 4e 47 3b 0a 81 11 87 75 04 00 82 27 43 | 1(."a",."a","b"OTHING;....u...'C |
acae0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 | REATE.TABLE.t1(...a.INT,...b.INT |
acb00 | 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 | .UNIQUE,...c.INT.DEFAULT.0,...PR |
acb20 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY(a,b).).WITHOUT.ROWID;. |
acb40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 20 20 22 61 22 2c 22 62 22 22 61 22 2c 20 22 61 22 | INSERT.INTO.t1(.."a","b""a",."a" |
acb60 | 2c 22 62 22 4f 54 48 49 4e 47 3b 0a 81 09 87 74 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 | ,"b"OTHING;....t....CREATE.TABLE |
acb80 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 | .t1(...a.INT,...b.INT.UNIQUE,... |
acba0 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 3f | c.INT.DEFAULT.0,...PRIMARY.KEY(? |
acbc0 | 41 4e 44 20 66 61 6c 73 65 20 52 4f 57 49 44 3b 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | AND.false.ROWID;,(3,4),(1,2)ON.C |
acbe0 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 73 04 00 82 | ONFLICT(a,b).DO.NOTHING;....s... |
acc00 | 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | .CREATE.TABLE.t1(...a.INT,...b.I |
acc20 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNIQUE,...c.INT.DEFAULT.0,... |
acc40 | 50 52 49 4d 41 52 59 20 4b 45 59 28 3f 2c 20 3f 31 29 20 57 49 54 20 52 4f 57 49 44 3b 2c 28 33 | PRIMARY.KEY(?,.?1).WIT.ROWID;,(3 |
acc60 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
acc80 | 48 49 4e 47 3b 0a 81 09 87 72 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;....r....CREATE.TABLE.t1(.. |
acca0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
accc0 | 44 45 46 41 55 4c 54 20 30 0c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 | DEFAULT.0....PRIMARY.KEY(aa,b).V |
acce0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ALUES(1,2),(3,4),(1,2)ON.CONFLIC |
acd00 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 71 04 00 82 17 43 52 45 41 54 | T(a,b).DO.NOTHING;....q....CREAT |
acd20 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
acd40 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 28 46 29 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.(F)..PRIMAR |
acd60 | 59 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | Y.KEY(aa,b).VALUES(1,2),(3,4),(1 |
acd80 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
acda0 | 81 09 87 70 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | ...p....CREATE.TABLE.t1(...a.INT |
acdc0 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ,...b.INT.UNIQUE,...c.INT.DEFAUL |
acde0 | 54 20 28 3f 29 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 | T.(?)..PRIMARY.KEY(aa,b).VALUES( |
ace00 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 1,2),(3,4),(1,2)ON.CONFLICT(a,b) |
ace20 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0e 87 6f 04 00 82 21 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;....o...!CREATE.TABL |
ace40 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
ace60 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 28 20 6c 6f 61 64 5f 65 78 74 65 6e 73 69 6f 6e 28 | .c.INT.DEFAULT.(.load_extension( |
ace80 | 31 2c 31 29 4f 52 20 74 72 75 65 25 59 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | 1,1)OR.true%Y).VALUES(1,2),(3,4) |
acea0 | 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 81 | ,(1,2)ON.CONFLICT(a,b).DO.NOTHI. |
acec0 | 09 87 6e 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | ..n....CREATE.TABLE.t1(...a.INT, |
acee0 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNIQUE,...c.INT.DEFAULT |
acf00 | 20 28 20 6a 73 6f 6e 72 72 61 79 28 31 29 4f 52 20 66 61 6c 73 65 29 20 56 41 4c 55 45 53 28 31 | .(.jsonrray(1)OR.false).VALUES(1 |
acf20 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | ,2),(3,4),(1,2)ON.CONFLICT(a,b). |
acf40 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 6d 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;....m....CREATE.TABLE |
acf60 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 | .t1(...a.INT,...b.INT.UNIQUE,... |
acf80 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 | c.INT.DEFAULT.(.json_group_array |
acfa0 | 28 2a 29 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | (*)).VALUES(1,2),(3,4),(1,2)ON.C |
acfc0 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 87 6c 04 00 82 | ONFLICT(a,b).DO.NOTHING;....l... |
acfe0 | 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | .CREATE.TABLE.t1(...a.INT,...b.I |
ad000 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 20 2d 31 30 2e | NT.UNIQUE,...c.INT.DEFAULT..-10. |
ad020 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | ...PRIMARY.KEY(aa,b).VALUES(1,2) |
ad040 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ,(3,4),(1,2)ON.CONFLICT(a,b).DO. |
ad060 | 4e 4f 54 48 49 4e 47 3b 0a 81 0c 87 6b 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | NOTHING;....k....CREATE.TABLE.t1 |
ad080 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | (...a.INT,...b.INT.UNIQUE,...c.I |
ad0a0 | 4e 54 20 44 45 46 41 55 4c 54 20 20 2d 31 30 2e 0a 20 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | NT.DEFAULT..-10......a.INT,...b. |
ad0c0 | 49 4e 54 20 55 4e 49 51 42 45 2c 0a 20 20 63 20 49 4e 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | INT.UNIQBE,...c.IN3,4),(1,2)ON.C |
ad0e0 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 87 6a 04 00 82 | ONFLICT(a,b).DO.NOTHING;....j... |
ad100 | 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | .CREATE.TABLE.t1(...a.INT,...b.I |
ad120 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 20 2d 31 20 20 | NT.UNIQUE,...c.INT.DEFAULT..-1.. |
ad140 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | PRIMARY.KEY(aa,b).VALUES(1,2),(3 |
ad160 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
ad180 | 48 49 4e 47 3b 0a 81 0c 87 69 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;....i....CREATE.TABLE.t1(.. |
ad1a0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
ad1c0 | 44 45 46 41 55 4c 54 20 20 2d 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 29 20 20 61 2c 62 | DEFAULT..-1...............)..a,b |
ad1e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 | ).VALUES(1,2),(3,4),(1,2)ON.CONF |
ad200 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 64 4e 47 3b 0a 81 11 87 68 04 00 82 27 43 52 | LICT(a,b).DO.NOTHdNG;....h...'CR |
ad220 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 | EATE.TABLE.t1(...a.INT,...b.INT. |
ad240 | 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 20 2d 20 2f 2a 20 61 62 | UNIQUE,...c.INT.DEFAULT..-./*.ab |
ad260 | 73 28 31 29 20 2a 2f 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 2c 62 28 31 2c | s(1).*/1..................a,b(1, |
ad280 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 2),(3,4),(1,2)ON.CONFLICT(a,b).D |
ad2a0 | 4f 20 4e 4f 54 48 64 4e 47 3b 0a 81 09 87 67 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHdNG;....g....CREATE.TABLE. |
ad2c0 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 | t1(...a.INT,...b.INT.UNIQUE,...c |
ad2e0 | 20 49 4e 54 20 44 45 46 41 55 4c 54 20 20 27 61 27 27 61 27 20 20 50 52 49 4d 41 52 59 20 4b 45 | .INT.DEFAULT..'a''a'..PRIMARY.KE |
ad300 | 59 28 61 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f | Y(a.VALUES(1,2),(3,4),(1,2)ON.CO |
ad320 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 87 66 04 00 82 5f | NFLICT(a,b).DO.NOTHING;..-.f..._ |
ad340 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREATE.TABLE.t1(...a.INT,...b.IN |
ad360 | 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 43 55 52 52 45 4e 54 5f 54 49 4d 45 0a 20 20 50 | T.UNIQUE,...c.INCURRENT_TIME...P |
ad380 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
ad3a0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
ad3c0 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ,(3,4),(1,2)ON.CONFLICT(a,b).DO. |
ad3e0 | 4e 4f 54 48 49 4e 47 3b 0a 81 45 87 65 04 00 83 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | NOTHING;..E.e....CREATE.TABLE.t1 |
ad400 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | (...a.INT,...b.INT.UNIQUE,...c.I |
ad420 | 20 20 61 20 49 4e 49 4e 54 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 4e 54 20 44 45 46 41 55 | ..a.ININT..b.INT.UNIQUE,NT.DEFAU |
ad440 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(b,b).).WITHO |
ad460 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
ad480 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | LUES(1,2),(3,4),(1,2)ON.CONFLICT |
ad4a0 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 45 87 64 04 00 83 0f 43 52 45 41 54 45 | (a,b).DO.NOTHING;..E.d....CREATE |
ad4c0 | 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 | .TABLE.t1(...a.INT,...b.INT.UNIQ |
ad4e0 | 55 45 2c 0a 20 20 63 20 49 20 20 61 20 49 4e 49 4e 54 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | UE,...c.I..a.ININT..b.INT.UNIQUE |
ad500 | 2c 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | ,NT.DEFAULT.0,...PRIMARY.KEY(a,b |
ad520 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;REPLACE.INTO.t |
ad540 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e | 1(a,b).VALUES(1,2),(3,4),(1,2)ON |
ad560 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 45 87 63 04 | .CONFLICT(a,b).DO.NOTHING;..E.c. |
ad580 | 00 83 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ...CREATE.TABLE.t1(...a.INT,...b |
ad5a0 | 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 20 20 61 20 49 4e 49 4e 54 20 20 62 20 49 | .INT.UNIQUE,...c.I..a.ININT..b.I |
ad5c0 | 4e 54 20 55 4e 49 51 55 45 2c 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | NT.UNIQUE,NT.DEFAULT.0,...PRIMAR |
ad5e0 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
ad600 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
ad620 | 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 49 | ),(1,2)ON.CONFLICT./*.*/DO.NOTHI |
ad640 | 4e 47 3b 0a 81 49 87 62 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 | NG;..I.b....CREATE.TABLE.t1(...a |
ad660 | 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 20 20 61 20 49 | .INT,...b.INT.UNIQUE,...c.I..a.I |
ad680 | 4e 49 4e 54 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 4e 54 20 44 45 46 41 55 4c 54 20 30 2c | NINT..b.INT.UNIQUE,NT.DEFAULT.0, |
ad6a0 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
ad6c0 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
ad6e0 | 31 2c 32 29 2c 28 33 2c 20 31 3d 31 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 1,2),(3,.1=14),(1,2)ON.CONFLICT( |
ad700 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 45 87 61 04 00 83 0f 43 52 45 41 54 45 20 | a,b).DO.NOTHING;..E.a....CREATE. |
ad720 | 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 | TABLE.t1(...a.INT,...b.INT.UNIQU |
ad740 | 45 2c 0a 20 20 63 20 49 20 20 61 20 49 4e 49 4e 54 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | E,...c.I..a.ININT..b.INT.UNIQUE, |
ad760 | 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | NT.DEFAULT.0,...PRIMARY.KEY(a,b) |
ad780 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID+.INSERT.INTO.t1 |
ad7a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | (a,b).VALUES(1,2),(3,4),(1,2)ON. |
ad7c0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 87 60 04 00 | CONFLICT(a,b).DO.NOTHING;..3.`.. |
ad7e0 | 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | .kCREATE.TABLE.t1(...a.INT,...b. |
ad800 | 49 4e 54 20 55 46 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 | INT.UFIQUE,...c.INT.DEFAULT.0,.. |
ad820 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY(a,b).).WITHOUT.ROWI |
ad840 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 40 | D;.INSERT.INTO.t1(a,b).VALUES(.@ |
ad860 | 31 31 2c 20 40 31 20 29 2c 28 33 2c 34 29 2c 28 31 2c 41 4c 55 45 53 28 20 40 31 31 2c 20 40 31 | 11,.@1.),(3,4),(1,ALUES(.@11,.@1 |
ad880 | 20 29 2c 28 33 2c 34 20 4e 4f 54 48 49 4e 47 3b 0a 5a 87 5f 04 00 81 39 43 52 45 41 54 45 20 54 | .),(3,4.NOTHING;.Z._...9CREATE.T |
ad8a0 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 49 4e 54 20 44 45 46 41 | ABLE.t1(...a.INT,...b.ININT.DEFA |
ad8c0 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b).).WITH |
ad8e0 | 4f 55 54 20 52 4f 57 49 44 2e 0a 49 29 2c 81 2d 87 5e 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 | OUT.ROWID..I),.-.^..._CREATE.TAB |
ad900 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 44 45 53 43 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.DESCUNIQUE,. |
ad920 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..c.INT.DEFAULT.0,...PRIMARY.KEY |
ad940 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 43 4f 4c 4c 41 54 45 | (a,b).).WITHOUT.ROWID;.INCOLLATE |
ad960 | 20 62 69 6e 61 72 79 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | .binary,b).VALUES(1,2),(3,4),(1, |
ad980 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
ad9a0 | 2d 87 5d 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | -.]..._CREATE.TABLE.t1(...a.INT, |
ad9c0 | 0a 20 20 62 20 44 45 53 43 4c 4f 42 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.DESCLOBQUE,...c.INT.DEFAULT |
ad9e0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
ada00 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
ada20 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ES(1,2),(3,4),(1,2)ON.CONFLICT(a |
ada40 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 87 5c 04 00 82 5f 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;..-.\..._CREATE.T |
ada60 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 44 45 46 45 52 52 41 42 4c 45 | ABLE.t1(...a.INT,...b.DEFERRABLE |
ada80 | 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b | ,...c.INT.DEFAULT.0,...PRIMARY.K |
adaa0 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
adac0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
adae0 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
adb00 | 0a 81 33 87 5b 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..3.[...kCREATE.TABLE.t1(...a.IN |
adb20 | 54 2c 0a 20 20 62 20 44 45 46 45 52 52 41 42 4c 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 | T,...b.DEFERRABLE,...c.INT.DEFAU |
adb40 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(a,b).).WITHO |
adb60 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
adb80 | 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | LUES(.sum(1),4),(1,2)ON.CONFLICT |
adba0 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 41 87 5a 04 00 83 07 | (a,b).DO.NOTHING;VACUUM..A.Z.... |
adbc0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 44 45 | CREATE.TABLE.t1(...a.INT,...b.DE |
adbe0 | 46 41 55 4c 54 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 49 4e 54 20 | FAULT(1)COLLATE.nocase,...c.INT. |
adc00 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
adc20 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
adc40 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e | b).VALUES(1,2),(3,4),(1,2)ON.CON |
adc60 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 2d 87 | FLICT(a,b).DO.NOTHING;VACUUM..-. |
adc80 | 59 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | Y..._CREATE.TABLE.t1(...a.INT,.. |
adca0 | 20 62 20 44 45 46 41 55 4c 54 28 31 29 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.DEFAULT(1),...c.INT.DEFAULT.0 |
adcc0 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
adce0 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
add00 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | (1,2),(3,4),(1,2)ON.CONFLICT(a,b |
add20 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 87 58 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..3.X...kCREATE.TAB |
add40 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 20 69 6e 74 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b..intUNIQUE,. |
add60 | 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CURRENT_TIMESTAMP,...PRIMARY.KEY |
add80 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
adda0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c | TO.t1(a,b).VALUES(.sum(1),4),(1, |
addc0 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 | 2)ON.CONFLICT(a,b).DO.NOTHING;VA |
adde0 | 43 55 55 4d 0a 81 33 87 57 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | CUUM..3.W...kCREATE.TABLE.t1(... |
ade00 | 61 20 49 4e 54 2c 0a 20 20 62 20 20 69 6e 74 55 4e 49 51 55 45 2c 0a 43 45 52 52 45 4e 54 5f 54 | a.INT,...b..intUNIQUE,.CERRENT_T |
ade20 | 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | IMESTAMP,...PRIMARY.KEY(a,b).).W |
ade40 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
ade60 | 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 | ).VALUES(.sum(1),4),(1,2)ON.CONF |
ade80 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 33 87 56 | LICT(a,b).DO.NOTHING;VACUUM..3.V |
adea0 | 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ...kCREATE.TABLE.t1(...a.INT,... |
adec0 | 62 20 20 52 45 46 45 52 45 4e 43 45 53 0a 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 2c | b..REFERENCES.CURRENT_TIMESTAMP, |
adee0 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
adf00 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
adf20 | 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | .sum(1),4),(1,2)ON.CONFLICT(a,b) |
adf40 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 29 87 55 04 00 82 57 43 52 45 41 54 | .DO.NOTHING;VACUUM..).U...WCREAT |
adf60 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 43 4f 4d 4d 49 54 62 20 49 | E.TABLE.t1(...a.INT,...COMMITb.I |
adf80 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 20 2d 31 30 2e | NT.UNIQUE,...c.INT.DEFAULT..-10. |
adfa0 | 0a 20 0a 20 20 20 44 45 46 41 55 4c 54 20 20 2d 31 30 2e 0a 20 0a 20 20 61 20 49 4e 61 20 49 4e | ......DEFAULT..-10......a.INa.IN |
adfc0 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 42 45 2c 0a 20 20 63 20 49 4e 33 2c 34 29 2c 28 31 | T,...b.INT.UNIQBE,...c.IN3,4),(1 |
adfe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
ae000 | 0d 00 00 00 2b 01 19 00 1f 46 1e 8c 1d cf 1d 15 1c 5b 1b a1 1a ed 1a 39 19 85 18 d4 18 1c 17 5f | ....+....F.......[.....9......._ |
ae020 | 16 a6 15 f5 15 44 14 93 13 df 13 27 12 64 11 b3 10 f6 10 3d 0f 89 0e fc 0e 43 0d 8e 0c da 0c 26 | .....D.....'.d.....=.....C.....& |
ae040 | 0b 5e 0a aa 09 ef 09 32 08 77 07 bc 07 0b 06 4c 05 8d 04 d2 04 17 03 54 02 8f 01 d4 01 19 00 00 | .^.....2.w.....L.......T........ |
ae060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ae080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ae0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ae0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ae0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ae100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 37 88 2f 04 00 82 | ..........................7./... |
ae120 | 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | sCREATE.TABLE.t1(...a.INT,...b.I |
ae140 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNIQUE,...c.INT.DEFAULT.0,... |
ae160 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY(a,b).).WITHOUT.ROWID |
ae180 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ;.INSERT.INTO.t1(a,b).VALUES(1,2 |
ae1a0 | 29 2c 28 32 30 30 31 35 30 45 2d 33 31 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | ),(200150E-313,4),(1,2)ON.CONFLI |
ae1c0 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 2e 04 00 82 73 43 52 45 41 | CT(a,b).DO.NOTHING;..7.....sCREA |
ae1e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
ae200 | 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,...c.INT.DEFAULT.0,...PRIMA |
ae220 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
ae240 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 | ERT.INTO.t1(a,b).VALUES(1,2),(20 |
ae260 | 30 31 30 30 45 2d 33 31 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | 0100E-313,4),(1,2)ON.CONFLICT(a, |
ae280 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 88 2d 04 00 83 07 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..A.-....CREATE.TA |
ae2a0 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
ae2c0 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT.0,...PRIMARY.KE |
ae2e0 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
ae300 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 2d 30 31 | NTO.t1(a,b).VALUES(1,2),(2001-01 |
ae320 | 2d 30 31 32 30 30 31 2d 30 31 2d 20 63 6f 75 6e 74 28 31 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | -012001-01-.count(1),2)ON.CONFLI |
ae340 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3f 88 2c 04 00 83 03 43 52 45 41 | CT(a,b).DO.NOTHING;..?.,....CREA |
ae360 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
ae380 | 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,...c.INT.DEFAULT.0,...PRIMA |
ae3a0 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
ae3c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 | ERT.INTO.t1(a,b).VALUES(1,2),(20 |
ae3e0 | 30 31 2d 30 31 2d 20 63 6f 75 6e 74 28 44 49 53 54 49 4e 43 54 0d 29 2c 32 29 4f 4e 20 43 4f 4e | 01-01-.count(DISTINCT.),2)ON.CON |
ae400 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 2b 04 00 82 73 43 | FLICT(a,b).DO.NOTHING;..7.+...sC |
ae420 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 | REATE.TABLE.t1(...a.INT,...b.INT |
ae440 | 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 | .UNIQUE,...c.INT.DEFAULT.0,...PR |
ae460 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY(a,b).).WITHOUT.ROWID;. |
ae480 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
ae4a0 | 28 32 30 30 31 2d 30 31 2d 20 63 6f 75 6e 74 28 3f 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | (2001-01-.count(?),2)ON.CONFLICT |
ae4c0 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 2a 04 00 82 73 43 52 45 41 54 45 | (a,b).DO.NOTHING;..7.*...sCREATE |
ae4e0 | 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 | .TABLE.t1(...a.INT,...b.INT.UNIQ |
ae500 | 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 | UE,...c.INT.DEFAULT.0,...PRIMARY |
ae520 | 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 | .KEY(a,b).).WITHOUT.ROWID;.INSER |
ae540 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 | T.INTO.t1(a,b).VALUES(1,2),(2001 |
ae560 | 2d 30 31 2d 20 63 6f 75 6e 74 28 0d 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | -01-.count(.),2)ON.CONFLICT(a,b) |
ae580 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3b 88 29 04 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..;.)...{CREATE.TABL |
ae5a0 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
ae5c0 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.INT.DEFAULT.0,...PRIMARY.KEY( |
ae5e0 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | a,b).).WITHOUT.ROWID;.INSERT.INT |
ae600 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 20 7c 7c 20 35 | O.t1(a,b).VALUES(1,2),(2001.||.5 |
ae620 | 30 45 2d 30 31 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | 0E-013,4),(1,2)ON.CONFLICT(a,b). |
ae640 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3b 88 28 04 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..;.(...{CREATE.TABLE |
ae660 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 | .t1(...a.INT,...b.INT.UNIQUE,... |
ae680 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | c.INT.DEFAULT.0,...PRIMARY.KEY(a |
ae6a0 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
ae6c0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 20 7c 7c 20 30 30 31 35 30 | .t1(a,b).VALUES(1,2),(2.||.00150 |
ae6e0 | 45 2d 33 31 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | E-313,4),(1,2)ON.CONFLICT(a,b).D |
ae700 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 27 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..-.'..._CREATE.TABLE. |
ae720 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 | t1(...a.INT,...b.INT.UNIQUE,...c |
ae740 | 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | .INT.DEFAULT.0,...PRIMARY.KEY(a, |
ae760 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
ae780 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 68 65 78 28 3f 29 2c 32 29 4f | t1(a,b).VALUES(1,2),(.hex(?),2)O |
ae7a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 26 | N.CONFLICT(a,b).DO.NOTHING;..7.& |
ae7c0 | 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ...sCREATE.TABLE.t1(...a.INT,... |
ae7e0 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c | b.INT.UNIQUE,...c.INT.DEFAULT.0, |
ae800 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
ae820 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
ae840 | 31 2c 32 29 2c 28 20 68 65 78 28 32 30 30 31 2f 30 31 45 30 31 31 29 2c 32 29 4f 4e 20 43 4f 4e | 1,2),(.hex(2001/01E011),2)ON.CON |
ae860 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 25 04 00 82 73 43 | FLICT(a,b).DO.NOTHING;..7.%...sC |
ae880 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 | REATE.TABLE.t1(...a.INT,...b.INT |
ae8a0 | 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 | .UNIQUE,...c.INT.DEFAULT.0,...PR |
ae8c0 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY(a,b).).WITHOUT.ROWID;. |
ae8e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
ae900 | 28 20 68 65 78 28 32 30 30 31 2d 30 31 45 30 31 31 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | (.hex(2001-01E011),2)ON.CONFLICT |
ae920 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 39 88 24 04 00 82 77 43 52 45 41 54 45 | (a,b).DO.NOTHING;..9.$...wCREATE |
ae940 | 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 | .TABLE.t1(...a.INT,...b.INT.UNIQ |
ae960 | 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 | UE,...c.INT.DEFAULT.0,...PRIMARY |
ae980 | 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 | .KEY(a,b).).WITHOUT.ROWID;.INSER |
ae9a0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 68 65 78 | T.INTO.t1(a,b).VALUES(1,2),(.hex |
ae9c0 | 28 20 72 61 6e 64 6f 6d 28 29 20 2d 31 31 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | (.random().-11),2)ON.CONFLICT(a, |
ae9e0 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 23 04 00 82 73 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..7.#...sCREATE.TA |
aea00 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
aea20 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT.0,...PRIMARY.KE |
aea40 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
aea60 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 68 65 78 28 20 6c | NTO.t1(a,b).VALUES(1,2),(.hex(.l |
aea80 | 74 72 69 6d 28 31 2c 31 29 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | trim(1,1)),2)ON.CONFLICT(a,b).DO |
aeaa0 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 22 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..0."...eCREATE.TABLE.t |
aeac0 | 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 | 1(...a.INT,...b.INT.UNIQUE,...c. |
aeae0 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | INT.DEFAULT.0,...PRIMARY.KEY(a,b |
aeb00 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
aeb20 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 68 65 78 28 20 2d 31 31 29 2c 32 | 1(a,b).VALUES(1,2),(.hex(.-11),2 |
aeb40 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 44 | )ON.CONFLICT(a,b).DO.NOTHING;..D |
aeb60 | 88 21 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .!....CREATE.TABLE.t1(...a.INT,. |
aeb80 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | ..b.INT.UNIQUE,...c.INT.DEFAULT. |
aeba0 | 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | 0,...PRIMARY.KEY(a,b).).WITHOUT. |
aebc0 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
aebe0 | 53 28 31 2c 32 29 2c 28 20 68 65 78 28 20 22 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 | S(1,2),(.hex(.".json_group_array |
aec00 | 28 31 29 61 22 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | (1)a"),2)ON.CONFLICT(a,b).DO.NOT |
aec20 | 48 49 4e 47 3b 0a 81 30 88 20 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;..0.....eCREATE.TABLE.t1(.. |
aec40 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
aec60 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
aec80 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
aeca0 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 3f 3d 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | b).VALUES(1,2),(.?=3,4),(1,2)ON. |
aecc0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 1f 04 00 | CONFLICT(a,b).DO.NOTHING;..0.... |
aece0 | 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | .eCREATE.TABLE.t1(...a.INT,...b. |
aed00 | 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 | INT.UNIQUE,...c.INT.DEFAULT.0,.. |
aed20 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY(a,b).).WITHOUT.ROWI |
aed40 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | D;.INSERT.INTO.t1(a,b).VALUES(1, |
aed60 | 32 29 2c 28 20 3f 33 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | 2),(.?33,4),(1,2)ON.CONFLICT(a,b |
aed80 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 88 1e 04 00 82 67 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..1.....gCREATE.TAB |
aeda0 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.INT.UNIQUE,. |
aedc0 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..c.INT.DEFAULT.0,...PRIMARY.KEY |
aede0 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
aee00 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 31 3d 31 33 2c 34 29 | TO.t1(a,b).VALUES(1,2),(.1=13,4) |
aee20 | 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e | ,(1,2)ON.CONFLICT(a,b).DO.NOTHIN |
aee40 | 47 3b 0a 81 35 88 1d 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 | G;..5.....oCREATE.TABLE.t1(...a. |
aee60 | 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 | INT,...b.INT.UNIQUE,...c.INT.DEF |
aee80 | 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 | AULT.0,...PRIMARY.KEY(a,b).).WIT |
aeea0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | HOUT.ROWID;.INSERT.INTO.t1(a,b). |
aeec0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 31 3d 31 33 2c 34 29 2c 28 20 31 3d 31 31 2c 32 29 4f | VALUES(1,2),(.1=13,4),(.1=11,2)O |
aeee0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 1c | N.CONFLICT(a,b).DO.NOTHING;..... |
aef00 | 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a.INT,... |
aef20 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c | b.INT.UNIQUE,...c.INT.DEFAULT.0, |
aef40 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
aef60 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
aef80 | 31 2c 32 29 24 28 33 2c 0a 81 30 88 1b 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | 1,2)$(3,..0.....eCREATE.TABLE.t1 |
aefa0 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | (...a.INT,...b.INT.UNIQUE,...c.I |
aefc0 | 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | NT.DEFAULT.0,...PRIMARY.KEY(a,b) |
aefe0 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
af000 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 2d 27 2b 20 20 64 27 27 62 27 29 2c 28 31 2c 32 29 | (a,b).VALUES(1,-'+..d''b'),(1,2) |
af020 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 35 88 | ON.CONFLICT(a,b).DO.NOTHING;..5. |
af040 | 1a 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | ....oCREATE.TABLE.t1(...a.INT,.. |
af060 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNIQUE,...c.INT.DEFAULT.0 |
af080 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
af0a0 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
af0c0 | 28 31 2c 20 61 2e 62 32 29 2c 28 33 2c 20 61 2e 62 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 | (1,.a.b2),(3,.a.b4),(1,2)ON.CONF |
af0e0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 39 88 19 04 00 82 77 43 52 | LICT(a,b).DO.NOTHING;..9.....wCR |
af100 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 | EATE.TABLE.t1(...a.INT,...b.INT. |
af120 | 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 | UNIQUE,...c.INT.DEFAULT.0,...PRI |
af140 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
af160 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 61 2e 62 | NSERT.INTO.t1(a,b).VALUES(1,.a.b |
af180 | 32 29 2c 28 33 2c 20 61 2e 62 34 29 2c 28 31 2c 20 61 2e 62 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | 2),(3,.a.b4),(1,.a.b2)ON.CONFLIC |
af1a0 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 18 04 00 82 5f 43 52 45 41 54 | T(a,b).DO.NOTHING;..-....._CREAT |
af1c0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
af1e0 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.0,...PRIMAR |
af200 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
af220 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 27 65 27 27 62 27 | RT.INTO.t1(a,b).VALUES(1,.'e''b' |
af240 | 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 | ),(1,2)ON.CONFLICT(a,b).DO.NOTHI |
af260 | 4e 47 3b 0a 81 3f 88 17 04 00 83 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 | NG;..?......CREATE.TABLE.t1(...a |
af280 | 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 | .INT,...b.INT.UNIQUE,...c.INT.DE |
af2a0 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(a,b).).WI |
af2c0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | THOUT.ROWID;.INSERT.INTO.t1(a,b) |
af2e0 | 20 56 41 4c 55 45 53 28 31 2c 20 27 61 27 27 62 27 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | .VALUES(1,.'a''b'),(1,2)ON.CONFL |
af300 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 52 45 49 4e 44 45 58 20 72 74 72 69 | ICT(a,b).DO.NOTHING;REINDEX.rtri |
af320 | 6d 28 31 2c 31 29 0a 81 34 88 16 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | m(1,1)..4.....mCREATE.TABLE.t1(. |
af340 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 | ..a.INT,...b.INT.UNIQUE,...c.INT |
af360 | 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | .DEFAULT.0,...PRIMARY.KEY(a,b).) |
af380 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
af3a0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 27 61 27 27 62 27 29 2c 28 31 2c 32 29 4f 4e 20 43 4f | ,b).VALUES(1,.'a''b'),(1,2)ON.CO |
af3c0 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 52 45 49 4e 44 45 58 0a 81 | NFLICT(a,b).DO.NOTHING;REINDEX.. |
af3e0 | 30 88 15 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | 0.....eCREATE.TABLE.t1(...a.INT, |
af400 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNIQUE,...c.INT.DEFAULT |
af420 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
af440 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
af460 | 45 53 28 31 2c 20 27 2b 20 20 64 27 27 62 27 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ES(1,.'+..d''b'),(1,2)ON.CONFLIC |
af480 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 14 04 00 82 5f 43 52 45 41 54 | T(a,b).DO.NOTHING;..-....._CREAT |
af4a0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
af4c0 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.0,...PRIMAR |
af4e0 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
af500 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 27 20 2d 31 20 27 | RT.INTO.t1(a,b).VALUES(1,.'.-1.' |
af520 | 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 | ),(1,2)ON.CONFLICT(a,b).DO.NOTHI |
af540 | 4e 47 3b 0a 81 2d 88 13 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 | NG;..-....._CREATE.TABLE.t1(...a |
af560 | 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 | .INT,...b.INT.UNIQUE,...c.INT.DE |
af580 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(a,b).).WI |
af5a0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | THOUT.ROWID;.INSERT.INTO.t1(a,b) |
af5c0 | 20 56 41 4c 55 45 53 28 31 2c 20 27 20 20 0d 31 27 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | .VALUES(1,.'...1'),(1,2)ON.CONFL |
af5e0 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 12 04 00 82 5f 43 52 45 | ICT(a,b).DO.NOTHING;..-....._CRE |
af600 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
af620 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT.0,...PRIM |
af640 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
af660 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 20 7a 65 72 | SERT.INTO.t1(a,b).VALUES(1,..zer |
af680 | 6f 62 6c 6f 62 28 31 29 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | oblob(1))ON.CONFLICT(a,b).DO.NOT |
af6a0 | 48 49 4e 47 3b 22 81 35 88 11 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;".5.....oCREATE.TABLE.t1(.. |
af6c0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
af6e0 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
af700 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
af720 | 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 44 49 53 54 49 4e 43 54 3f 29 2c 34 29 2c 28 31 2c | b).VALUES(.sum(DISTINCT?),4),(1, |
af740 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
af760 | 39 88 10 04 00 82 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | 9.....wCREATE.TABLE.t1(...a.INT, |
af780 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNIQUE,...c.INT.DEFAULT |
af7a0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
af7c0 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
af7e0 | 45 53 28 20 73 75 6d 28 32 30 30 31 2d 30 31 2d 30 31 31 25 59 29 2c 34 29 2c 28 31 2c 32 29 4f | ES(.sum(2001-01-011%Y),4),(1,2)O |
af800 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 88 0f | N.CONFLICT(a,b).DO.NOTHING;..4.. |
af820 | 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ...mCREATE.TABLE.t1(...a.INT,... |
af840 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c | b.INT.UNIQUE,...c.INT.DEFAULT.0, |
af860 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
af880 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
af8a0 | 20 73 75 6d 28 20 63 68 61 72 28 31 29 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | .sum(.char(1)),4),(1,2)ON.CONFLI |
af8c0 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 0e 04 00 82 5f 43 52 45 41 | CT(a,b).DO.NOTHING;..-....._CREA |
af8e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
af900 | 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,...c.INT.DEFAULT.0,...PRIMA |
af920 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
af940 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 61 62 73 28 3f 29 2c | ERT.INTO.t1(a,b).VALUES(.abs(?), |
af960 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
af980 | 49 4e 47 3b 0a 81 30 88 0d 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;..0.....eCREATE.TABLE.t1(... |
af9a0 | 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 | a.INT,...b.INT.UNIQUE,...c.INT.D |
af9c0 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
af9e0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
afa00 | 29 20 56 41 4c 55 45 53 28 20 61 62 73 28 2d 2e 31 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | ).VALUES(.abs(-.11),4),(1,2)ON.C |
afa20 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 0c 04 00 82 | ONFLICT(a,b).DO.NOTHING;..0..... |
afa40 | 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | eCREATE.TABLE.t1(...a.INT,...b.I |
afa60 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNIQUE,...c.INT.DEFAULT.0,... |
afa80 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY(a,b).).WITHOUT.ROWID |
afaa0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 61 62 | ;.INSERT.INTO.t1(a,b).VALUES(.ab |
afac0 | 73 28 20 2d 31 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | s(.-11),4),(1,2)ON.CONFLICT(a,b) |
afae0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 0b 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..0.....eCREATE.TABL |
afb00 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
afb20 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.INT.DEFAULT.0,...PRIMARY.KEY( |
afb40 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | a,b).).WITHOUT.ROWID;.INSERT.INT |
afb60 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 61 62 73 28 20 22 61 22 29 2c 34 29 2c 28 | O.t1(a,b).VALUES(.abs(."a"),4),( |
afb80 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
afba0 | 0a 81 36 88 0a 04 00 82 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..6.....qCREATE.TABLE.t1(...a.IN |
afbc0 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 | T,...b.INT.UNIQUE,...c.INT.DEFAU |
afbe0 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(a,b).).WITHO |
afc00 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
afc20 | 4c 55 45 53 28 20 40 31 31 2c 20 40 31 32 29 2c 28 33 2c 34 29 2c 28 31 2c 20 40 31 32 29 4f 4e | LUES(.@11,.@12),(3,4),(1,.@12)ON |
afc40 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 36 88 09 04 | .CONFLICT(a,b).DO.NOTHING;..6... |
afc60 | 00 82 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ..qCREATE.TABLE.t1(...a.INT,...b |
afc80 | 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a | .INT.UNIQUE,...c.INT.DEFAULT.0,. |
afca0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ..PRIMARY.KEY(a,b).).WITHOUT.ROW |
afcc0 | 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 | ID;.INSERT.INTO.t1(a,b).VALUES(. |
afce0 | 40 31 31 2c 20 40 31 32 29 2c 28 20 40 31 33 2c 3f 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | @11,.@12),(.@13,?),(1,2)ON.CONFL |
afd00 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 36 88 08 04 00 82 71 43 52 45 | ICT(a,b).DO.NOTHING;..6.....qCRE |
afd20 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
afd40 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT.0,...PRIM |
afd60 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
afd80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 40 31 31 2c 20 40 | SERT.INTO.t1(a,b).VALUES(.@11,.@ |
afda0 | 31 32 29 2c 28 20 40 31 33 2c 34 29 2c 28 20 40 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | 12),(.@13,4),(.@1)ON.CONFLICT(a, |
afdc0 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 39 88 07 04 00 82 77 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..9.....wCREATE.TA |
afde0 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
afe00 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT.0,...PRIMARY.KE |
afe20 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
afe40 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 40 31 31 2c 20 40 31 32 29 2c 28 20 | NTO.t1(a,b).VALUES(.@11,.@12),(. |
afe60 | 40 31 33 2c 20 40 31 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | @13,.@14),(1,2)ON.CONFLICT(a,b). |
afe80 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 36 88 06 04 00 82 71 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..6.....qCREATE.TABLE |
afea0 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 | .t1(...a.INT,...b.INT.UNIQUE,... |
afec0 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | c.INT.DEFAULT.0,...PRIMARY.KEY(a |
afee0 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
aff00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 40 31 31 2c 20 40 31 32 29 2c 28 20 40 31 20 | .t1(a,b).VALUES(.@11,.@12),(.@1. |
aff20 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
aff40 | 48 49 4e 47 3b 0a 81 36 88 05 04 00 82 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;..6.....qCREATE.TABLE.t1(.. |
aff60 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
aff80 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
affa0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
affc0 | 62 29 20 56 41 4c 55 45 53 28 20 40 31 31 2c 20 40 31 20 29 2c 28 33 2c 34 29 2c 28 20 40 31 31 | b).VALUES(.@11,.@1.),(3,4),(.@11 |
affe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b0000 | 0d 00 00 00 31 00 fe 00 1f 45 1e 8a 1d d1 1d 1c 1c 68 1b b7 1b 06 1a 55 19 c8 19 3b 18 7d 17 ed | ....1....E.......h.....U...;.}.. |
b0020 | 17 35 16 7d 15 c5 15 0d 14 80 13 f3 13 63 12 d3 12 46 11 95 11 05 10 54 0f 9d 0f 10 0e 5f 0d ae | .5.}.........c...F.....T....._.. |
b0040 | 0d 21 0c 92 0b d7 0b 4a 0a bd 0a 30 09 a0 09 10 08 83 07 f6 07 69 06 dc 06 4f 05 c2 05 0e 04 5d | .!.....J...0.........i...O.....] |
b0060 | 03 a9 03 1c 02 67 01 af 00 fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....g.......................... |
b0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 2d | ...............................- |
b0100 | 88 60 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .`..._CREATE.TABLE.t1(...a.INT,. |
b0120 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | ..b.INT.UNIQUE,...c.INT.DEFAULT. |
b0140 | 54 52 49 47 47 45 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | TRIGGERIMARY.KEY(a,b).).WITHOUT. |
b0160 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
b0180 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | S(1,2),(3,4),(1,2)ON.CONFLICT(a, |
b01a0 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 88 5f 04 00 82 6d 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..4._...mCREATE.TA |
b01c0 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
b01e0 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 54 52 49 47 47 45 52 30 2c 0a 20 20 50 52 49 | ...c.INT.DEFAULT.TRIGGER0,...PRI |
b0200 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
b0220 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b0240 | 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f | 3,4),(1,2)ON.CONFLICT(a,b).DO.NO |
b0260 | 54 48 49 4e 47 3b 0a 81 31 88 5e 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | THING;..1.^...gCREATE.TABLE.t1(. |
b0280 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 | ..a.INT,...b.INT.UNIQUE,...c.INT |
b02a0 | 20 44 45 46 41 55 4c 54 20 46 41 49 4c 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | .DEFAULT.FAIL0,...PRIMARY.KEY(a, |
b02c0 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
b02e0 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f | t1(a,b).VALUES(1,2),(3,4),(1,2)O |
b0300 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 5d | N.CONFLICT(a,b).DO.NOTHING;....] |
b0320 | 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a.INT,... |
b0340 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 46 41 | b.INT.UNIQUE,...c.INT.DEFAULT.FA |
b0360 | 49 4c 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | IL.PRIMARY.KEY(aa,b).VALUES(1,2) |
b0380 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ,(3,4),(1,2)ON.CONFLICT(a,b).DO. |
b03a0 | 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 5c 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | NOTHING;..0.\...eCREATE.TABLE.t1 |
b03c0 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | (...a.INT,...b.INT.UNIQUE,...c.I |
b03e0 | 4e 54 20 44 45 46 41 55 4c 54 20 45 4e 44 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | NT.DEFAULT.END0,...PRIMARY.KEY(a |
b0400 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
b0420 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 | .t1(a,b).VALUES(1,2),(3,4),(1,2) |
b0440 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 | ON.CONFLICT(a,b).DO.NOTHING;..-. |
b0460 | 5b 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | [..._CREATE.TABLE.t1(...a.INT,.. |
b0480 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 | .b.INT.UNIQUE,...c.INT.DEFAULT.E |
b04a0 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
b04c0 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
b04e0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | (1,2),(3,4),(1,2)ON.CONFLICT(a,b |
b0500 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 88 5a 04 00 82 65 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..0.Z...eCREATE.TAB |
b0520 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.INT.UNIQUE,. |
b0540 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..c.INT.DEFAULT.E,...PRIMARY.KEY |
b0560 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b0580 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 3f 31 33 2c 34 29 2c | TO.t1(a,b).VALUES(1,2),(.?13,4), |
b05a0 | 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | (1,2)ON.CONFLICT(a,b).DO.NOTHING |
b05c0 | 3b 0a 81 09 88 59 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;....Y....CREATE.TABLE.t1(...a.I |
b05e0 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | NT,...b.INT.UNIQUE,...c.INT.DEFA |
b0600 | 55 4c 54 20 43 55 52 42 45 4e 54 5f 44 41 54 45 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 | ULT.CURBENT_DATE.KEY(aa,b).VALUE |
b0620 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | S(1,2),(3,4),(1,2)ON.CONFLICT(a, |
b0640 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 58 04 00 82 17 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;....X....CREATE.TA |
b0660 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
b0680 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 64 50 52 49 4d 41 52 59 20 4b 45 59 29 | ...c.INT.DEFAULT.0XdPRIMARY.KEY) |
b06a0 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f | .WITHOUT.ROWID;.INSERT1(a,b1,2)O |
b06c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 57 | N.CONFLICT(a,b).DO.NOTHING;....W |
b06e0 | 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a.INT,... |
b0700 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 | b.INT.UNIQUE,...c.INT.DEFAULT.0X |
b0720 | 64 32 30 30 31 2d 30 31 2d 30 31 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | d2001-01-01.).WITHOUT.ROWID;.INS |
b0740 | 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ERT1(a,b1,2)ON.CONFLICT(a,b).DO. |
b0760 | 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 56 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | NOTHING;....V....CREATE.TABLE.t1 |
b0780 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 | (...a.INT,...b.INT.UNIQUE,...c.I |
b07a0 | 4e 54 20 44 45 46 41 55 4c 54 20 30 58 64 20 20 50 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | NT.DEFAULT.0Xd..PEY(a,b).).WITHO |
b07c0 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 | UT.ROWID;.INSERT1(a,b1,2)ON.CONF |
b07e0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 55 04 00 82 17 43 52 | LICT(a,b).DO.NOTHING;....U....CR |
b0800 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 | EATE.TABLE.t1(...a.INT,...b.INT. |
b0820 | 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 44 45 46 41 41 44 | UNIQUE,...c.INT.DEFAULT.0XDEFAAD |
b0840 | 44 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 | Da,b).).WITHOUT.ROWID;.INSERT1(a |
b0860 | 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e | ,b1,2)ON.CONFLICT(a,b).DO.NOTHIN |
b0880 | 47 3b 0a 81 09 88 54 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 | G;....T....CREATE.TABLE.t1(...a. |
b08a0 | 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 | INT,...b.INT.UNIQUE,...c.INT.DEF |
b08c0 | 41 55 4c 54 20 30 58 44 45 32 30 30 31 2d 30 31 2d 30 31 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | AULT.0XDE2001-01-01).WITHOUT.ROW |
b08e0 | 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ID;.INSERT1(a,b1,2)ON.CONFLICT(a |
b0900 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 88 53 04 00 82 1d 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;....S....CREATE.T |
b0920 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | ABLE.t1(...a.INT,...b.INT.UNIQUE |
b0940 | 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 41 44 44 50 52 49 4d 41 52 59 20 4b | ,...c.INT.DEFAULT.0XADDPRIMARY.K |
b0960 | 45 59 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 | EY.).WITHOUT.ROWID;.INSERT1(a,b1 |
b0980 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b09a0 | 81 0c 88 52 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | ...R....CREATE.TABLE.t1(...a.INT |
b09c0 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ,...b.INT.UNIQUE,...c.INT.DEFAUL |
b09e0 | 54 20 30 58 41 44 44 0a 20 20 50 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | T.0XADD...PEY(a,b).).WITHOUT.ROW |
b0a00 | 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ID;.INSERT1(a,b1,2)ON.CONFLICT(a |
b0a20 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 51 04 00 82 17 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;....Q....CREATE.T |
b0a40 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | ABLE.t1(...a.INT,...b.INT.UNIQUE |
b0a60 | 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 30 c5 46 41 55 4c 54 61 2c 62 29 0a | ,...c.INT.DEFAULT.0X0.FAULTa,b). |
b0a80 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 | ).WITHOUT.ROWID;.INSERT1(a,b1,2) |
b0aa0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 | ON.CONFLICT(a,b).DO.NOTHING;.... |
b0ac0 | 50 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | P....CREATE.TABLE.t1(...a.INT,.. |
b0ae0 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNIQUE,...c.INT.DEFAULT.0 |
b0b00 | 58 30 50 52 49 4d 41 52 59 20 4b 45 59 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | X0PRIMARY.KEY).WITHOUT.ROWID;.IN |
b0b20 | 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | SERT1(a,b1,2)ON.CONFLICT(a,b).DO |
b0b40 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 4f 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;....O....CREATE.TABLE.t |
b0b60 | 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 | 1(...a.INT,...b.INT.UNIQUE,...c. |
b0b80 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 0a 20 20 50 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | INT.DEFAULT.0X...PEY(a,b).).WITH |
b0ba0 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e | OUT.ROWID;.INSERT1(a,b1,2)ON.CON |
b0bc0 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 4e 04 00 82 73 43 | FLICT(a,b).DO.NOTHING;..7.N...sC |
b0be0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 | REATE.TABLE.t1(...a.INT,...b.INT |
b0c00 | 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 37 37 37 37 37 37 | .UNIQUE,...c.INT.DEFAULT.0777777 |
b0c20 | 37 37 37 37 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 62 29 0a 29 20 57 49 54 48 4f | 7777,...PRIMARY.KEY(b,b).).WITHO |
b0c40 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
b0c60 | 4c 55 45 73 28 31 32 30 30 31 2d 30 31 2d 30 31 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | LUEs(12001-01-01(1,2)ON.CONFLICT |
b0c80 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0b 88 4d 04 00 82 1b 43 52 45 41 54 45 | (a,b).DO.NOTHING;....M....CREATE |
b0ca0 | 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 | .TABLE.t1(...a.INT,...b.INT.UNIQ |
b0cc0 | 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2e 20 2f 2a 20 2a 2f 0a 20 20 50 | UE,...c.INT.DEFAULT.0../*.*/...P |
b0ce0 | 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | RIMARY.KEY(aa,ALUES(1,2),(3,4),( |
b0d00 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
b0d20 | 0a 81 09 88 4c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ....L....CREATE.TABLE.t1(...a.IN |
b0d40 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 | T,...b.INT.UNIQUE,...c.INT.DEFAU |
b0d60 | 4c 54 20 30 2c 43 4f 4e 53 54 52 41 49 4e 54 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 | LT.0,CONSTRAINT.KEY(aa,b).VALUES |
b0d80 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | (1,2),(3,4),(1,2)ON.CONFLICT(a,b |
b0da0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 4b 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..-.K..._CREATE.TAB |
b0dc0 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.INT.UNIQUE,. |
b0de0 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 5b 20 4b 45 59 | ..c.INT.DEFAULT.0,...PRIMAR[.KEY |
b0e00 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b0e20 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | TO.t1(a,b).VALUES(1,2),(3,4),(1, |
b0e40 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
b0e60 | 2d 88 4a 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | -.J..._CREATE.TABLE.t1(...a.INT, |
b0e80 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNIQUE,...c.INT.DEFAULT |
b0ea0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(b,b).).WITHOUT |
b0ec0 | 20 52 4f 57 49 44 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;REPLACE.INTO.t1(a,b).VALU |
b0ee0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ES(1,2),(3,4),(1,2)ON.CONFLICT(a |
b0f00 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 49 04 00 82 17 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;....I....CREATE.T |
b0f20 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | ABLE.t1(...a.INT,...b.INT.UNIQUE |
b0f40 | 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b | ,...c.INT.DEFAULT.0,...PRIMARY.K |
b0f60 | 45 59 28 62 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 41 4e 41 4c 59 5a 45 20 | EY(b,b).).WITHOUT.ROWID;ANALYZE. |
b0f80 | 49 4e 54 4f 20 74 31 28 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 88 | INTO.t1(ICT(a,b).DO.NOTHING;..3. |
b0fa0 | 48 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | H...kCREATE.TABLE.t1(...a.INT,.. |
b0fc0 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNIQUE,...c.INT.DEFAULT.0 |
b0fe0 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(b,b).).WITHOUT.R |
b1000 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
b1020 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 | (1,2),(3,4),(1,2)ON.CONFLICT./*. |
b1040 | 2a 2f 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 2d 88 47 04 00 82 5f 43 52 45 41 | */DO.NOTHING;VACUUM..-.G..._CREA |
b1060 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
b1080 | 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,...c.INT.DEFAULT.0,...PRIMA |
b10a0 | 52 59 20 4b 45 59 28 62 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 49 4e 53 | RY.KEY(b,b).).WITHOUT.ROWID+.INS |
b10c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b10e0 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
b1100 | 49 4e 47 3b 0a 81 0c 88 46 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;....F....CREATE.TABLE.t1(... |
b1120 | 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 | a.INT,...b.INT.UNIQUE,...c.INT.D |
b1140 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 63 2c 62 29 0a 29 | EFAULT.0,...PRIMARY.KEY(a,c,b).) |
b1160 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 31 28 44 4f 20 | .WITHOUT.ROWID;.INSERT.INTO1(DO. |
b1180 | 4e 4f 54 48 49 4e 47 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 81 2d 88 45 04 00 82 5f 43 52 45 | NOTHINGID;.INSERT.INT.-.E..._CRE |
b11a0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b11c0 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT.0,...PRIM |
b11e0 | 41 52 59 20 4b 45 59 28 61 2c 63 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 52 45 50 | ARY.KEY(a,c).).WITHOUT.ROWID;REP |
b1200 | 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | LACE.INTO.t1(a,b).VALUES(1,2),(3 |
b1220 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
b1240 | 48 49 4e 47 3b 0a 81 09 88 44 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;....D....CREATE.TABLE.t1(.. |
b1260 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
b1280 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 63 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,c).). |
b12a0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | WITHOUT.ROWID+4),(1,2)ON.CONFLIC |
b12c0 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 88 43 04 00 82 1d 43 52 45 41 54 | T(a,b).DO.NOTHING;....C....CREAT |
b12e0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
b1300 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.0,...PRIMAR |
b1320 | 59 20 4b 45 59 28 61 2c 62 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | Y.KEY(a,b,b).).WITHOUT.ROWID;.IN |
b1340 | 53 45 52 54 20 49 4e 54 4f 31 28 44 4f 20 4e 4f 54 48 49 4e 47 49 44 3b 0a 49 4e 53 45 52 54 20 | SERT.INTO1(DO.NOTHINGID;.INSERT. |
b1360 | 49 4e 54 81 0c 88 42 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 | INT...B....CREATE.TABLE.t1(...a. |
b1380 | 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 | INT,...b.INT.UNIQUE,...c.INT.DEF |
b13a0 | 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 2c 62 29 0a 29 20 57 | AULT.0,...PRIMARY.KEY(a,b,b).).W |
b13c0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 31 28 44 4f 20 4e 4f | ITHOUT.ROWID+.INSERT.INTO1(DO.NO |
b13e0 | 54 48 49 4e 47 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 81 09 88 41 04 00 82 17 43 52 45 41 54 | THINGID;.INSERT.INT...A....CREAT |
b1400 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
b1420 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,...c.INT.DEFAULT.0,...PRIMAR |
b1440 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 c9 44 3b 34 29 2c 28 31 | Y.KEY(a,b).).WITHOUT.ROW.D;4),(1 |
b1460 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 e1 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(.,b).DO.NOTHING;. |
b1480 | 81 09 88 40 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | ...@....CREATE.TABLE.t1(...a.INT |
b14a0 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ,...b.INT.UNIQUE,...c.INT.DEFAUL |
b14c0 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b14e0 | 54 20 52 4f 57 49 c4 3b 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | T.ROWI.;4),(1,2)ON.CONFLICT(a,b) |
b1500 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 88 3f 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..4.?...mCREATE.TABL |
b1520 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
b1540 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.INT.DEFAULT.0,...PRIMARY.KEY( |
b1560 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 | a,b).).WITHOUT.ROWID;EXPLAIN.INS |
b1580 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b15a0 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT./*.*/DO.NOTH |
b15c0 | 49 4e 47 3b 0a 81 34 88 3e 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;..4.>...mCREATE.TABLE.t1(... |
b15e0 | 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 | a.INT,...b.INT.UNIQUE,...c.INT.D |
b1600 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b1620 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ITHOUT.ROWID;EXPLAIN.INSERT.INTO |
b1640 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 | .t1(a,b).VALUES(.sum(1),4),(1,2) |
b1660 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 88 | ON.CONFLICT(a,b).DO.NOTHING;..4. |
b1680 | 3d 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | =...mCREATE.TABLE.t1(...a.INT,.. |
b16a0 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNIQUE,...c.INT.DEFAULT.0 |
b16c0 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
b16e0 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 67 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(g,b).VALUES |
b1700 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 3f 30 30 30 30 30 30 30 2c 32 29 4f 4e 20 43 4f 4e 46 4c | (1,2),(3,4),(?0000000,2)ON.CONFL |
b1720 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 88 3c 04 00 82 6d 43 52 45 | ICT(a,b).DO.NOTHING;..4.<...mCRE |
b1740 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b1760 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT.0,...PRIM |
b1780 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b17a0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 67 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(g,b).VALUES(1,2),(3 |
b17c0 | 2c 34 29 2c 28 31 30 30 30 30 30 30 30 34 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | ,4),(1000000042)ON.CONFLICT(a,b) |
b17e0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 88 3b 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;....;....CREATE.TABL |
b1800 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
b1820 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.INT.DEFAULT.0,...PRIMARY.KEY( |
b1840 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | a,b).).WITHOUT.ROWID;.INSERT.INT |
b1860 | 4f 20 74 31 28 61 2c 62 29 44 45 46 41 55 4c 54 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 81 3a 88 | O.t1(a,b)DEFAULT.VALUES(1,2),.:. |
b1880 | 3a 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | :...yCREATE.TABLE.t1(...a.INT,.. |
b18a0 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNIQUE,...c.INT.DEFAULT.0 |
b18c0 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
b18e0 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
b1900 | 28 32 30 30 31 2d 30 31 2d 30 31 2d 3f 31 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e | (2001-01-01-?11,2),(3,4),(1,2)ON |
b1920 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 39 04 | .CONFLICT(a,b).DO.NOTHING;....9. |
b1940 | 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ...CREATE.TABLE.t1(...a.INT,...b |
b1960 | 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a | .INT.UNIQUE,...c.INT.DEFAULT.0,. |
b1980 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ..PRIMARY.KEY(a,b).).WITHOUT.ROW |
b19a0 | 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ID;.INSERT.INTO.t1(a,b).VALUES(1 |
b19c0 | 2c 58 27 61 37 27 62 0a 81 09 88 38 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ,X'a7'b....8....CREATE.TABLE.t1( |
b19e0 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e | ...a.INT,...b.INT.UNIQUE,...c.IN |
b1a00 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b1a20 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b1a40 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 58 27 61 27 27 62 0a 81 2d 88 37 04 00 82 5f 43 52 45 | a,b).VALUES(1,X'a''b..-.7..._CRE |
b1a60 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b1a80 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT.0,...PRIM |
b1aa0 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b1ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 6a | SERT.INTO.t1(a,b).VALUES(1,2),(j |
b1ae0 | 73 6f 6e 28 3f 29 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | son(?),2)ON.CONFLICT(a,b).DO.NOT |
b1b00 | 48 49 4e 47 3b 0a 81 2d 88 36 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;..-.6..._CREATE.TABLE.t1(.. |
b1b20 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
b1b40 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
b1b60 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
b1b80 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 5b 4f 4e | b).VALUES(1,2),(3,4),(1,2)ON.[ON |
b1ba0 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 35 04 00 82 5f 43 | FLICT(a,b).DO.NOTHING;..-.5..._C |
b1bc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 | REATE.TABLE.t1(...a.INT,...b.INT |
b1be0 | 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 | .UNIQUE,...c.INT.DEFAULT.0,...PR |
b1c00 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY(a,b).).WITHOUT.ROWID;. |
b1c20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
b1c40 | 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 72 29 20 44 4f 20 4e | (3,4),(1,2)ON.CONFLICT(a,r).DO.N |
b1c60 | 4f 54 48 49 4e 47 3b 0a 81 30 88 34 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | OTHING;..0.4...eCREATE.TABLE.t1( |
b1c80 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e | ...a.INT,...b.INT.UNIQUE,...c.IN |
b1ca0 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b1cc0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b1ce0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 3f 3d 34 29 2c 28 31 2c 32 29 4f | a,b).VALUES(1,2),(3,.?=4),(1,2)O |
b1d00 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 88 33 | N.CONFLICT(a,b).DO.NOTHING;..1.3 |
b1d20 | 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ...gCREATE.TABLE.t1(...a.INT,... |
b1d40 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c | b.INT.UNIQUE,...c.INT.DEFAULT.0, |
b1d60 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
b1d80 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
b1da0 | 31 2c 32 29 2c 28 33 2c 20 31 3d 31 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 1,2),(3,.1=14),(1,2)ON.CONFLICT( |
b1dc0 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 35 88 32 04 00 82 6f 43 52 45 41 54 45 20 | a,b).DO.NOTHING;..5.2...oCREATE. |
b1de0 | 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 | TABLE.t1(...a.INT,...b.INT.UNIQU |
b1e00 | 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 | E,...c.INT.DEFAULT.0,...PRIMARY. |
b1e20 | 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 | KEY(a,b).).WITHOUT.ROWID;.INSERT |
b1e40 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 31 3d | .INTO.t1(a,b).VALUES(1,2),(3,.1= |
b1e60 | 31 34 29 2c 28 31 2c 20 31 3d 31 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | 14),(1,.1=12)ON.CONFLICT(a,b).DO |
b1e80 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 88 31 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..7.1...sCREATE.TABLE.t |
b1ea0 | 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 | 1(...a.INT,...b.INT.UNIQUE,...c. |
b1ec0 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | INT.DEFAULT.0,...PRIMARY.KEY(a,b |
b1ee0 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
b1f00 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 35 30 45 2d 33 33 33 2c | 1(a,b).VALUES(1,2),(200150E-333, |
b1f20 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
b1f40 | 49 4e 47 3b 0a 81 37 88 30 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;..7.0...sCREATE.TABLE.t1(... |
b1f60 | 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 | a.INT,...b.INT.UNIQUE,...c.INT.D |
b1f80 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b1fa0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b1fc0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 35 30 45 2d 33 32 33 2c 34 29 2c 28 31 | ).VALUES(1,2),(200150E-323,4),(1 |
b1fe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b2000 | 0d 00 00 00 2c 00 b8 00 1f 40 1e 8f 1e 02 1d 75 1c c4 1c 13 1b 86 1a f9 1a 6c 19 de 19 4f 18 c2 | ....,....@.....u.........l...O.. |
b2020 | 18 35 17 a8 17 1b 16 5a 15 cd 15 07 14 41 13 7b 12 b1 11 ef 11 29 10 41 0f 71 0e ab 0d e5 0d 1f | .5.....Z.....A.{.....).A.q...... |
b2040 | 0c 59 0b 93 0a cd 0a 07 09 3a 08 74 07 ae 06 e8 06 22 05 5c 04 96 03 d0 03 0a 02 44 01 7e 00 b8 | .Y.......:.t.....".\.......D.~.. |
b2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 42 89 0c 04 00 83 09 | .........................B...... |
b20c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREATE.TABLE.t1(...a.INT,...b.IN |
b20e0 | 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 | T.UNIQUE,..INTINT.DEFAULT.0,...P |
b2100 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
b2120 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
b2140 | 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 45 37 37 37 37 37 37 37 2c 32 | ,(3,4),(17777777777777E7777777,2 |
b2160 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 | )ON.CONFLICT(a,b).DO.NOTHING;..B |
b2180 | 89 0b 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | ......CREATE.TABLE.t1(...a.INT,. |
b21a0 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 | ..b.INT.UNIQUE,..INTINT.DEFAULT. |
b21c0 | 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | 0,...PRIMARY.KEY(a,b).).WITHOUT. |
b21e0 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
b2200 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 2f 37 37 37 37 37 37 | S(1,2),(3,4),(17777777777/777777 |
b2220 | 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 | 7777,2)ON.CONFLICT(a,b).DO.NOTHI |
b2240 | 4e 47 3b 0a 81 42 89 0a 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 | NG;..B......CREATE.TABLE.t1(...a |
b2260 | 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 | .INT,...b.INT.UNIQUE,..INTINT.DE |
b2280 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(a,b).).WI |
b22a0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | THOUT.ROWID;.INSERT.INTO.t1(a,b) |
b22c0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 20 2d | .VALUES(1,2),(3,4),(1777777777.- |
b22e0 | 31 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | 1777777777,2)ON.CONFLICT(a,b).DO |
b2300 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 09 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..B......CREATE.TABLE.t |
b2320 | 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 | 1(...a.INT,...b.INT.UNIQUE,..INT |
b2340 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | INT.DEFAULT.0,...PRIMARY.KEY(a,b |
b2360 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
b2380 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 2a 39 37 37 | 1(a,b).VALUES(1,2),(3,4),(17*977 |
b23a0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 7777777777777777,2)ON.CONFLICT(a |
b23c0 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 08 04 00 83 09 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;..B......CREATE.T |
b23e0 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | ABLE.t1(...a.INT,...b.INT.UNIQUE |
b2400 | 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b | ,..INTINT.DEFAULT.0,...PRIMARY.K |
b2420 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
b2440 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
b2460 | 31 37 2a 39 32 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 | 17*9277777777777777777,2)ON.CONF |
b2480 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 07 04 00 83 09 43 52 | LICT(a,b).DO.NOTHING;..B......CR |
b24a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 | EATE.TABLE.t1(...a.INT,...b.INT. |
b24c0 | 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 | UNIQUE,..INTINT.DEFAULT.0,...PRI |
b24e0 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
b2500 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b2520 | 33 2c 34 29 2c 28 31 37 2a 39 32 32 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f | 3,4),(17*9227777777777777777,2)O |
b2540 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 06 | N.CONFLICT(a,b).DO.NOTHING;..B.. |
b2560 | 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a.INT,... |
b2580 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c | b.INT.UNIQUE,..INTINT.DEFAULT.0, |
b25a0 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
b25c0 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
b25e0 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 2a 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | 1,2),(3,4),(17*77777777777777777 |
b2600 | 45 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | E7,2)ON.CONFLICT(a,b).DO.NOTHING |
b2620 | 3b 0a 81 42 89 05 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;..B......CREATE.TABLE.t1(...a.I |
b2640 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 | NT,...b.INT.UNIQUE,..INTINT.DEFA |
b2660 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b).).WITH |
b2680 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
b26a0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 2a 37 37 37 37 37 20 7c 7c 20 37 37 | ALUES(1,2),(3,4),(17*77777.||.77 |
b26c0 | 37 37 37 37 37 37 45 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | 777777E7,2)ON.CONFLICT(a,b).DO.N |
b26e0 | 4f 54 48 49 4e 47 3b 0a 81 42 89 04 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | OTHING;..B......CREATE.TABLE.t1( |
b2700 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e | ...a.INT,...b.INT.UNIQUE,..INTIN |
b2720 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b2740 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b2760 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 2a 37 20 7c 7c 20 | a,b).VALUES(1,2),(3,4),(17*7.||. |
b2780 | 37 37 37 37 37 37 37 37 37 37 37 37 45 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | 777777777777E7,2)ON.CONFLICT(a,b |
b27a0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 03 04 00 83 09 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..B......CREATE.TAB |
b27c0 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.INT.UNIQUE,. |
b27e0 | 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | .INTINT.DEFAULT.0,...PRIMARY.KEY |
b2800 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b2820 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 26 | TO.t1(a,b).VALUES(1,2),(3,4),(1& |
b2840 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | 77777777777777777777,2)ON.CONFLI |
b2860 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 02 04 00 83 09 43 52 45 41 | CT(a,b).DO.NOTHING;..B......CREA |
b2880 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
b28a0 | 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,..INTINT.DEFAULT.0,...PRIMA |
b28c0 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
b28e0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b2900 | 34 29 2c 28 31 26 2d 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 | 4),(1&-7777777777777777777,2)ON. |
b2920 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 49 89 01 04 00 | CONFLICT(a,b).DO.NOTHING;..I.... |
b2940 | 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | ..CREATE.TABLE.t1(...a.INT,...b. |
b2960 | 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 | INT.UNIQUE,..INTINT.DEFAULT.0,.. |
b2980 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY(a,b).).WITHOUT.ROWI |
b29a0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | D;.INSERT.INTO.t1(a,b).VALUES(1, |
b29c0 | 32 29 2c 28 33 2c 34 29 2c 28 31 26 20 2d 31 37 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 | 2),(3,4),(1&.-17.||.777777777777 |
b29e0 | 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f | 7777777,2)ON.CONFLICT(a,b).DO.NO |
b2a00 | 54 48 49 4e 47 3b 0a 81 42 89 00 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | THING;..B......CREATE.TABLE.t1(. |
b2a20 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 | ..a.INT,...b.INT.UNIQUE,..INTINT |
b2a40 | 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | .DEFAULT.0,...PRIMARY.KEY(a,b).) |
b2a60 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
b2a80 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 30 58 41 44 44 41 37 37 37 | ,b).VALUES(1,2),(3,4),(0XADDA777 |
b2aa0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 7777777777777,2)ON.CONFLICT(a,b) |
b2ac0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 88 7f 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..B......CREATE.TABL |
b2ae0 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
b2b00 | 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | INTINT.DEFAULT.0,...PRIMARY.KEY( |
b2b20 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | a,b).).WITHOUT.ROWID;.INSERT.INT |
b2b40 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 30 58 41 | O.t1(a,b).VALUES(1,2),(3,4),(0XA |
b2b60 | 44 41 44 44 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | DADD777777777777777,2)ON.CONFLIC |
b2b80 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 88 7e 04 00 83 09 43 52 45 41 54 | T(a,b).DO.NOTHING;..B.~....CREAT |
b2ba0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
b2bc0 | 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | QUE,..INTINT.DEFAULT.0,...PRIMAR |
b2be0 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
b2c00 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | RT.INTO.t1(a,b).VALUES(1,2),(3,4 |
b2c20 | 29 2c 28 30 58 39 44 44 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 | ),(0X9DD77777777777777777,2)ON.C |
b2c40 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 88 7d 04 00 83 | ONFLICT(a,b).DO.NOTHING;..B.}... |
b2c60 | 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | .CREATE.TABLE.t1(...a.INT,...b.I |
b2c80 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNIQUE,..INTINT.DEFAULT.0,... |
b2ca0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY(a,b).).WITHOUT.ROWID |
b2cc0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ;.INSERT.INTO.t1(a,b).VALUES(1,2 |
b2ce0 | 29 2c 28 33 2c 34 29 2c 28 30 58 37 41 44 44 37 37 37 37 37 2f 37 37 37 37 37 37 37 37 37 37 2c | ),(3,4),(0X7ADD77777/7777777777, |
b2d00 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
b2d20 | 42 88 7c 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | B.|....CREATE.TABLE.t1(...a.INT, |
b2d40 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNIQUE,..INTINT.DEFAULT |
b2d60 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
b2d80 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
b2da0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 30 58 37 41 37 37 37 37 37 37 37 2f 37 37 37 37 37 | ES(1,2),(3,4),(0X7A7777777/77777 |
b2dc0 | 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 77777,2)ON.CONFLICT(a,b).DO.NOTH |
b2de0 | 49 4e 47 3b 0a 81 42 88 7b 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;..B.{....CREATE.TABLE.t1(... |
b2e00 | 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 | a.INT,...b.INT.UNIQUE,..INTINT.D |
b2e20 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b2e40 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b2e60 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 30 58 30 37 37 37 37 37 37 37 37 | ).VALUES(1,2),(3,4),(0X077777777 |
b2e80 | 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 77777777777,2)ON.CONFLICT(a,b).D |
b2ea0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 88 7a 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..B.z....CREATE.TABLE. |
b2ec0 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e | t1(...a.INT,...b.INT.UNIQUE,..IN |
b2ee0 | 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | TINT.DEFAULT.0,...PRIMARY.KEY(a, |
b2f00 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
b2f20 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 30 37 37 37 37 | t1(a,b).VALUES(1,2),(3,4),(07777 |
b2f40 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 77777777777777777,2)ON.CONFLICT( |
b2f60 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c 88 79 04 00 83 1d 43 52 45 41 54 45 20 | a,b).DO.NOTHING;..L.y....CREATE. |
b2f80 | 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 | TABLE.t1(...a.INT,...b.INT.UNIQU |
b2fa0 | 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 | E,..INTINT.DEFAULT.0,...PRIMARY. |
b2fc0 | 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 | KEY(a,b).).WITHOUT.ROWID;.INSERT |
b2fe0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | .INTO.t1(a,b).VALUES(1,2),(3,4), |
b3000 | 28 30 37 37 37 37 37 37 32 30 30 31 2d 30 31 2d 30 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | (07777772001-01-0177777777777777 |
b3020 | 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 7,2)ON.CONFLICT(a,b).DO.NOTHING; |
b3040 | 0a 81 64 88 78 04 00 83 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..d.x...MCREATE.TABLE.t1(...a.IN |
b3060 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 | T,...b.INT.UNIQUE,..INTINT.DEFAU |
b3080 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(a,b).).WITHO |
b30a0 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
b30c0 | 4c 55 45 53 28 28 30 58 30 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 31 2c 32 29 2c 28 33 2c | LUES((0X07777777777777771,2),(3, |
b30e0 | 34 29 2c 28 30 58 30 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 | 4),(0X07777777777777777777,2)ON. |
b3100 | 43 4f 4e 46 4c 49 43 54 28 61 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 62 29 20 44 4f 20 | CONFLICT(a777777777777777,b).DO. |
b3120 | 4e 4f 54 48 49 4e 47 3b 0a 81 42 88 77 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | NOTHING;..B.w....CREATE.TABLE.t1 |
b3140 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 | (...a.INT,...b.INT.UNIQUE,..INTI |
b3160 | 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | NT.DEFAULT.0,...PRIMARY.KEY(a,b) |
b3180 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
b31a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 34 29 2c 28 31 37 37 37 37 37 37 | (a,b).VALUES(.avg(1),4),(1777777 |
b31c0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | 777777777777777,2)ON.CONFLICT(a, |
b31e0 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3e 88 76 04 00 83 01 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..>.v....CREATE.TA |
b3200 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
b3220 | 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ..INTINT.DEFAULT.0,...PRIMARY.KE |
b3240 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b3260 | 4e 54 4f 20 74 31 28 49 4e 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 | NTO.t1(INb).VALUES(1,2),(3,4),(7 |
b3280 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 77777777777777777,2)ON.CONFLICT( |
b32a0 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 46 88 75 04 00 83 11 43 52 45 41 54 45 20 | a,b).DO.NOTHING;..F.u....CREATE. |
b32c0 | 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 | TABLE.t1(...a.INT,...b.INT.UNIQU |
b32e0 | 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 | E,..INTINT.DEFAULT.0,...PRIMARY. |
b3300 | 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 | KEY(a,b).).WITHOUT.ROWID;.INSERT |
b3320 | 20 49 4e 54 4f 20 74 31 28 49 4e 54 4f 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | .INTO.t1(INTOa,b).VALUES(1,2),(3 |
b3340 | 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e | ,4),(1777777777777777777777,2)ON |
b3360 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 88 74 04 | .CONFLICT(a,b).DO.NOTHING;..B.t. |
b3380 | 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ...CREATE.TABLE.t1(...a.INT,...b |
b33a0 | 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a | .INT.UNIQUE,..INTINT.DEFAULT.0,. |
b33c0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ..PRIMARY.KEY(a,b).).WITHOUT.ROW |
b33e0 | 49 44 3b 0a 49 4e 43 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ID;.INCERT.INTO.t1(a,b).VALUES(1 |
b3400 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | ,2),(3,4),(177777777777777777777 |
b3420 | 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 7,2)ON.CONFLICT(a,b).DO.NOTHING; |
b3440 | 0a 81 42 88 73 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..B.s....CREATE.TABLE.t1(...a.IN |
b3460 | 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 | T,...b.INT.UNIQUE,..INTINT.DEFAU |
b3480 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 49 4e 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(INb).).WITHO |
b34a0 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
b34c0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | LUES(1,2),(3,4),(177777777777777 |
b34e0 | 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f | 7777777,2)ON.CONFLICT(a,b).DO.NO |
b3500 | 54 48 49 4e 47 3b 0a 81 42 88 72 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | THING;..B.r....CREATE.TABLE.t1(. |
b3520 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 | ..a.INT,...b.INT.UNIQUE,..INTINT |
b3540 | 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 20 69 6e 74 0a 29 | .DEFAULT.0,...PRIMARY.KEY(.int.) |
b3560 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
b3580 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 | ,b).VALUES(1,2),(3,4),(177777777 |
b35a0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 7777777777777,2)ON.CONFLICT(a,b) |
b35c0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 71 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;....q....CREATE.TABL |
b35e0 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 | E.t1(...a.INT,...b.INT.UNIQUE,.. |
b3600 | 20 63 20 4e 4f 54 20 44 45 46 45 52 52 41 42 4c 45 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.NOT.DEFERRABLE...PRIMARY.KEY( |
b3620 | 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | aa,b).VALUES(1,2),(3,4),(1,2)ON. |
b3640 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3d 88 70 04 00 | CONFLICT(a,b).DO.NOTHING;..=.p.. |
b3660 | 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | ..CREATE.TABLE.t1(...a.INT,...b. |
b3680 | 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e d7 f7 d7 d7 d7 d7 d7 d7 d7 d7 d7 d7 d7 d7 | INT.UNIQUE,...c.IN.............. |
b36a0 | d7 d7 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | ..T.DEFAULT.0,...PRIMARY.KEY(a,b |
b36c0 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 73 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERs.INTO.t |
b36e0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e | 1(a,b).VALUES(1,2),(3,4),(1,2)ON |
b3700 | 20 43 00 00 80 00 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 6f 04 | .C....ICT(a,b).DO.NOTHING;....o. |
b3720 | 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ...CREATE.TABLE.t1(...a.INT,...b |
b3740 | 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 52 45 46 45 52 45 4e 43 45 53 0a | .INT.UNIQUE,...c.INT.REFERENCES. |
b3760 | 20 20 50 45 59 28 61 ac 62 29 52 45 46 45 52 45 4e 43 45 53 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | ..PEY(a.b)REFERENCES.ROWID;.INSE |
b3780 | 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | RT1(a,b1,2)ON.CONFLICT(a,b).DO.N |
b37a0 | 4f 54 48 49 4e 47 3b 0a 81 09 88 6e 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | OTHING;....n....CREATE.TABLE.t1( |
b37c0 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e | ...a.INT,...b.INT.UNIQUE,...c.IN |
b37e0 | 54 20 52 45 46 45 52 45 4e 43 45 53 0a 20 20 50 45 59 28 61 ac 62 29 52 45 46 45 52 45 4e 43 45 | T.REFERENCES...PEY(a.b)REFERENCE |
b3800 | 53 20 52 4f 57 49 29 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | S.ROWI);.INSERT1(a,b1,2)ON.CONFL |
b3820 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 6d 04 00 82 17 43 52 45 | ICT(a,b).DO.NOTHING;....m....CRE |
b3840 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b3860 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 52 45 46 45 52 45 4e 43 45 53 0a 20 20 50 45 59 28 | NIQUE,...c.INT.REFERENCES...PEY( |
b3880 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c | a,b).).WITHOUT.ROWID;.INSERT1(a, |
b38a0 | 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | b1,2)ON.CONFLICT(a,b).DO.NOTHING |
b38c0 | 3b 0a 81 09 88 6c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;....l....CREATE.TABLE.t1(...a.I |
b38e0 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 52 45 46 45 | NT,...b.INT.UNIQUE,...c.INT.REFE |
b3900 | 52 45 4e 43 45 53 0a 20 20 50 45 59 28 61 2c 20 22 61 22 2c 22 62 22 44 45 53 43 20 52 4f 57 49 | RENCES...PEY(a,."a","b"DESC.ROWI |
b3920 | 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | D;.INSERT1(a,b1,2)ON.CONFLICT(a, |
b3940 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0b 88 6b 04 00 82 1b 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;....k....CREATE.TA |
b3960 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
b3980 | 0a 20 20 63 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 | ...c.INT.PRIMARY.KEY.COLLATE.noc |
b39a0 | 61 73 65 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 62 29 20 56 33 2c 34 29 2c 28 31 2c 32 | ase.COLLATE.nocase,b).V3,4),(1,2 |
b39c0 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0a | )ON.CONFLICT(a,b).DO.NOTHING;... |
b39e0 | 88 6a 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .j....CREATE.TABLE.t1(...a.INT,. |
b3a00 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 50 52 49 4d 41 52 59 20 | ..b.INT.UNIQUE,...c.INT.PRIMARY. |
b3a20 | 4b 45 59 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 20 50 52 49 4d 41 52 59 20 4c 55 45 53 28 31 | KEY.AUTOINCREMENT.PRIMARY.LUES(1 |
b3a40 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | ,2),(3,4),(1,2)ON.CONFLICT(a,b). |
b3a60 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 69 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;....i....CREATE.TABLE |
b3a80 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 | .t1(...a.INT,...b.INT.UNIQUE,... |
b3aa0 | 63 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 20 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 | c.INT.PRIMARY.KEY..COLLATE.nocas |
b3ac0 | 65 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | e,b).VALUES(1,2),(3,4),(1,2)ON.C |
b3ae0 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 68 04 00 82 | ONFLICT(a,b).DO.NOTHING;....h... |
b3b00 | 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | .CREATE.TABLE.t1(...a.INT,...b.I |
b3b20 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 45 52 52 41 52 4c 45 0a 20 20 | NT.UNIQUE,...c.INT.DEFERRARLE... |
b3b40 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | PRIMARY.KEY(aa,b).VALUES(1,2),(3 |
b3b60 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT(a,b).DO.NOT |
b3b80 | 48 49 4e 47 3b 0a 81 09 88 67 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;....g....CREATE.TABLE.t1(.. |
b3ba0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,...c.INT. |
b3bc0 | 44 45 46 45 52 52 41 42 44 45 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 61 2c 62 29 20 56 | DEFERRABDE...PRIMARY.KEY(aa,b).V |
b3be0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | ALUES(1,2),(3,4),(1,2)ON.CONFLIC |
b3c00 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 66 04 00 82 5f 43 52 45 41 54 | T(a,b).DO.NOTHING;..-.f..._CREAT |
b3c20 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
b3c40 | 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | QUE,...c.INT.DEFAUc.INT.DEFAULT. |
b3c60 | 30 2c 0a 20 20 50 52 49 4b 41 52 59 20 4b 49 54 48 4f 55 54 20 52 4f 57 49 3a 3a 3a 3a 3a 3a 3a | 0,...PRIKARY.KITHOUT.ROWI::::::: |
b3c80 | 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 3a 24 3a 3a 3a 3a 31 2c 32 29 ff 28 73 2c 34 | ::::::::::::::::::$::::1,2).(s,4 |
b3ca0 | 29 2c 28 31 2c 32 29 4f ff 80 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 | ),(1,2)O..CONFLICT(a,b).DO.NOTHI |
b3cc0 | 4e 47 3b 0a 81 2d 88 65 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 | NG;..-.e..._CREATE.TABLE.t1(...a |
b3ce0 | 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 | .INT,...b.INT.UNIQUE,...c.INT.DE |
b3d00 | 46 41 55 4c 54 2e 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(a,b).).WI |
b3d20 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | THOUT.ROWID;.INSERT.INTO.t1(a,b) |
b3d40 | 20 56 41 4c 55 45 53 2e 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | .VALUES.1,2),(3,4),(1,2)ON.CONFL |
b3d60 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 88 64 04 00 82 17 43 52 45 | ICT(a,b).DO.NOTHING;....d....CRE |
b3d80 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b3da0 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 2d 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT-0,...PRIM |
b3dc0 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 59 54 48 4f 55 54 20 52 4f 2c 28 33 2c 34 29 2c | ARY.KEY(a,b).).WYTHOUT.RO,(3,4), |
b3de0 | 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | (1,2)ON.CONFLICT(a,b).DO.NOTHING |
b3e00 | 3b 0a 81 09 88 63 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;....c....CREATE.TABLE.t1(...a.I |
b3e20 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | NT,...b.INT.UNIQUE,...c.INT.DEFA |
b3e40 | 55 4c 54 2b 32 20 64 61 79 73 0a 49 4e 53 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ULT+2.days.INSINTO.t1(a,b).VALUE |
b3e60 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | S(1,2),(3,4),(1,2)ON.CONFLICT(a, |
b3e80 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 88 62 04 00 82 5f 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..-.b..._CREATE.TA |
b3ea0 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNIQUE, |
b3ec0 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 2b 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT+0,...PRIMARY.KE |
b3ee0 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b3f00 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
b3f20 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b3f40 | 81 3c 88 61 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | .<.a...}CREATE.TABLE.t1(...a.INT |
b3f60 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ,...b.INT.UNIQUE,...c.INT.DEFAUL |
b3f80 | 54 20 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 e3 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | T................0,...PRIMARY.KE |
b3fa0 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b3fc0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
b3fe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 49 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(aIb).DO.NOTHING;. |
b4000 | 0d 00 00 00 28 00 e7 00 1f 3a 1e 74 1d ae 1c e8 1c 22 1b 52 1a 8c 19 c6 18 f6 18 4c 17 86 16 c0 | ....(....:.t.....".R.......L.... |
b4020 | 16 09 15 58 14 93 13 dc 13 25 12 6e 11 a6 10 de 10 1d 0f 55 0e 91 0d d3 0d 06 0c 2f 0b 58 0a 8b | ...X.....%.n.......U......./.X.. |
b4040 | 09 b4 08 dd 08 10 07 39 06 6c 05 9f 04 d5 04 08 03 3e 02 6a 01 9e 00 e7 00 00 00 00 00 00 00 00 | .......9.l.......>.j............ |
b4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b4080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b40a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b40c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
b40e0 | 00 00 00 00 00 00 00 81 33 89 34 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | ........3.4...kCREATE.TABLE.t1(. |
b4100 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ..a.INT,...b.INT,...c.INT.DEFAUL |
b4120 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b4140 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;.INSERT.INTO.t1(a,b).VAL |
b4160 | 55 45 53 28 31 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 31 29 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c | UES(1,..zeroblob(1))....ON.CONFL |
b4180 | 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 0a 81 48 | ICT(a,b).DO.UPDATE.SET.c=c+1;..H |
b41a0 | 89 33 04 00 83 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .3....CREATE.TABLE.t1(...a.INT,. |
b41c0 | 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 | ..b.INT.UNYQUE,..INTINT.DEFAULT. |
b41e0 | 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | 0,...PRIMARY.KEY(a,b).).WITHOUT. |
b4200 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
b4220 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | S(1,2),(3,4),(177777777777777777 |
b4240 | 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 | 7777,2)ON.CONFLICT(a,b).DO.NOTHI |
b4260 | 4e 47 3b 56 41 43 55 55 4d 0a 81 50 89 32 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | NG;VACUUM..P.2...%CREATE.TABLE.t |
b4280 | 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 | 1(...a.INT,...b.INT.UNYQUE,..INT |
b42a0 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | INT.DEFAULT.0,...PRIMARY.KEY(a,b |
b42c0 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
b42e0 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 20 7c 7c 20 37 | 1(a,b).VALUES(1,2),(3,4),(1.||.7 |
b4300 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 32 30 30 31 2d 30 31 2d 30 31 37 37 2c 32 | 7777777777777777772001-01-0177,2 |
b4320 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 46 | )ON.CONFLICT(a,b).DO.NOTHING;..F |
b4340 | 89 31 04 00 83 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .1....CREATE.TABLE.t1(...a.INT,. |
b4360 | 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 | ..b.INT.UNYQUE,..INTINT.DEFAULT. |
b4380 | 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | 0,...PRIMARY.KEY(a,b).).WITHOUT. |
b43a0 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
b43c0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 20 7c 20 2d 31 37 37 37 37 37 37 37 37 37 37 37 37 | S(1,2),(3,4),(1.|.-1777777777777 |
b43e0 | 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | 77777777,2)ON.CONFLICT(a,b).DO.N |
b4400 | 4f 54 48 49 4e 47 3b 0a 81 49 89 30 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | OTHING;..I.0....CREATE.TABLE.t1( |
b4420 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e | ...a.INT,...b.INT.UNYQUE,..INTIN |
b4440 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b4460 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b4480 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 20 2d 31 20 7c 7c 20 | a,b).VALUES(1,2),(3,4),(1.-1.||. |
b44a0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c | 777777777777777777777,2)ON.CONFL |
b44c0 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 46 89 2f 04 00 83 11 43 52 45 | ICT(a,b).DO.NOTHING;..F./....CRE |
b44e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b4500 | 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NYQUE,..INTINT.DEFAULT.0,...PRIM |
b4520 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b4540 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
b4560 | 2c 34 29 2c 28 31 20 20 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c | ,4),(1..|.777777777777777777777, |
b4580 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 2)ON.CONFLICT(a,b).DO.NOTHING;.. |
b45a0 | 49 89 2e 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | I......CREATE.TABLE.t1(...a.INT, |
b45c0 | 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 | ...b.INT.UNYQUE,..INTINT.DEFAULT |
b45e0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
b4600 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
b4620 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 2d 31 31 20 7c 7e 20 37 37 37 37 37 37 37 37 37 | ES(1,2),(3,4),(.-11.|~.777777777 |
b4640 | 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | 777777777777,2)ON.CONFLICT(a,b). |
b4660 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 49 89 2d 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..I.-....CREATE.TABLE |
b4680 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 | .t1(...a.INT,...b.INT.UNYQUE,..I |
b46a0 | 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | NTINT.DEFAULT.0,...PRIMARY.KEY(a |
b46c0 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
b46e0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 2d 31 31 | .t1(a,b).VALUES(1,2),(3,4),(.-11 |
b4700 | 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 45 37 37 2c 32 29 4f 4e 20 43 | .||.777777777777777777E77,2)ON.C |
b4720 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 89 2c 04 00 83 | ONFLICT(a,b).DO.NOTHING;..S.,... |
b4740 | 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 | +CREATE.TABLE.t1(...a.INT,...b.I |
b4760 | 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNYQUE,..INTINT.DEFAULT.0,... |
b4780 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY(a,b).).WITHOUT.ROWID |
b47a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ;.INSERT.INTO.t1(a,b).VALUES(1,2 |
b47c0 | 29 2c 28 33 2c 34 29 2c 28 20 2d 31 31 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | ),(3,4),(.-11.||.777777777777777 |
b47e0 | 37 37 37 37 37 37 32 30 30 31 2d 30 31 2d 30 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 7777772001-01-01,2)ON.CONFLICT(a |
b4800 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 49 89 2b 04 00 83 17 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;..I.+....CREATE.T |
b4820 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 | ABLE.t1(...a.INT,...b.INT.UNYQUE |
b4840 | 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b | ,..INTINT.DEFAULT.0,...PRIMARY.K |
b4860 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
b4880 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
b48a0 | 20 2d 31 31 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 | .-11.||.777777777777777777777,2) |
b48c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 89 | ON.CONFLICT(a,b).DO.NOTHING;..S. |
b48e0 | 2a 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | *...+CREATE.TABLE.t1(...a.INT,.. |
b4900 | 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 | .b.INT.UNYQUE,..INTINT.DEFAULT.0 |
b4920 | 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | ,...PRIMARY.KEY(a,b).).WITHOUT.R |
b4940 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
b4960 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 2d 31 31 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 | (1,2),(3,4),(.-11.||.77777777777 |
b4980 | 37 37 37 37 37 37 37 37 37 32 30 30 31 2d 30 31 2d 30 31 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | 7777777772001-01-017,2)ON.CONFLI |
b49a0 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 89 29 04 00 83 2b 43 52 45 41 | CT(a,b).DO.NOTHING;..S.)...+CREA |
b49c0 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
b49e0 | 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | YQUE,..INTINT.DEFAULT.0,...PRIMA |
b4a00 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
b4a20 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b4a40 | 34 29 2c 28 20 2d 31 31 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 32 | 4),(.-11.||.77777777777777777772 |
b4a60 | 30 30 31 2d 30 31 2d 30 31 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 001-01-0177,2)ON.CONFLICT(a,b).D |
b4a80 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 49 89 28 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..I.(....CREATE.TABLE. |
b4aa0 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e | t1(...a.INT,...b.INT.UNYQUE,..IN |
b4ac0 | 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | TINT.DEFAULT.0,...PRIMARY.KEY(a, |
b4ae0 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
b4b00 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 2d 31 31 20 | t1(a,b).VALUES(1,2),(3,4),(.-11. |
b4b20 | 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2e 37 2c 32 29 4f 4e 20 43 4f | ||.7777777777777777777.7,2)ON.CO |
b4b40 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 89 27 04 00 83 2b | NFLICT(a,b).DO.NOTHING;..S.'...+ |
b4b60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREATE.TABLE.t1(...a.INT,...b.IN |
b4b80 | 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 | T.UNYQUE,..INTINT.DEFAULT.0,...P |
b4ba0 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
b4bc0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
b4be0 | 2c 28 33 2c 34 29 2c 28 20 2d 31 31 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | ,(3,4),(.-11.||.7777777777777777 |
b4c00 | 37 32 30 30 31 2d 30 31 2d 30 31 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | 72001-01-017777,2)ON.CONFLICT(a, |
b4c20 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 89 26 04 00 83 2b 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..S.&...+CREATE.TA |
b4c40 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c | BLE.t1(...a.INT,...b.INT.UNYQUE, |
b4c60 | 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ..INTINT.DEFAULT.0,...PRIMARY.KE |
b4c80 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b4ca0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 | NTO.t1(a,b).VALUES(1,2),(3,4),(. |
b4cc0 | 2d 31 31 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 32 30 30 31 2d 30 31 2d 30 | -11.||.77777777777777772001-01-0 |
b4ce0 | 31 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | 177777,2)ON.CONFLICT(a,b).DO.NOT |
b4d00 | 48 49 4e 47 3b 0a 81 49 89 25 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;..I.%....CREATE.TABLE.t1(.. |
b4d20 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 59 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 | .a.INT,...b.INT.UNYQUE,..INTINT. |
b4d40 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
b4d60 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
b4d80 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 20 2d 30 31 20 7c 7c 20 37 37 | b).VALUES(1,2),(3,4),(.-01.||.77 |
b4da0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 | 7777777777777777777,2)ON.CONFLIC |
b4dc0 | 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3a 89 24 04 00 82 79 43 52 45 41 54 | T(a,b).DO.NOTHING;..:.$...yCREAT |
b4de0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
b4e00 | 51 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | QWITHOUT.ROWIDUE,...c.INT.DEFAUL |
b4e20 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b4e40 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;.INSERT.INTO.t1(a,b).VAL |
b4e60 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | UES(1,2),(3,4),(1,2)ON.CONFLICT( |
b4e80 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 40 89 23 04 00 83 05 43 52 45 41 54 45 20 | a,b).DO.NOTHING;..@.#....CREATE. |
b4ea0 | 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 57 | TABLE.t1(...a.INT,...b.INT.UNIQW |
b4ec0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | ITHOUT.ROWIDUE,...c.INT.DEFAULT. |
b4ee0 | 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | 0,...PRIMARY.KEY(a,b).).WITHOUT. |
b4f00 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
b4f20 | 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | S(.sum(1),4),(1,2)ON.CONFLICT(a, |
b4f40 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 44 89 22 04 00 83 0d 43 52 45 | b).DO.NOTHING;VACUUM..D."....CRE |
b4f60 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a.INT,...b.INT.U |
b4f80 | 4e 49 51 55 45 2c 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 0a 43 55 52 52 45 4e 54 5f | NIQUE,CURRENT_TIMESTAMP.CURRENT_ |
b4fa0 | 54 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | TIMESTAMP,...PRIMARY.KEY(a,b).). |
b4fc0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
b4fe0 | 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e | b).VALUES(.sum(1),4),(1,2)ON.CON |
b5000 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 3d 89 | FLICT(a,b).DO.NOTHING;VACUUM..=. |
b5020 | 21 04 00 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | !....CREATE.TABLE.t1(...a.INT,.. |
b5040 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 43 4f 4e 53 54 52 41 49 4e 54 0a 43 55 52 52 45 4e 54 | .b.INT.UNIQUE,CONSTRAINT.CURRENT |
b5060 | 5f 54 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | _TIMESTAMP,...PRIMARY.KEY(a,b).) |
b5080 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
b50a0 | 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f | ,b).VALUES(.sum(1),4),(1,2)ON.CO |
b50c0 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 44 | NFLICT(a,b).DO.NOTHING;VACUUM..D |
b50e0 | 89 20 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | ......CREATE.TABLE.t1(...a.INT,. |
b5100 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d | ..b.INT.UNIQUE,.CURRENT_TIMESTAM |
b5120 | 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 | P,...PRIMARY.KEY(a,b).).WITHOUT. |
b5140 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 43 55 52 52 45 4e 54 5f 54 49 | ROWID;.INSERT.INTO.t1(CURRENT_TI |
b5160 | 4d 45 53 54 41 4d 50 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 | MESTAMPa,b).VALUES(.sum(1),4),(1 |
b5180 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 | ,2)ON.CONFLICT(a,b).DO.NOTHING;V |
b51a0 | 41 43 55 55 4d 0a 81 44 89 1f 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | ACUUM..D......CREATE.TABLE.t1(.. |
b51c0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 43 55 52 52 45 4e 54 5f | .a.INT,...b.INT.UNIQUE,.CURRENT_ |
b51e0 | 54 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 43 55 52 52 45 4e 54 | TIMESTAMP,...PRIMARY.KEY(CURRENT |
b5200 | 5f 54 49 4d 45 53 54 41 4d 50 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | _TIMESTAMPa,b).).WITHOUT.ROWID;. |
b5220 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 | INSERT.INTO.t1(a,b).VALUES(.sum( |
b5240 | 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | 1),4),(1,2)ON.CONFLICT(a,b).DO.N |
b5260 | 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 33 89 1e 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 | OTHING;VACUUM..3.....kCREATE.TAB |
b5280 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.INT.UNIQUE,. |
b52a0 | 43 55 52 52 45 4e 54 5f 44 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CURRENT_DIMESTAMP,...PRIMARY.KEY |
b52c0 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b52e0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c | TO.t1(a,b).VALUES(.sum(1),4),(1, |
b5300 | 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 | 2)ON.CONFLICT(a,b).DO.NOTHING;VA |
b5320 | 43 55 55 4d 0a 81 33 89 1d 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | CUUM..3.....kCREATE.TABLE.t1(... |
b5340 | 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 43 55 52 52 45 4e 54 4f 54 | a.INT,...b.INT.UNIQUE,.CURRENTOT |
b5360 | 49 4d 45 53 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | IMESTAMP,...PRIMARY.KEY(a,b).).W |
b5380 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b53a0 | 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 | ).VALUES(.sum(1),4),(1,2)ON.CONF |
b53c0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 33 89 1c | LICT(a,b).DO.NOTHING;VACUUM..3.. |
b53e0 | 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ...kCREATE.TABLE.t1(...a.INT,... |
b5400 | 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 43 55 52 52 45 4e 44 5f 54 49 4d 45 53 54 41 4d 50 2c | b.INT.UNIQUE,.CURREND_TIMESTAMP, |
b5420 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
b5440 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
b5460 | 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | .sum(1),4),(1,2)ON.CONFLICT(a,b) |
b5480 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 41 89 1b 04 00 83 07 43 52 45 41 54 | .DO.NOTHING;VACUUM..A......CREAT |
b54a0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | E.TABLE.t1(...a.INT,...b.INT.UNI |
b54c0 | 51 55 45 2c 0a 43 55 52 52 45 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 4e 54 5f 54 49 4d 45 53 | QUE,.CURRECOLLATE.nocaseNT_TIMES |
b54e0 | 54 41 4d 50 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | TAMP,...PRIMARY.KEY(a,b).).WITHO |
b5500 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
b5520 | 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | LUES(.sum(1),4),(1,2)ON.CONFLICT |
b5540 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 2d 89 1a 04 00 82 5f | (a,b).DO.NOTHING;VACUUM..-....._ |
b5560 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREATE.TABLE.t1(...a.INT,...b.IN |
b5580 | 54 20 55 4e 49 51 55 45 2c 0a 20 df 9c df b6 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 | T.UNIQUE,......NT.DEFAULT.0,...P |
b55a0 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
b55c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
b55e0 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ,(3,4),(1,2)ON.CONFLICT(a,b).DO. |
b5600 | 4e 4f 54 48 49 4e 47 3b 0a 81 33 89 19 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | NOTHING;..3.....kCREATE.TABLE.t1 |
b5620 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 df 9c df b6 | (...a.INT,...b.INT.UNIQUE,...... |
b5640 | 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | NT.DEFAULT.0,...PRIMARY.KEY(a,b) |
b5660 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
b5680 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | (a,b).VALUES(.sum(1),4),(1,2)ON. |
b56a0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a | CONFLICT(a,b).DO.NOTHING;VACUUM. |
b56c0 | 81 42 89 18 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | .B......CREATE.TABLE.t1(...a.INT |
b56e0 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c | ,...b.INT.UNIQUE,..INTINT.DEFAUL |
b5700 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b5720 | 54 20 52 4f 57 49 44 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;REPLACE.INTO.t1(a,b).VAL |
b5740 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | UES(1,2),(3,4),(1777777777777777 |
b5760 | 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | 777777,2)ON.CONFLICT(a,b).DO.NOT |
b5780 | 48 49 4e 47 3b 0a 81 42 89 17 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;..B......CREATE.TABLE.t1(.. |
b57a0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,..INTINT. |
b57c0 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
b57e0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
b5800 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 3f 2c 34 29 2c 28 30 58 37 37 37 37 37 37 37 37 | b).VALUES(1,2),(?,4),(0X77777777 |
b5820 | 37 2f 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | 7/7777777777,2)ON.CONFLICT(a,b). |
b5840 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 26 89 16 04 00 82 51 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..&.....QCREATE.TABLE |
b5860 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 | .t1(...a.INT,...b.INT.UNIQUE,..I |
b5880 | 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | NTINT.DEFAULT.0,...PRIMARY.KEY(a |
b58a0 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
b58c0 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 3f 37 37 37 | .t1(a,b).VALUES(1,2),(3,4),(?777 |
b58e0 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 3b 0a 81 4c 89 15 04 00 83 1d 43 52 | 777777777777777777,2;..L......CR |
b5900 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 | EATE.TABLE.t1(...a.INT,...b.INT. |
b5920 | 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 | UNIQUE,..INTINT.DEFAULT.0,...PRI |
b5940 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
b5960 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b5980 | 33 2c 34 29 2c 28 32 30 30 31 2d 30 31 2d 30 31 31 37 37 45 37 37 20 7c 7c 20 37 37 37 37 37 37 | 3,4),(2001-01-01177E77.||.777777 |
b59a0 | 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 | 777777,2)ON.CONFLICT(a,b).DO.NOT |
b59c0 | 48 49 4e 47 3b 0a 81 42 89 14 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | HING;..B......CREATE.TABLE.t1(.. |
b59e0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 | .a.INT,...b.INT.UNIQUE,..INTINT. |
b5a00 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT.0,...PRIMARY.KEY(a,b).). |
b5a20 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
b5a40 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 45 37 37 26 37 37 37 37 37 | b).VALUES(1,2),(3,4),(1E77&77777 |
b5a60 | 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | 777777777777,2)ON.CONFLICT(a,b). |
b5a80 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 13 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..B......CREATE.TABLE |
b5aa0 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 | .t1(...a.INT,...b.INT.UNIQUE,..I |
b5ac0 | 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | NTINT.DEFAULT.0,...PRIMARY.KEY(a |
b5ae0 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
b5b00 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 45 | .t1(a,b).VALUES(1,2),(3,4),(177E |
b5b20 | 37 37 20 7c 7c 20 37 37 37 37 37 37 37 45 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 77.||.7777777E7777,2)ON.CONFLICT |
b5b40 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c 89 12 04 00 83 1d 43 52 45 41 54 45 | (a,b).DO.NOTHING;..L......CREATE |
b5b60 | 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 | .TABLE.t1(...a.INT,...b.INT.UNIQ |
b5b80 | 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 | UE,..INTINT.DEFAULT.0,...PRIMARY |
b5ba0 | 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 | .KEY(a,b).).WITHOUT.ROWID;.INSER |
b5bc0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | T.INTO.t1(a,b).VALUES(1,2),(3,4) |
b5be0 | 2c 28 31 37 37 45 37 37 20 7c 7c 20 37 37 37 37 37 37 37 37 37 37 37 32 30 30 31 2d 30 31 2d 30 | ,(177E77.||.777777777772001-01-0 |
b5c00 | 31 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 17,2)ON.CONFLICT(a,b).DO.NOTHING |
b5c20 | 3b 0a 81 42 89 11 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;..B......CREATE.TABLE.t1(...a.I |
b5c40 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 | NT,...b.INT.UNIQUE,..INTINT.DEFA |
b5c60 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b).).WITH |
b5c80 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
b5ca0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 45 37 37 20 7c 7c 20 37 2f 37 37 | ALUES(1,2),(3,4),(177E77.||.7/77 |
b5cc0 | 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | 77777777,2)ON.CONFLICT(a,b).DO.N |
b5ce0 | 4f 54 48 49 4e 47 3b 0a 81 42 89 10 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | OTHING;..B......CREATE.TABLE.t1( |
b5d00 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e | ...a.INT,...b.INT.UNIQUE,..INTIN |
b5d20 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b5d40 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b5d60 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 45 2d 37 37 37 | a,b).VALUES(1,2),(3,4),(177E-777 |
b5d80 | 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | 77777777777777,2)ON.CONFLICT(a,b |
b5da0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 0f 04 00 83 09 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..B......CREATE.TAB |
b5dc0 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,...b.INT.UNIQUE,. |
b5de0 | 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | .INTINT.DEFAULT.0,...PRIMARY.KEY |
b5e00 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b5e20 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 | TO.t1(a,b).VALUES(1,2),(3,4),(17 |
b5e40 | 37 37 37 37 37 45 37 37 37 37 37 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | 77777E77777777777777,2)ON.CONFLI |
b5e60 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 0e 04 00 83 09 43 52 45 41 | CT(a,b).DO.NOTHING;..B......CREA |
b5e80 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e | TE.TABLE.t1(...a.INT,...b.INT.UN |
b5ea0 | 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 | IQUE,..INTINT.DEFAULT.0,...PRIMA |
b5ec0 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
b5ee0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b5f00 | 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 45 37 37 37 37 37 37 37 37 37 2c 32 29 4f 4e 20 | 4),(177777777777E777777777,2)ON. |
b5f20 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 0d 04 00 | CONFLICT(a,b).DO.NOTHING;..B.... |
b5f40 | 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | ..CREATE.TABLE.t1(...a.INT,...b. |
b5f60 | 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 | INT.UNIQUE,..INTINT.DEFAULT.0,.. |
b5f80 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY(a,b).).WITHOUT.ROWI |
b5fa0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | D;.INSERT.INTO.t1(a,b).VALUES(1, |
b5fc0 | 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 45 37 37 37 37 37 37 37 37 | 2),(3,4),(1777777777777E77777777 |
b5fe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b6000 | 0d 00 00 00 2a 00 79 00 1f 2c 1e 6c 1d a2 1c d8 1c 13 1b 4e 1a 89 19 ba 18 eb 18 1c 17 55 16 9e | ....*.y..,.l.......N.........U.. |
b6020 | 15 dd 15 1f 14 5d 13 a6 12 ef 12 27 11 69 10 ab 0f f4 0f 3d 0e 83 0d c6 0d 07 0c 4d 0b 90 0a d3 | .....].....'.i.....=.......M.... |
b6040 | 0a 16 09 4d 08 ba 08 05 07 54 06 a0 05 e5 05 31 04 72 03 ac 02 dc 02 17 01 44 00 79 00 00 00 00 | ...M.....T.....1.r.......D.y.... |
b6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 47 89 5e 04 00 83 | ..........................G.^... |
b6080 | 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 | .CREATE.TABLE.t1(...a.INT,...b.v |
b60a0 | 61 72 63 68 61 72 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 72 61 6e | archar(1)COLLATE.nocase,...c.ran |
b60c0 | 64 6f 6d 62 6c 6f 62 28 31 29 55 4e 49 51 55 45 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | domblob(1)UNIQUE,...PRIMARY.KEY( |
b60e0 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | a,b).).WITHOUT.ROWID;.INSERT.INT |
b6100 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 | O.t1(a,b).VALUES(1,2),(3,4),(1,2 |
b6120 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 | )ON.CONFLICT(a,b).DO.NOTHING;VAC |
b6140 | 55 55 4d 0a 81 4f 89 5d 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 | UUM..O.]...#CREATE.TABLE.t1(...a |
b6160 | 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 | .INT,...b.varchar(1)COLLATE.noca |
b6180 | 73 65 2c 0a 20 20 63 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 | se,...c.randomblob(1)COLLATE.noc |
b61a0 | 61 73 65 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | ase,...PRIMARY.KEY(a,b).).WITHOU |
b61c0 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;.INSERT.INTO.t1(a,b).VAL |
b61e0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | UES(1,2),(3,4),(1,2)ON.CONFLICT( |
b6200 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 41 89 5c 04 00 83 07 43 | a,b).DO.NOTHING;VACUUM..A.\....C |
b6220 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 | REATE.TABLE.t1(...a.INT,...b.var |
b6240 | 63 68 61 72 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 49 4e 54 20 44 | char(1)COLLATE.nocase,...c.INT.D |
b6260 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b6280 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b62a0 | 29 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 | ).VALUES(9,2),(3,4),(1,2)ON.CONF |
b62c0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 4c 89 5b | LICT(a,b).DO.NOTHING;VACUUM..L.[ |
b62e0 | 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a.INT,... |
b6300 | 62 20 76 61 72 63 68 61 72 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 | b.varchar(1)COLLATE.nocase,...c. |
b6320 | 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | INT.DEFAULT.0,...PRIMARY.KEY(a,b |
b6340 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
b6360 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 32 30 30 31 2d 30 31 2d 30 31 29 2c 28 31 2c | 1(a,b).VALUES(1,22001-01-01),(1, |
b6380 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
b63a0 | 49 4e 47 3b 52 45 49 4e 44 45 58 0a 81 42 89 5a 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 | ING;REINDEX..B.Z....CREATE.TABLE |
b63c0 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 31 29 43 4f 4c 4c | .t1(...a.INT,...b.varchar(1)COLL |
b63e0 | 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 | ATE.nocase,...c.INT.DEFAULT.0,.. |
b6400 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY(a,b).).WITHOUT.ROWI |
b6420 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | D;.INSERT.INTO.t1(a,b).VALUES(1, |
b6440 | 32 29 2c 28 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 2),(1,4),(1,2)ON.CONFLICT(a,b).D |
b6460 | 4f 20 4e 4f 54 48 49 4e 47 3b 52 45 49 4e 44 45 58 0a 81 3b 89 59 04 00 82 7b 43 52 45 41 54 45 | O.NOTHING;REINDEX..;.Y...{CREATE |
b6480 | 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 | .TABLE.t1(...a.INT,...b.varchar( |
b64a0 | 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | 1)COLLATE.nocase,...c.INT.DEFAUL |
b64c0 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b64e0 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;.INSERT.INTO.t1(a,b).VAL |
b6500 | 55 45 53 28 31 2c 32 29 2c 28 31 2c 32 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | UES(1,2),(1,2),(1,2)ON.CONFLICT( |
b6520 | 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 89 58 04 00 82 65 43 52 45 41 54 45 20 | a,b).DO.NOTHING;..0.X...eCREATE. |
b6540 | 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 31 | TABLE.t1(...a.INT,...b.varchar(1 |
b6560 | 29 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 4e 44 30 2c 0a 20 20 50 52 49 4d 41 | ),...c.INT.DEFAULT.END0,...PRIMA |
b6580 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
b65a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b65c0 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
b65e0 | 49 4e 47 3b 0a 81 37 89 57 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;..7.W...sCREATE.TABLE.t1(... |
b6600 | 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 31 29 2c 0a 20 20 63 20 49 4e 54 20 44 | a.INT,...b.varchar(1),...c.INT.D |
b6620 | 45 46 41 55 4c 54 20 45 36 44 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | EFAULT.E6D0,...PRIMARY.KEY(a,b). |
b6640 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b6660 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | a,b).VALUES(1,2),(3,4),(1,2)ON.C |
b6680 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 52 45 49 4e 44 45 58 0a | ONFLICT(a,b).DO.NOTHING;REINDEX. |
b66a0 | 81 30 89 56 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | .0.V...eCREATE.TABLE.t1(...a.INT |
b66c0 | 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 31 29 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ,...b.varchar(1),...c.INT.DEFAUL |
b66e0 | 54 20 45 36 44 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 | T.E6D0,...PRIMARY.KEY(a,b).).WIT |
b6700 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | HOUT.ROWID;.INSERT.INTO.t1(a,b). |
b6720 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | VALUES(1,2),(3,4),(1,2)ON.CONFLI |
b6740 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2d 89 55 04 00 82 5f 43 52 45 41 | CT(a,b).DO.NOTHING;..-.U..._CREA |
b6760 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 | TE.TABLE.t1(...a.INT,...b.varcha |
b6780 | 72 28 31 29 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 2c 0a 20 20 50 52 49 4d 41 | r(1),...c.INT.DEFAULT.E,...PRIMA |
b67a0 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
b67c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
b67e0 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
b6800 | 49 4e 47 3b 0a 81 31 89 54 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 | ING;..1.T...gCREATE.TABLE.t1(... |
b6820 | 61 20 49 4e 54 2c 0a 20 20 62 20 76 61 72 63 68 61 72 28 31 29 2c 0a 20 20 63 20 49 4e 54 20 44 | a.INT,...b.varchar(1),...c.INT.D |
b6840 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b6860 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b6880 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 31 45 34 34 29 2c 28 31 2c 32 29 4f 4e 20 | ).VALUES(1,2),(3,.1E44),(1,2)ON. |
b68a0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0f 89 53 04 00 | CONFLICT(a,b).DO.NOTHING;....S.. |
b68c0 | 82 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | .#CREATE.TABLE.t1(...a.INT,...b. |
b68e0 | 76 61 72 63 68 61 72 28 31 29 2c 0a 20 20 3a 3a 3a 3a 3a 3a 3a 45 46 41 55 4c 54 20 30 2c 0a 20 | varchar(1),...:::::::EFAULT.0,.. |
b6900 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 28 | .PRIMARY.KEY(a,b).).WITHOUT.ROW( |
b6920 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | 1,2),(3,4),(1,2)ON.CONFLICT(a,b) |
b6940 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 45 89 52 04 00 83 0f 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..E.R....CREATE.TABL |
b6960 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 45 41 43 48 61 72 63 68 61 72 28 31 | E.t1(...a.INT,...b.vEACHarchar(1 |
b6980 | 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | )COLLATE.nocase,...c.INT.DEFAULT |
b69a0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
b69c0 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
b69e0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ES(1,2),(3,4),(1,2)ON.CONFLICT(a |
b6a00 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 39 89 51 04 00 82 77 43 52 | ,b).DO.NOTHING;VACUUM..9.Q...wCR |
b6a20 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c | EATE.TABLE.t1(...a.INT,...b.INT, |
b6a40 | 0a 20 20 63 20 49 4e 54 20 45 58 43 4c 55 53 49 56 45 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.EXCLUSIVE,...PRIMARY.KE |
b6a60 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b6a80 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
b6aa0 | 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 | ,2)....ON.CONFLICT(a,b).DO.UPDAT |
b6ac0 | 45 20 53 45 54 20 63 3d 63 2b 31 3b 56 41 43 55 55 4d 0a 81 39 89 50 04 00 82 77 43 52 45 41 54 | E.SET.c=c+1;VACUUM..9.P...wCREAT |
b6ae0 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 | E.TABLE.t1(...a.INT,...b.INT,... |
b6b00 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 2d 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | c.INT.DEFAULT-0,...PRIMARY.KEY(a |
b6b20 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
b6b40 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 | .t1(a,b).VALUES(1,2),(3,4),(1,2) |
b6b60 | 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ....ON.CONFLICT(a,b).DO.UPDATE.S |
b6b80 | 45 54 20 63 3d 63 2b 31 3b 56 41 43 55 55 4d 0a 81 39 89 4f 04 00 82 77 43 52 45 41 54 45 20 54 | ET.c=c+1;VACUUM..9.O...wCREATE.T |
b6ba0 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 | ABLE.t1(...a.INT,...b.INT,...c.I |
b6bc0 | 4e 54 20 44 45 46 41 55 4c 54 2b 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | NT.DEFAULT+0,...PRIMARY.KEY(a,b) |
b6be0 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
b6c00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 | (a,b).VALUES(1,2),(3,4),(1,2)... |
b6c20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(a,b).DO.UPDATE.SET. |
b6c40 | 63 3d 63 2b 31 3b 56 41 43 55 55 4d 0a 81 36 89 4e 04 00 82 71 43 52 45 41 54 45 20 54 41 42 4c | c=c+1;VACUUM..6.N...qCREATE.TABL |
b6c60 | 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 | E.t1(...a.INT,...b.INT,...c.INT. |
b6c80 | 44 45 46 41 55 4c 54 20 b0 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 | DEFAULT..,...PRIMARY.KEY(a,b).). |
b6ca0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 | WITHOUT.ROWID;EXPLAIN.INSERT.INT |
b6cc0 | 4f 20 74 31 28 63 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 | O.t1(c,b).VALUES(1,2),(3,4),(1,2 |
b6ce0 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | )ON.CONFLICT(a,b).DO.UPDATE.SET. |
b6d00 | 63 3d 63 2b 31 3b 0a 81 3b 89 4d 04 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | c=c+1;..;.M...{CREATE.TABLE.t1(. |
b6d20 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ..a.INT,...b.INT,...c.INT.DEFAUL |
b6d40 | 54 20 54 4f 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | T.TO0,...PRIMARY.KEY(a,b).).WITH |
b6d60 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
b6d80 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e | ALUES(1,2),(3,4),(1,2)....ON.CON |
b6da0 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 56 | FLICT(a,b).DO.UPDATE.SET.c=c+1;V |
b6dc0 | 41 43 55 55 4d 0a 81 39 89 4c 04 00 82 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | ACUUM..9.L...wCREATE.TABLE.t1(.. |
b6de0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | .a.INT,...b.INT,...c.INT.DEFAULT |
b6e00 | 20 46 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .F,...PRIMARY.KEY(a,b).).WITHOUT |
b6e20 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
b6e40 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | ES(1,2),(3,4),(1,2)....ON.CONFLI |
b6e60 | 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 56 41 43 55 | CT(a,b).DO.UPDATE.SET.c=c+1;VACU |
b6e80 | 55 4d 0a 81 36 89 4b 04 00 82 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 | UM..6.K...qCREATE.TABLE.t1(...a. |
b6ea0 | 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 4e | INT,...b.INT,...c.INT.DEFAULT.EN |
b6ec0 | 44 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | D0,...PRIMARY.KEY(a,b).).WITHOUT |
b6ee0 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
b6f00 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | ES(1,2),(3,4),(1,2)....ON.CONFLI |
b6f20 | 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 0a 81 33 89 | CT(a,b).DO.UPDATE.SET.c=c+1;..3. |
b6f40 | 4a 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | J...kCREATE.TABLE.t1(...a.INT,.. |
b6f60 | 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 2c 0a 20 20 50 52 49 | .b.INT,...c.INT.DEFAULT.E,...PRI |
b6f80 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
b6fa0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b6fc0 | 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 3,4),(1,2)....ON.CONFLICT(a,b).D |
b6fe0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 0a 81 33 89 49 04 00 82 6b 43 52 45 41 | O.UPDATE.SET.c=c+1;..3.I...kCREA |
b7000 | 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 | TE.TABLE.t1(...a.INT,...b.INT,.. |
b7020 | 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | .c.INT.DEFAULT.0,...PRIMARY.KEY( |
b7040 | 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 52 45 50 4c 41 43 45 20 49 4e 54 | a,b).).WITHOUT.ROWID;REPLACE.INT |
b7060 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 | O.t1(a,b).VALUES(1,2),(3,4),(1,2 |
b7080 | 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | )....ON.CONFLICT(a,b).DO.UPDATE. |
b70a0 | 53 45 54 20 62 3d 63 2b 42 3b 0a 81 3a 89 48 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 | SET.b=c+B;..:.H...yCREATE.TABLE. |
b70c0 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 | t1(...a.INT,...b.INT,...c.INT.DE |
b70e0 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(a,b).).WI |
b7100 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | THOUT.ROWID;EXPLAIN.INSERT.INTO. |
b7120 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a | t1(a,b).VALUES(1,2),(3,4),(1,2). |
b7140 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ...ON.CONFLICT(a,b).DO.UPDATE.SE |
b7160 | 54 20 63 3d 63 2b 42 3b 0a 81 3a 89 47 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | T.c=c+B;..:.G...yCREATE.TABLE.t1 |
b7180 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | (...a.INT,...b.INT,...c.INT.DEFA |
b71a0 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b).).WITH |
b71c0 | 4f 55 54 20 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | OUT.ROWID;EXPLAIN.INSERT.INTO.t1 |
b71e0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 | (a,b).VALUES(1,2),(3,4),(1,2)... |
b7200 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(a,b).DO.UPDATE.SET. |
b7220 | 63 3d 20 31 3d 31 0a 81 44 89 46 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | c=.1=1..D.F....CREATE.TABLE.t1(. |
b7240 | 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c | ..a.INT,...b.INT,...c.INT.DEFAUL |
b7260 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b7280 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;.INSERT.INTO.t1(a,b).VAL |
b72a0 | 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 32 29 2c 28 33 20 4d 41 54 43 48 2d 31 2c 34 29 | UES(2001-01-011,2),(3.MATCH-1,4) |
b72c0 | 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | ,(1,2)ON.CONFLICT(a,b).DO.UPDATE |
b72e0 | 20 53 45 54 20 63 3d 20 40 31 63 2b 31 3b 0a 81 33 89 45 04 00 82 6b 43 52 45 41 54 45 20 54 41 | .SET.c=.@1c+1;..3.E...kCREATE.TA |
b7300 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e | BLE.t1(...a.INT,...b.INT,...c.IN |
b7320 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b7340 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b7360 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 | a,b).VALUES(1,2),(3,4),(1,2).... |
b7380 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 e3 | ON.CONFLICT(a,b).DO.UPDATE.SET.. |
b73a0 | 3d 63 2b 31 3b 0a 81 33 89 44 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 | =c+1;..3.D...kCREATE.TABLE.t1(.. |
b73c0 | 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 | .a.INT,...b.INT,...c.INT.DEFAULT |
b73e0 | 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 | .0,...PRIMARY.KEY(a,b).).WITHOUT |
b7400 | 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 | .ROWID;.INSERT.INTO.t1(a,b).VALU |
b7420 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | ES(1,2),(3,4),(1,2)....ON.CONFLI |
b7440 | 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 7e 23 31 3b 0a 81 3e 89 | CT(a,b).DO.UPDATE.SET.c=~#1;..>. |
b7460 | 43 04 00 83 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | C....CREATE.TABLE.t1(...a.INT,.. |
b7480 | 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 | .b.INT,...c.INT.DEFAULT.0,...PRI |
b74a0 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
b74c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b74e0 | 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 3,4),(1,2)....ON.CONFLICT(a,b).D |
b7500 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 41 4e 41 4c 59 5a 45 20 61 2e 62 0a 81 | O.UPDATE.SET.c=c+1;ANALYZE.a.b.. |
b7520 | 3a 89 42 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c | :.B...yCREATE.TABLE.t1(...a.INT, |
b7540 | 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 | ...b.INT,...c.INT.DEFAULT.0,...P |
b7560 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
b7580 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
b75a0 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | ,(3,4),(1,2)....ON.CONFLICT(a,b) |
b75c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 31 3b 41 4e 41 4c 59 5a 45 0a 81 3d 89 | .DO.UPDATE.SET.c=c+1;ANALYZE..=. |
b75e0 | 41 04 00 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 | A....CREATE.TABLE.t1(...a.INT,.. |
b7600 | 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 | .b.INT,...c.INT.DEFAULT.0,...PRI |
b7620 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
b7640 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b7660 | 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | 3,4),(1,2)....ON.CONFLICT(a,b).D |
b7680 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 20 6c 69 6b 65 6c 79 28 31 29 31 3b 0a 81 33 | O.UPDATE.SET.c=c+.likely(1)1;..3 |
b76a0 | 89 40 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .@...kCREATE.TABLE.t1(...a.INT,. |
b76c0 | 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 | ..b.INT,...c.INT.DEFAULT.0,...PR |
b76e0 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY(a,b).).WITHOUT.ROWID;. |
b7700 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
b7720 | 28 33 2c 34 29 2c 28 31 2c 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | (3,4),(1,2)....ON.CONFLICT(a,b). |
b7740 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 25 31 3b 0a 81 43 89 3f 04 00 83 0b 43 52 45 | DO.UPDATE.SET.c=c%1;..C.?....CRE |
b7760 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a | ATE.TABLE.t1(...a.INT,...b.INT,. |
b7780 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..c.INT.DEFAULT.0,...PRIMARY.KEY |
b77a0 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b77c0 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | TO.t1(a,b).VALUES(1,2),(3,4),(1, |
b77e0 | 32 29 0a 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | 2)....ON.CONFLICT(a,b).DO.UPDATE |
b7800 | 20 53 45 54 20 63 3d 20 6c 69 6b 65 6c 69 68 6f 6f 64 28 31 2c 31 29 63 2b 31 3b 0a 81 4b 89 3e | .SET.c=.likelihood(1,1)c+1;..K.> |
b7820 | 04 00 83 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a.INT,... |
b7840 | 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | b.INT,...c.INT.DEFAULT.0,...PRIM |
b7860 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b7880 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
b78a0 | 20 4d 41 54 43 48 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | .MATCH-1,4),(1,2)ON.CONFLICT(a,b |
b78c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 32 30 30 31 2d 30 31 2d 30 31 2d | ).DO.UPDATE.SET.c=c+22001-01-01- |
b78e0 | 30 31 2d 30 31 2d 30 31 31 3b 0a 81 4b 89 3d 04 00 83 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | 01-01-011;..K.=....CREATE.TABLE. |
b7900 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 | t1(...a.INT,...b.INT,...c.INT.DE |
b7920 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(a,b).).WI |
b7940 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | THOUT.ROWID;.INSERT.INTO.t1(a,b) |
b7960 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 4d 41 54 43 48 2d 31 2c 34 29 2c 28 31 2c 32 29 | .VALUES(1,2),(3.MATCH-1,4),(1,2) |
b7980 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ON.CONFLICT(a,b).DO.UPDATE.SET.c |
b79a0 | 3d 63 2b 32 30 30 31 2d 30 31 2d 30 31 32 30 30 31 2d 30 31 2d 30 31 31 3b 0a 81 4b 89 3c 04 00 | =c+2001-01-012001-01-011;..K.<.. |
b79c0 | 83 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 | ..CREATE.TABLE.t1(...a.INT,...b. |
b79e0 | 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 | INT,...c.INT.DEFAULT.0,...PRIMAR |
b7a00 | 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 | Y.KEY(a,b).).WITHOUT.ROWID;.INSE |
b7a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 4d | RT.INTO.t1(a,b).VALUES(1,2),(3.M |
b7a40 | 41 54 43 48 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 | ATCH-1,4),(1,2)ON.CONFLICT(a,b). |
b7a60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 2d 32 30 30 31 2d 30 31 2d 30 31 30 31 | DO.UPDATE.SET.c=c+2-2001-01-0101 |
b7a80 | 2d 30 31 2d 30 31 31 3b 0a 81 41 89 3b 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | -01-011;..A.;....CREATE.TABLE.t1 |
b7aa0 | 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | (...a.INT,...b.INT,...c.INT.DEFA |
b7ac0 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b).).WITH |
b7ae0 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
b7b00 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 4d 41 54 43 48 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e | ALUES(1,2),(3.MATCH-1,4),(1,2)ON |
b7b20 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 | .CONFLICT(a,b).DO.UPDATE.SET.c=c |
b7b40 | 2b 32 2d 30 31 2d 30 31 2d 20 31 3d 31 0a 81 41 89 3a 04 00 83 07 43 52 45 41 54 45 20 54 41 42 | +2-01-01-.1=1..A.:....CREATE.TAB |
b7b60 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 | LE.t1(...a.INT,...b.INT,...c.INT |
b7b80 | 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | .DEFAULT.0,...PRIMARY.KEY(a,b).) |
b7ba0 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
b7bc0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 4d 41 54 43 48 2d 31 2c 34 29 2c 28 31 | ,b).VALUES(1,2),(3.MATCH-1,4),(1 |
b7be0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ,2)ON.CONFLICT(a,b).DO.UPDATE.SE |
b7c00 | 54 20 63 3d 63 2b 31 2d 30 31 2d 30 31 2d 30 31 31 3b 0a 81 41 89 39 04 00 83 07 43 52 45 41 54 | T.c=c+1-01-01-011;..A.9....CREAT |
b7c20 | 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 | E.TABLE.t1(...a.INT,...b.INT,... |
b7c40 | 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 | c.INT.DEFAULT.0,...PRIMARY.KEY(a |
b7c60 | 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,b).).WITHOUT.ROWID;.INSERT.INTO |
b7c80 | 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 4d 41 54 43 48 2d 31 2c | .t1(a,b).VALUES(1,2),(3.MATCH-1, |
b7ca0 | 20 61 62 73 28 31 29 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 | .abs(1))ON.CONFLICT(a,b).DO.UPDA |
b7cc0 | 54 45 20 53 45 54 20 63 3d 63 2b 32 2d 30 31 2d 30 31 2d 30 31 31 3b 0a 81 46 89 38 04 00 83 11 | TE.SET.c=c+2-01-01-011;..F.8.... |
b7ce0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREATE.TABLE.t1(...a.INT,...b.IN |
b7d00 | 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 | T,...c.INT.DEFAULT.0,...PRIMARY. |
b7d20 | 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 | KEY(a,b).).WITHOUT.ROWID;.INSERT |
b7d40 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2d 31 2c | .INTO.t1(a,b).VALUES(1,2),(3.-1, |
b7d60 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 | 4),(1,2)ON.CONFLICT(a,b).DO.UPDA |
b7d80 | 54 45 20 53 45 54 20 63 3d 63 2b 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 31 | TE.SET.c=c+20012001-01-01-01-011 |
b7da0 | 3b 0a 81 46 89 37 04 00 83 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;..F.7....CREATE.TABLE.t1(...a.I |
b7dc0 | 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a | NT,...b.INT,...c.INT.DEFAULT.0,. |
b7de0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ..PRIMARY.KEY(a,b).).WITHOUT.ROW |
b7e00 | 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ID;.INSERT.INTO.t1(a,b).VALUES(1 |
b7e20 | 2c 32 29 2c 28 33 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | ,2),(3.-1,4),(1,2)ON.CONFLICT(a, |
b7e40 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 30 30 31 2d 30 31 32 30 30 31 | b).DO.UPDATE.SET.c=c+2001-012001 |
b7e60 | 2d 30 31 2d 30 31 2d 30 31 31 3b 0a 81 3c 89 36 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 | -01-01-011;..<.6...}CREATE.TABLE |
b7e80 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 | .t1(...a.INT,...b.INT,...c.INT.D |
b7ea0 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b7ec0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b7ee0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | ).VALUES(1,2),(3.-1,4),(1,2)ON.C |
b7f00 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 | ONFLICT(a,b).DO.UPDATE.SET.c=c+2 |
b7f20 | 2d 30 31 2d 30 31 2d 30 31 31 3b 0a 81 50 89 35 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 | -01-01-011;..P.5...%CREATE.TABLE |
b7f40 | 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 | .t1(...a.INT,...b.INT,...c.INT.D |
b7f60 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b7f80 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b7fa0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2d 31 2c 32 30 30 31 2d 30 31 2d 30 31 34 29 | ).VALUES(1,2),(3.-1,2001-01-014) |
b7fc0 | 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | ,(1,2)ON.CONFLICT(a,b).DO.UPDATE |
b7fe0 | 20 53 45 54 20 63 3d 63 2b 32 30 30 31 2d 32 30 30 31 2d 30 31 2d 30 31 30 31 2d 30 31 31 3b 0a | .SET.c=c+2001-2001-01-0101-011;. |
b8000 | 0d 00 00 00 2e 00 7c 00 1f 3b 1e a0 1d de 1d 19 1c 50 1b 99 1a e1 1a 1b 19 63 18 ae 17 ef 17 35 | ......|..;.......P.......c.....5 |
b8020 | 16 80 15 cb 15 0f 14 82 13 ee 13 61 12 aa 12 1d 11 90 11 2a 10 9c 10 0f 0f 82 0e c7 0e 02 0d 3c | ...........a.......*...........< |
b8040 | 0c 7c 0b bc 0a ec 0a 35 09 84 09 0a 08 7d 07 c4 07 0c 06 06 05 06 04 5f 03 b8 03 13 02 5c 01 c6 | .|.....5.....}........._.....\.. |
b8060 | 01 21 00 7c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 21 8a 0c | .!.|.........................!.. |
b8080 | 04 00 82 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 49 2c 62 2c 63 2c 64 2c 50 52 49 4d | ...GCREATE.TABLE.t1(I,b,c,d,PRIM |
b80a0 | 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 | ARY.KEY(b,d));.WITH.data(a,b,c,d |
b80c0 | 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ).AS.(VALUES(1,2,3,4),(5,6,7,8), |
b80e0 | 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | (9,10,11,12)).INSERT.INTO.t1(a,b |
b8100 | 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 28 28 56 41 29 20 55 50 29 20 55 50 | ,c,d).SELECT.*.FROM.((VA).UP).UP |
b8120 | 0a 81 21 8a 0b 04 00 82 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 49 2c 62 2c 63 2c 64 | ..!.....GCREATE.TABLE.t1(I,b,c,d |
b8140 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c | ,PRIMARY.KEY(b,d));.WITH.data(a, |
b8160 | 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | b,c,d).AS.(VALUES(1,2,3,4),(5,6, |
b8180 | 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 7,8),(9,10,11,12)).INSERT.INTO.t |
b81a0 | 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 28 28 20 28 31 29 55 | 1(a,b,c,d).SELECT.*.FROM.((.(1)U |
b81c0 | 50 29 20 55 50 0a 81 12 8a 0a 04 00 82 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 45 58 | P).UP........)CREATE.TABLE.t1(EX |
b81e0 | 43 4c 55 53 49 56 45 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 | CLUSIVE...b.INT.UNIQUE,...c.INT. |
b8200 | 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 45 58 43 4c 55 53 49 | DEFAULT.0,...PRIMARY.KEY(EXCLUSI |
b8220 | 56 45 61 2c 62 29 0a 29 20 57 49 54 20 52 4f 57 49 44 3b 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f | VEa,b).).WIT.ROWID;,(3,4),(1,2)O |
b8240 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 8a 09 | N.CONFLICT(a,b).DO.NOTHING;..3.. |
b8260 | 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 43 55 52 52 45 4e 54 5f 54 49 4d 45 | ...kCREATE.TABLE.t1(CURRENT_TIME |
b8280 | 53 54 41 4d 50 20 55 4e 49 51 55 45 2c 0a 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 2c | STAMP.UNIQUE,.CURRENT_TIMESTAMP, |
b82a0 | 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | ...PRIMARY.KEY(a,b).).WITHOUT.RO |
b82c0 | 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | WID;.INSERT.INTO.t1(a,b).VALUES( |
b82e0 | 20 73 75 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | .sum(1),4),(1,2)ON.CONFLICT(a,b) |
b8300 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 21 8a 08 04 00 82 47 43 52 45 41 54 | .DO.NOTHING;VACUUM..!.....GCREAT |
b8320 | 45 20 54 41 42 4c 45 20 74 31 28 41 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | E.TABLE.t1(A,b,c,d,PRIMARY.KEY(b |
b8340 | 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c | ,d));.WITH.data(a,b,c,d).AS.(VAL |
b8360 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c | UES(1,2,3,4),(5,6,7,8),(9,10,11, |
b8380 | 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c | 12)).INSERT.INTO.t1(a,b,c,d).SEL |
b83a0 | 45 43 54 20 2a 20 46 52 4f 4d 20 28 62 2c 64 29 20 55 50 29 20 55 50 0a 81 23 8a 07 04 00 82 4b | ECT.*.FROM.(b,d).UP).UP..#.....K |
b83c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 41 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t1(A,b,c,d,PRIMARY. |
b83e0 | 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 | KEY(b,d));.WITH.data(a,b,c,d).AS |
b8400 | 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 | .(VALUES(1,2,3,4),(5,6,7,8),(9,1 |
b8420 | 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | 0,11,12)).INSERT.INTO.t1(a,b,c,d |
b8440 | 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 28 53 45 4c 45 43 54 40 55 50 29 20 55 50 0a 81 | ).SELECT.*.FROM.(SELECT@UP).UP.. |
b8460 | 23 8a 06 04 00 82 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 41 2c 62 2c 63 2c 64 2c 50 | #.....KCREATE.TABLE.t1(A,b,c,d,P |
b8480 | 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c | RIMARY.KEY(b,d));.WITH.data(a,b, |
b84a0 | 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | c,d).AS.(VALUES(1,2,3,4),(5,6,7, |
b84c0 | 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | 8),(9,10,11,12)).INSERT.INTO.t1( |
b84e0 | 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 28 53 45 4c 45 43 54 20 55 | a,b,c,d).SELECT.*.FROM.(SELECT.U |
b8500 | 50 29 00 55 50 0a 81 7c 8a 05 04 00 83 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 | P).UP..|.....}CREATE.TABLE.t1(.a |
b8520 | 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f | ,ba,b,c,d,PRIMARY.KEY(d,c))WITHO |
b8540 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | UT.ROWID;.CREATE.UNIQUE.INDEX.t1 |
b8560 | 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | bc.ON.t1(b,c);.INSERT.INTO.t1(a, |
b8580 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
b85a0 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
b85c0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
b85e0 | 30 3b 0a 53 45 4c 45 43 54 20 42 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | 0;.SELECT.B,.'x'.FROM.t1.ORDER.B |
b8600 | 59 20 2b 61 3b 0a 82 02 8a 04 04 00 84 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 61 | Y.+a;.........CREATE.TABLE.t1(.a |
b8620 | 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f | ,ba,b,c,d,PRIMARY.KEY(d,c))WITHO |
b8640 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | UT.ROWID;.CREATE.UNIQUE.INDEX.t1 |
b8660 | 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | bc.ON.t1(b,c);.INSERT.INTO.t1(a, |
b8680 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
b86a0 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
b86c0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
b86e0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | 0;.SELECT.*,.'x'.FROM.t1.ORDER.B |
b8700 | 59 20 2b 61 3b 56 41 43 55 55 4d 0a 81 34 8a 03 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | Y.+a;VACUUM..4.....mCREATE.TABLE |
b8720 | 20 74 31 28 20 61 2c 62 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 | .t1(.a,ba,b,c.DEFAULT.0,PRIMARY. |
b8740 | 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 | KEY(a,b));.INSERT.INTO.t1.AS.nx( |
b8760 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f | a,b).VALUES(1,2),(3,4),(7,8)...O |
b8780 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 | N.CONFLICT(a,b).DO.....UPDATE.SE |
b87a0 | 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 48 45 52 45 20 28 61 3c 62 | T.c=(SELECT.c.NOTNULL.WHERE.(a<b |
b87c0 | 29 29 28 65 81 35 8a 02 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 5b 61 5d | ))(e.5.....oCREATE.TABLE.t1(.[a] |
b87e0 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 | a,b,c,d,PRIMARY.KEY(b,d));.WITH. |
b8800 | 20 5b 61 5d 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .[a](a,b,c,d).AS.(VALUES(1,2,3,4 |
b8820 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 | ),(5,6,7,8),(9,10,11,12)).INSERT |
b8840 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | .INTO.t1(a,b,c,d).SELECT.*.FROM. |
b8860 | 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 0a 81 09 8a | data.ON.CONFLICT(b,d).UPDATE.... |
b8880 | 01 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 20 22 61 22 2c 22 62 22 2c 0a 20 | .....CREATE.TABLE.t1(."a","b",.. |
b88a0 | 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | .b.INT.UNIQUE,...).WITHOUT.ROWID |
b88c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ;.INSERT.INTO.t1(a,b).VALUES(1,2 |
b88e0 | 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | ),(3,4),(1,2)ON.CONFLICT(a,b).DO |
b8900 | 20 4e 4f 54 48 49 4e 47 3b 0a 77 8a 00 04 00 81 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | .NOTHING;.w.....sCREATE.TABLE.t1 |
b8920 | 28 0a 20 49 4e 54 20 61 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 49 4e 54 20 44 | (..INT.a.INT.DEFAULT.0,...PINT.D |
b8940 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 4c 4c 41 54 45 | EFAULT.0,...PRIMARY.KEY(a,bLLATE |
b8960 | 44 3b 01 00 4e 20 56 80 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 00 00 00 64 4f 20 4e 63 54 48 57 | D;..N.V.N.CONFLICT(a,...dO.NcTHW |
b8980 | 4e 47 80 0a 81 2d 89 7f 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 62 | NG...-....._CREATE.TABLE.t1(...b |
b89a0 | e0 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 | .INT,...b.INT.UNIQUE,...c.INT.DE |
b89c0 | 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 62 29 0a 29 20 57 49 | FAULT.0,...PRIMARY.KEY(b,b).).WI |
b89e0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 | THOUT.ROWID;.INSERT.INTO.t1(a,b) |
b8a00 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | .VALUES(1,2),(3,4),(1,2)ON.CONFL |
b8a20 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 89 7e 04 00 82 6b 43 52 45 | ICT(a,b).DO.NOTHING;..3.~...kCRE |
b8a40 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 2c 62 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 | ATE.TABLE.t1(...a,bNT,...b.INT.U |
b8a60 | 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...c.INT.DEFAULT.0,...PRIM |
b8a80 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b8aa0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
b8ac0 | 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 2f 2a 20 2a 2f 44 4f 20 4e 4f 54 | ,4),(1,2)ON.CONFLICT./*.*/DO.NOT |
b8ae0 | 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 4c 89 7d 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 4c 45 | HING;VACUUM..L.}....CREATE.TABLE |
b8b00 | 20 74 31 28 0a 20 20 61 2c 49 4e 54 2c 0a 20 20 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 | .t1(...a,INT,...b.INT,...c.INT.D |
b8b20 | 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 | EFAULT.0,...PRIMARY.KEY(a,b).).W |
b8b40 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | ITHOUT.ROWID;.INSERT.INTO.t1(a,b |
b8b60 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | ).VALUES(1,2),(3.-1,4),(1,2)ON.C |
b8b80 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 | ONFLICT(a,b).DO.UPDATE.SET.c=c+2 |
b8ba0 | 30 30 31 2d 32 30 30 31 2d 30 31 2d 30 31 30 20 67 6c 6f 62 28 31 2c 31 29 31 3b 0a 81 3c 89 7c | 001-2001-01-010.glob(1,1)1;..<.| |
b8bc0 | 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 2c 49 4e 54 2c 0a 20 20 | ...}CREATE.TABLE.t1(...a,INT,... |
b8be0 | 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | b.INT,...c.INT.DEFAULT.0,...PRIM |
b8c00 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b8c20 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
b8c40 | 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | .-1,4),(1,2)ON.CONFLICT(a,b).DO. |
b8c60 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 30 30 31 2d 30 31 2d 30 31 31 3b 0a 81 3c 89 7b | UPDATE.SET.c=c+2001-01-011;..<.{ |
b8c80 | 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 2c 49 4e 54 2c 0a 20 20 | ...}CREATE.TABLE.t1(...a,INT,... |
b8ca0 | 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | b.INT,...c.INT.DEFAULT.0,...PRIM |
b8cc0 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b8ce0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
b8d00 | 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | .-1,4),(1,2)ON.CONFLICT(a,b).DO. |
b8d20 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 30 30 31 2d 30 31 2d 30 31 20 2d 31 81 42 89 7a | UPDATE.SET.c=c+2001-01-01.-1.B.z |
b8d40 | 04 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 2c 49 4e 54 2c 0a 20 20 | ....CREATE.TABLE.t1(...a,INT,... |
b8d60 | 62 20 49 4e 54 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | b.INT,...c.INT.DEFAULT.0,...PRIM |
b8d80 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b8da0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | SERT.INTO.t1(a,b).VALUES(1,2),(3 |
b8dc0 | 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | .-1,4),(1,2)ON.CONFLICT(a,b).DO. |
b8de0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 63 2b 32 30 30 31 2d 30 20 67 6c 6f 62 28 31 2c 31 29 31 | UPDATE.SET.c=c+2001-0.glob(1,1)1 |
b8e00 | 3b 0a 81 41 89 79 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 2c 49 | ;..A.y....CREATE.TABLE.t1(...a,I |
b8e20 | 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | NT,...b.INT.UNIQUE,...c.INT.DEFA |
b8e40 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 | ULT.0,...PRIMARY.KEY(a,b).).WITH |
b8e60 | 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 | OUT.ROWID;.INSERT.INTO.t1(a,b).V |
b8e80 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 2d 30 31 2d 30 31 33 2c 34 29 2c 28 31 32 30 30 | ALUES(1,2),(2001-01-013,4),(1200 |
b8ea0 | 31 2d 30 31 2d 30 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f | 1-01-01,2)ON.CONFLICT(a,b).DO.NO |
b8ec0 | 54 48 49 4e 47 3b 0a 81 37 89 78 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a | THING;..7.x...sCREATE.TABLE.t1(. |
b8ee0 | 20 20 61 2c 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 | ..a,INT,...b.INT.UNIQUE,...c.INT |
b8f00 | 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | .DEFAULT.0,...PRIMARY.KEY(a,b).) |
b8f20 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
b8f40 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 32 30 30 31 2d 30 31 2d 30 31 33 2c 34 29 2c | ,b).VALUES(1,2),(2001-01-013,4), |
b8f60 | 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | (1,2)ON.CONFLICT(a,b).DO.NOTHING |
b8f80 | 3b 0a 81 09 89 77 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 63 | ;....w....CREATE.TABLE.t1(...a.c |
b8fa0 | 68 61 72 43 55 52 52 45 41 4c 4c 54 49 4d 45 53 54 41 4d 50 29 0a 29 20 57 49 54 48 4f 55 54 20 | harCURREALLTIMESTAMP).).WITHOUT. |
b8fc0 | 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ROWID;.INSERT.INTO.t1(a,b).VALUE |
b8fe0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | S(1,2),(3,4),(1,2)ON.CONFLICT(a, |
b9000 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 89 76 04 00 82 17 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;....v....CREATE.TA |
b9020 | 42 4c 45 20 74 31 28 0a 20 20 61 20 63 68 61 72 20 31 29 62 20 49 4e 52 59 20 4b 45 59 28 61 2c | BLE.t1(...a.char.1)b.INRY.KEY(a, |
b9040 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
b9060 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f | t1(a,b).VALUES(1,2),(3,4),(1,2)O |
b9080 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0a 89 75 | N.CONFLICT(a,b).DO.NOTHING;....u |
b90a0 | 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 70 54 2c 0a 22 22 | ....CREATE.TABLE.t1(...a.IpT,."" |
b90c0 | 66 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 80 00 2c 62 | f.INT.UNIQUE,...c.INT.DEFAUL..,b |
b90e0 | 29 0a 29 20 52 4f 57 49 44 3b 0a 49 4e 13 20 49 4e 54 4f 20 74 31 28 61 2c 53 29 20 56 41 4c 55 | ).).ROWID;.IN..INTO.t1(a,S).VALU |
b9100 | 45 53 28 20 73 75 6d 28 31 25 a1 29 29 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ES(.sum(1%.))4),(1,2)ON.CONFLICT |
b9120 | 45 61 2c 54 48 49 4e 47 3b 0a 63 89 74 04 00 81 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | Ea,THING;.c.t...KCREATE.TABLE.t1 |
b9140 | 28 0a 20 20 61 20 49 54 20 44 45 46 45 52 52 41 42 64 45 0a 20 20 51 55 45 2c 0a 20 20 63 20 49 | (...a.IT.DEFERRABdE...QUE,...c.I |
b9160 | 4e 54 20 44 45 46 45 52 52 41 42 64 45 0a 20 20 50 33 2c 34 29 2c 28 31 2c 46 30 49 43 54 28 61 | NT.DEFERRABdE...P3,4),(1,F0ICT(a |
b9180 | 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 89 73 04 00 82 17 43 52 45 41 54 45 20 54 | ,b).DO.NOTHING;....s....CREATE.T |
b91a0 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4f 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | ABLE.t1(...a.IOT,...b.INT.UNIQUE |
b91c0 | 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 58 64 33 20 50 45 59 28 61 2c 62 29 0a | ,...c.INT.DEFAULT.0Xd3.PEY(a,b). |
b91e0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 31 28 61 2c 62 31 2c 32 29 | ).WITHOUT.ROWID;.INSERT1(a,b1,2) |
b9200 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 89 | ON.CONFLICT(a,b).DO.NOTHING;.... |
b9220 | 72 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 57 49 54 48 | r....CREATE.TABLE.t1(...a.INWITH |
b9240 | 4f 55 54 20 52 4f 57 49 44 49 51 55 45 2c 0a 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d | OUT.ROWIDIQUE,..CURRENT_TIMESTAM |
b9260 | 50 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 20 52 4f 57 49 44 | P...PRIMARY.KEY(a,b).).WIT.ROWID |
b9280 | 3b 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | ;,(3,4),(1,2)ON.CONFLICT(a,b).DO |
b92a0 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 89 71 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..3.q...kCREATE.TABLE.t |
b92c0 | 31 28 0a 20 20 61 20 49 4e 54 43 4f 4d 4d 49 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | 1(...a.INTCOMMIT,...b.INT.UNIQUE |
b92e0 | 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b | ,...c.INT.DEFAULT.0,...PRIMARY.K |
b9300 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
b9320 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
b9340 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
b9360 | 0a 81 09 89 70 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ....p....CREATE.TABLE.t1(...a.IN |
b9380 | 54 2c 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 55 46 41 55 | T,WITHOUT.ROWIDUE,...c.INT.DUFAU |
b93a0 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 20 52 | LT.0,...PRIMARY.KEY(a,b).).WIT.R |
b93c0 | 4f 57 49 44 3b 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | OWID;,(3,4),(1,2)ON.CONFLICT(a,b |
b93e0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 10 89 6f 04 00 82 25 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;....o...%CREATE.TAB |
b9400 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 45 2c 0a | LE.t1(...a.INT,WITHOUT.ROWIDUE,. |
b9420 | 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..c.INT.DEFAULT.0,...PRIMARY.KEY |
b9440 | 28 57 49 54 48 4f 55 54 61 2c 62 29 0a 29 20 57 49 54 20 52 4f 57 49 44 3b 2c 28 33 2c 34 29 2c | (WITHOUTa,b).).WIT.ROWID;,(3,4), |
b9460 | 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | (1,2)ON.CONFLICT(a,b).DO.NOTHING |
b9480 | 3b 0a 81 09 89 6e 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 | ;....n....CREATE.TABLE.t1(...a.I |
b94a0 | 4e 54 2c 57 49 54 48 4f 55 54 20 52 4f 57 49 44 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 | NT,WITHOUT.ROWIDUE,...c.INT.DEFA |
b94c0 | 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 57 49 54 48 0a 29 20 57 49 54 20 | ULT.0,...PRIMARY.KEY(WITH.).WIT. |
b94e0 | 52 4f 57 49 44 3b 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | ROWID;,(3,4),(1,2)ON.CONFLICT(a, |
b9500 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 38 89 6d 04 00 82 75 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..8.m...uCREATE.TA |
b9520 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 6c 75 64 65 64 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,.ludedNT.UNIQUE, |
b9540 | 0a 20 20 42 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...B.INT.DEFAULT.0,...PRIMARY.KE |
b9560 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 49 | Y(a,b).).WITHOUT.ROWID;EXPLAIN.I |
b9580 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
b95a0 | 20 31 20 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | .1.-1,4),(1,2)ON.CONFLICT(a,b).D |
b95c0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 89 6c 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..1.l...gCREATE.TABLE. |
b95e0 | 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 6c 75 64 65 64 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 42 | t1(...a.INT,.ludedNT.UNIQUE,...B |
b9600 | 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | .INT.DEFAULT.0,...PRIMARY.KEY(a, |
b9620 | 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b).).WITHOUT.ROWID;.INSERT.INTO. |
b9640 | 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 24 31 3d 31 33 2c 34 29 2c 28 31 | t1(a,b).VALUES(1,2),($1=13,4),(1 |
b9660 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b9680 | 81 31 89 6b 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | .1.k...gCREATE.TABLE.t1(...a.INT |
b96a0 | 2c 0a 6c 75 64 65 64 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 42 20 49 4e 54 20 44 45 46 41 55 4c | ,.ludedNT.UNIQUE,...B.INT.DEFAUL |
b96c0 | 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 | T.0,...PRIMARY.KEY(a,b).).WITHOU |
b96e0 | 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c | T.ROWID;.INSERT.INTO.t1(a,b).VAL |
b9700 | 55 45 53 28 31 2c 32 29 2c 28 20 31 3d 31 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c | UES(1,2),(.1=13,4),(1,2)ON.CONFL |
b9720 | 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 36 89 6a 04 00 82 71 43 52 45 | ICT(a,b).DO.NOTHING;..6.j...qCRE |
b9740 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 6c 75 64 65 64 4e 54 20 55 | ATE.TABLE.t1(...a.INT,.ludedNT.U |
b9760 | 4e 49 51 55 45 2c 0a 20 20 42 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d | NIQUE,...B.INT.DEFAULT.0,...PRIM |
b9780 | 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e | ARY.KEY(a,b).).WITHOUT.ROWID;.IN |
b97a0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 | SERT.INTO.t1(a,b).VALUES(1,2),(. |
b97c0 | 31 20 4d 41 54 43 48 2d 31 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c | 1.MATCH-1,4),(1,2)ON.CONFLICT(a, |
b97e0 | 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3b 89 69 04 00 82 7b 43 52 45 41 54 45 20 54 41 | b).DO.NOTHING;..;.i...{CREATE.TA |
b9800 | 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 6c 75 64 65 64 4e 54 20 55 4e 49 51 55 45 2c | BLE.t1(...a.INT,.ludedNT.UNIQUE, |
b9820 | 0a 20 20 42 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...B.INT.DEFAULT.0,...PRIMARY.KE |
b9840 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b9860 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 31 20 2d 31 2c 34 | NTO.t1(a,b).VALUES(1,2),(.1.-1,4 |
b9880 | 29 2c 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | ),(2001-01-011,2)ON.CONFLICT(a,b |
b98a0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 89 68 04 00 82 67 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..1.h...gCREATE.TAB |
b98c0 | 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 6c 75 64 65 64 4e 54 20 55 4e 49 51 55 45 2c 0a | LE.t1(...a.INT,.ludedNT.UNIQUE,. |
b98e0 | 20 20 42 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | ..B.INT.DEFAULT.0,...PRIMARY.KEY |
b9900 | 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e | (a,b).).WITHOUT.ROWID;.INSERT.IN |
b9920 | 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 20 31 20 2d 31 2c 34 29 | TO.t1(a,b).VALUES(1,2),(.1.-1,4) |
b9940 | 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e | ,(1,2)ON.CONFLICT(a,b).DO.NOTHIN |
b9960 | 47 3b 0a 81 34 89 67 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 | G;..4.g...mCREATE.TABLE.t1(...a. |
b9980 | 49 4e 54 2c 0a 6c 75 64 65 64 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 42 20 49 4e 54 20 44 45 46 | INT,.ludedNT.UNIQUE,...B.INT.DEF |
b99a0 | 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 | AULT.0,...PRIMARY.KEY(a,b).).WIT |
b99c0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | HOUT.ROWID;.INSERT.INTO.t1(a,b). |
b99e0 | 56 41 4c 55 45 53 28 31 20 2d 31 2c 32 29 2c 28 24 31 3d 31 33 2c 34 29 2c 28 31 2c 32 29 4f 4e | VALUES(1.-1,2),($1=13,4),(1,2)ON |
b9a00 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 89 66 04 | .CONFLICT(a,b).DO.NOTHING;..B.f. |
b9a20 | 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ...CREATE.TABLE.t1(...a.INT,...b |
b9a40 | 2c 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 49 4e 54 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a | ,INT.UNIQUE,..INTINT.DEFAULT.0,. |
b9a60 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ..PRIMARY.KEY(a,b).).WITHOUT.ROW |
b9a80 | 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | ID;.INSERT.INTO.t1(a,b).VALUES(1 |
b9aa0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 37 | ,2),(3,4),(177777777777777777777 |
b9ac0 | 37 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 7,2)ON.CONFLICT(a,b).DO.NOTHING; |
b9ae0 | 0a 81 34 89 65 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e | ..4.e...mCREATE.TABLE.t1(...a.IN |
b9b00 | 54 2c 0a 20 20 62 2c 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 | T,...b,INT.UNIQUE,...c.INT.DEFAU |
b9b20 | 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f | LT.0,...PRIMARY.KEY(a,b).).WITHO |
b9b40 | 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | UT.ROWID;.INSERT.INTO.t1(a,b).VA |
b9b60 | 4c 55 45 53 28 6a 73 6f 6e 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 | LUES(json(1),4),(1,2)ON.CONFLICT |
b9b80 | 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 41 4e 41 4c 59 5a 45 0a 81 33 89 64 04 00 82 | (a,b).DO.NOTHING;ANALYZE..3.d... |
b9ba0 | 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 2c 49 | kCREATE.TABLE.t1(...a.INT,...b,I |
b9bc0 | 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 | NT.UNIQUE,...c.INT.DEFAULT.0,... |
b9be0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY(a,b).).WITHOUT.ROWID |
b9c00 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 20 73 75 | ;.INSERT.INTO.t1(a,b).VALUES(.su |
b9c20 | 6d 28 31 29 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | m(1),4),(1,2)ON.CONFLICT(a,b).DO |
b9c40 | 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 45 89 63 04 00 83 0f 43 52 45 41 54 45 20 54 | .NOTHING;VACUUM..E.c....CREATE.T |
b9c60 | 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 2c 49 4e 54 20 55 4e 49 51 55 45 | ABLE.t1(...a.INT,...b,INT.UNIQUE |
b9c80 | 2c 0a 20 20 63 20 49 20 20 61 20 49 4e 49 4e 54 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 4e | ,...c.I..a.ININT..b.INT.UNIQUE,N |
b9ca0 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
b9cc0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
b9ce0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | a,b).VALUES(1,2),(3,4),(1,2)ON.C |
b9d00 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 89 62 04 00 83 | ONFLICT(a,b).DO.NOTHING;..A.b... |
b9d20 | 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 76 | .CREATE.TABLE.t1(...a.INT,...b.v |
b9d40 | 61 72 63 68 61 72 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 20 20 63 20 72 61 6e | archarEXPLAIN.QUERY.PLAN...c.ran |
b9d60 | 64 6f 6d 62 6c 6f 62 28 31 29 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 | domblob(1),...PRIMARY.KEY(a,b).) |
b9d80 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | .WITHOUT.ROWID;.INSERT.INTO.t1(a |
b9da0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f | ,b).VALUES(1,2),(3,4),(1,2)ON.CO |
b9dc0 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 3e | NFLICT(a,b).DO.NOTHING;VACUUM..> |
b9de0 | 89 61 04 00 83 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .a....CREATE.TABLE.t1(...a.INT,. |
b9e00 | 20 20 62 20 76 61 72 63 68 61 72 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 28 31 29 2c | ..b.varcharCURRENT_TIMESTAMP(1), |
b9e20 | 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 | ...c.INT.DEFAULT.0,...PRIMARY.KE |
b9e40 | 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | Y(a,b).).WITHOUT.ROWID;.INSERT.I |
b9e60 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
b9e80 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
b9ea0 | 81 17 89 60 04 00 82 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 | ...`...3CREATE.TABLE.t1(...a.INT |
b9ec0 | 2c 0a 20 20 62 20 76 61 72 63 68 61 72 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | ,...b.varchar,...PRIMARY.KEY(a,b |
b9ee0 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
b9f00 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 47 | 1(a,b).VALUES(1,2),(3,4),(1,2)OG |
b9f20 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 89 5f 04 | .CONFLICT(a,b).DO.NOTHING;..A._. |
b9f40 | 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 | ...CREATE.TABLE.t1(...a.INT,...b |
b9f60 | 20 76 61 72 63 68 61 72 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 0a 20 20 63 20 72 | .varchar(1)COLLATE.nocase,...c.r |
b9f80 | 61 6e 64 6f 75 62 6c 6f 62 28 31 29 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | andoublob(1),...PRIMARY.KEY(a,b) |
b9fa0 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .).WITHOUT.ROWID;.INSERT.INTO.t1 |
b9fc0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 | (a,b).VALUES(1,2),(3,4),(1,2)ON. |
b9fe0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a | CONFLICT(a,b).DO.NOTHING;VACUUM. |
ba000 | 0d 00 00 00 16 00 52 00 1f 59 1e b4 1e 0b 1d 7e 1c 9d 1b 2b 1a 57 19 83 18 af 17 db 16 f9 15 76 | ......R..Y.....~...+.W.........v |
ba020 | 13 f5 13 19 10 5c 0f 7f 0c fb 0a 71 07 e5 05 5c 02 d7 00 52 00 00 00 00 00 00 00 00 00 00 00 00 | .....\.....q...\...R............ |
ba040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 01 8a 22 04 00 8a 07 43 52 45 41 54 45 | ....................."....CREATE |
ba060 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 | .TABLE.t1(a.INT);.CREATE.TABLE.' |
ba080 | 61 27 27 41 42 4f 52 54 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | a''ABORTb'(v,INTEGER.PRIMARY.KEY |
ba0a0 | 0c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ..n.INT)/*WUT.ROWID*/;.CREATE.TR |
ba0c0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
ba0e0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
ba100 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
ba120 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
ba140 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
ba160 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
ba180 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
ba1a0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
ba1c0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
ba1e0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
ba200 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
ba220 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
ba240 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
ba260 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
ba280 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
ba2a0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
ba2c0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 01 8a 21 04 00 8a 07 43 | 3),(1),(3),(2),(4),(7);...!....C |
ba2e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
ba300 | 42 4c 45 20 27 61 27 27 41 42 4f 52 54 62 27 28 76 0c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | BLE.'a''ABORTb'(v.INTEGER.PRIMAR |
ba320 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
ba340 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
ba360 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
ba380 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
ba3a0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
ba3c0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
ba3e0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
ba400 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
ba420 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
ba440 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
ba460 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
ba480 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
ba4a0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
ba4c0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
ba4e0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
ba500 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
ba520 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
ba540 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 05 8a 20 | (1),(3),(1),(3),(2),(4),(7);.... |
ba560 | 04 00 8a 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
ba580 | 54 45 20 54 41 42 4c 45 20 27 61 27 27 20 63 6f 75 6e 74 28 31 29 62 27 28 76 2c 49 4e 54 45 47 | TE.TABLE.'a''.count(1)b'(v,INTEG |
ba5a0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
ba5c0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
ba5e0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
ba600 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
ba620 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
ba640 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
ba660 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
ba680 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
ba6a0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
ba6c0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
ba6e0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
ba700 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
ba720 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
ba740 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
ba760 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
ba780 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
ba7a0 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
ba7c0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
ba7e0 | 2c 28 37 29 3b 85 08 8a 1f 04 00 8a 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ,(7);........CREATE.TABLE.t1(a.I |
ba800 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 20 63 6f 75 6e 74 28 31 29 41 | NT);.CREATE.TABLE.'a''.count(1)A |
ba820 | 44 44 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | DDb'(v,INTEGER.PRIMARY.KEY,.n.IN |
ba840 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
ba860 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
ba880 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
ba8a0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
ba8c0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
ba8e0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
ba900 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
ba920 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
ba940 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
ba960 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
ba980 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
ba9a0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
ba9c0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
ba9e0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
baa00 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
baa20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
baa40 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
baa60 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 06 8a 1e 04 00 8a 11 43 52 45 41 54 45 20 | ,(3),(2),(4),(7);........CREATE. |
baa80 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 20 27 | TABLE.t1(a.INT);.CREATE.TABLE..' |
baaa0 | 61 27 27 62 27 27 61 27 27 41 44 44 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | a''b''a''ADDb'(v,INTEGER.PRIMARY |
baac0 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
baae0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
bab00 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
bab20 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
bab40 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
bab60 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
bab80 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
baba0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
babc0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
babe0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
bac00 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
bac20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
bac40 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
bac60 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
bac80 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
baca0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
bacc0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
bace0 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 00 8a 1d 04 | 1),(3),(1),(3),(2),(4),(7);..... |
bad00 | 00 8a 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
bad20 | 45 20 54 41 42 4c 45 20 20 27 61 27 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 | E.TABLE..'a''a''b'(v,INTEGER.PRI |
bad40 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
bad60 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
bad80 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
bada0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
badc0 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
bade0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
bae00 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
bae20 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
bae40 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
bae60 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
bae80 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
baea0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
baec0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
baee0 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
baf00 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
baf20 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
baf40 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
baf60 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 81 | 2),(1),(3),(1),(3),(2),(4),(7);. |
baf80 | 59 8a 1c 04 00 83 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 6d 61 78 | Y.....7CREATE.TABLE.t1(a.INT.max |
bafa0 | 28 31 2c 31 29 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c | (1,1),b.INTEGER,.c.TEXT,.d.BLOB, |
bafc0 | 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .e.ANY,.....UNIQUE(a).ON.CONFLIC |
bafe0 | 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 | T.ignore,.....PRIMARY.KEY(b),... |
bb000 | 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 | ..UNIQUE(c).ON.CONFLICT.fail.).W |
bb020 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f | ITHOUT.ROWID;.CREATE.INDEX.t1d.O |
bb040 | 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 85 39 8a 1b | N.t1(d);ANALYZE.TEMP;VACUUM..9.. |
bb060 | 04 00 8a 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 20 62 6c 6f 62 4e 54 29 3b | ...wCREATE.TABLE.t1(a.I.blobNT); |
bb080 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 7a 65 72 6f 62 6c 6f 62 28 | .CREATE.TABLE.counts(v.zeroblob( |
bb0a0 | 31 29 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | 1)MARY.KEY,.n.INT)/*WUT.ROWID*/; |
bb0c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
bb0e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
bb100 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
bb120 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
bb140 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
bb160 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
bb180 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
bb1a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
bb1c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
bb1e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
bb200 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
bb220 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
bb240 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
bb260 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
bb280 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
bb2a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
bb2c0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
bb2e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
bb300 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 81 58 8a 1a 04 00 83 | ELETE.FROM.t1.WHERE.a=7;..X..... |
bb320 | 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 4f 4e 46 4c 49 43 54 49 4e 54 2c 62 | 5CREATE.TABLE.t1(a.CONFLICTINT,b |
bb340 | 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 45 58 50 | .INTEGER,.c.TEXT,.d.BLOB,.e.AEXP |
bb360 | 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 | LAIN.QUERY.PLANON.CONFLICT.ignor |
bb380 | 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 | e,.....PRIMARY.KEY(b),.....UNIQU |
bb3a0 | 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 | E(c).ON.CONFLICT.fail.).WITHOUT. |
bb3c0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 | ROWID;.CREATE.INDEX.t1d.ON.t1(d) |
bb3e0 | 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 82 7d 8a 19 04 00 85 7f 43 52 45 | ;ANALYZE.TEMP;VACUUM..}......CRE |
bb400 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 48 45 43 4b 49 4e 54 2c 62 20 49 4e 54 45 47 45 | ATE.TABLE.t1(a.CHECKINT,b.INTEGE |
bb420 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e.ANY,.....UN |
bb440 | 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 | IQUE(a).ON.CONFLICT.ignore,..... |
bb460 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e | PRIMARY.KEY(b),.....UNIQUE(c).ON |
bb480 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | .CONFLICT.fail.).WITHOUT.ROWID;. |
bb4a0 | 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 | CREATE.INDEX.t1d.ON.t1(d);.CREAT |
bb4c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 | E.UNIQUE.INDEX.t1e.ON.t1(e);.INS |
bb4e0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1(a,b,c,d,e).VALUES(1, |
bb500 | 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 2,'abc','b3',3.5);.INSERT.INTO.t |
bb520 | 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e | 1.VALUES(2,2,'xyz',NULL,4.25).ON |
bb540 | 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 | .CONFLICT(b).DO.UPDATE.SET.b=max |
bb560 | 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 82 7f 8a 18 04 00 86 03 43 52 | (e,excluded.e);VACUUM.........CR |
bb580 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 43 41 53 43 41 44 45 49 4e 54 2c 62 20 49 4e 54 | EATE.TABLE.t1(a.CASCADEINT,b.INT |
bb5a0 | 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 | EGER,.c.TEXT,.d.BLOB,.e.ANY,.... |
bb5c0 | 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 | .UNIQUE(a).ON.CONFLICT.ignore,.. |
bb5e0 | 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 | ...PRIMARY.KEY(b),.....UNIQUE(c) |
bb600 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .ON.CONFLICT.fail.).WITHOUT.ROWI |
bb620 | 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 | D;.CREATE.INDEX.t1d.ON.t1(d);.CR |
bb640 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a | EATE.UNIQUE.INDEX.t1e.ON.t1(e);. |
bb660 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 | INSERT.INTO.t1(a,b,c,d,e).VALUES |
bb680 | 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | (1,2,'abc','b3',3.5);.INSERT.INT |
bb6a0 | 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 | O.t1.VALUES(2,2,'xyz',NULL,4.25) |
bb6c0 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(b).DO.UPDATE.SET.b= |
bb6e0 | 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 81 5e 8a 17 04 00 83 | max(e,excluded.e);VACUUM..^..... |
bb700 | 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 22 61 22 43 4f 4c 4c 41 54 45 20 6e 6f | ACREATE.TABLE.t1(a."a"COLLATE.no |
bb720 | 63 61 73 65 2c 22 62 22 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 | case,"b"NTEGER,.c.TEXT,.d.BLOB,. |
bb740 | 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | e.ANY,.....UNIQUE(a).ON.CONFLICT |
bb760 | 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 | .ignore,.....PRIMARY.KEY(b),.... |
bb780 | 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 | .UNIQUE(c).ON.CONFLICT.fail.).WI |
bb7a0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e | THOUT.ROWID;.CREATE.INDEX.t1d.ON |
bb7c0 | 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 81 50 8a 16 04 | .t1(d);ANALYZE.TEMP;VACUUM..P... |
bb7e0 | 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 22 61 22 2c 22 62 22 55 4e 49 51 | ..%CREATE.TABLE.t1(a."a","b"UNIQ |
bb800 | 55 45 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 | UE,.c.TEXT,.d.BLOB,.e.ANY,.....U |
bb820 | 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 | NIQUE(a).ON.CONFLICT.ignore,.... |
bb840 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(b),.....UNIQUE(c).O |
bb860 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
bb880 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 | .CREATE.INDEX.t1d.ON.t1(d);ANALY |
bb8a0 | 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 81 50 8a 15 04 00 83 25 43 52 45 41 54 45 20 54 41 | ZE.TEMP;VACUUM..P.....%CREATE.TA |
bb8c0 | 42 4c 45 20 74 31 28 61 20 22 61 22 2c 22 62 22 4e 54 45 47 45 52 2c 20 63 20 d4 45 58 54 2c 20 | BLE.t1(a."a","b"NTEGER,.c..EXT,. |
bb8e0 | 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 | d.BLOB,.e.ANY,.....UNIQUE(a).ON. |
bb900 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
bb920 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
bb940 | 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 | ail.).WITHOUT.ROWID;.CREATE.INDE |
bb960 | 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 | X.t1d.ON.t1(d);ANALYZE.TEMP;VACU |
bb980 | 55 4d 0a 81 50 8a 14 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 22 61 22 | UM..P.....%CREATE.TABLE.t1(a."a" |
bb9a0 | 2c 22 62 22 20 60 61 60 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e | ,"b".`a`ER,.c.TEXT,.d.BLOB,.e.AN |
bb9c0 | 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | Y,.....UNIQUE(a).ON.CONFLICT.ign |
bb9e0 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
bba00 | 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c).ON.CONFLICT.fail.).WITHOU |
bba20 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | T.ROWID;.CREATE.INDEX.t1d.ON.t1( |
bba40 | 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 81 50 8a 13 04 00 83 25 43 | d);ANALYZE.TEMP;VACUUM..P.....%C |
bba60 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 09 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 | REATE.TABLE.t1(a..NT,b.INTEGER,. |
bba80 | 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 45 58 50 4c 41 49 4e 20 51 55 45 52 59 | c.TEXT,.d.BLOB,.e.AEXPLAIN.QUERY |
bbaa0 | 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 | .PLANON.CONFLICT.ignore,.....PRI |
bbac0 | 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f | MARY.KEY(b),.....UNIQUE(c).ON.CO |
bbae0 | 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | NFLICT.fail.).WITHOUT.ROWID;.CRE |
bbb00 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 | ATE.INDEX.t1d.ON.t1(d);ANALYZE.T |
bbb20 | 45 4d 50 3b 56 41 43 55 55 4d 0a 82 6e 8a 12 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 | EMP;VACUUM..n.....aCREATE.TABLE. |
bbb40 | 74 31 28 61 0c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 42 4c | t1(a.INT,b,INTEGER,.c,TEXT,.d.BL |
bbb60 | 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 | OB,.e,ANY,.....UNIQUE(a).ON.CONF |
bbb80 | 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c | LICT.ignore,.....PRIMARY.KEY(b), |
bbba0 | 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a | .....UNIQUE(c).ON.CONFLICT.fail. |
bbbc0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 | ).WITHOUT.ROWID;.CREATE.INDEX.t1 |
bbbe0 | 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | d.ON.t1(d);.CREATE.UNIQUE.INDEX. |
bbc00 | 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | t1e.ON.t1(e);.INSERT.INTO.t1(a,b |
bbc20 | 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e | ,c,d,e).VALUES(1,2,'abc','b3',3. |
bbc40 | 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 | 5);.INSERT.INTO.t1.VALUES(2,2,'x |
bbc60 | 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f | yz',NULL,4.25).ON.CONFLICT(b).DO |
bbc80 | 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 81 5d 8a | .UPDATE.SET.e=max(e,excd.e);..]. |
bbca0 | 11 04 00 83 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 57 49 54 48 4f 55 54 20 52 4f 57 | ....?CREATE.TABLE.t1(WITHOUT.ROW |
bbcc0 | 49 44 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f | IDa.INT,b.INTEGER,.c.TEXT,.d.BLO |
bbce0 | 42 2c 20 65 20 41 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c | B,.e.AEXPLAIN.QUERY.PLANON.CONFL |
bbd00 | 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a | ICT.ignore,.....PRIMARY.KEY(b),. |
bbd20 | 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 | ....UNIQUE(c).ON.CONFLICT.fail.) |
bbd40 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .WITHOUT.ROWID;.CREATE.INDEX.t1d |
bbd60 | 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 81 09 | .ON.t1(d);ANALYZE.TEMP;VACUUM... |
bbd80 | 8a 10 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 57 49 54 48 20 49 4e 54 2c 57 | ......CREATE.TABLE.t1(WITH.INT,W |
bbda0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | ITHOUT.ROWIDUE,...c.INT.DEFAULT. |
bbdc0 | 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 20 52 4f 57 49 | 0,...PRIMARY.KEY(a,b).).WIT.ROWI |
bbde0 | 44 3b 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | D;,(3,4),(1,2)ON.CONFLICT(a,b).D |
bbe00 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 25 8a 0f 04 00 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..%.....OCREATE.TABLE. |
bbe20 | 74 31 28 49 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 | t1(I,b,c,d,PRIMARY.KEY(b,d));.WI |
bbe40 | 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c | TH.data(a,b,c,d).AS.(VALUES(1,2, |
bbe60 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 | 3,4),(5,6,7,8),(9,10,11,12)).INS |
bbe80 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 | ERT.INTO.t1(a,b,c,d).SELECT.*.FR |
bbea0 | 4f 4d 28 28 62 2c 64 29 20 61 2c 62 20 55 50 29 20 55 50 0a 81 21 8a 0e 04 00 82 47 43 52 45 41 | OM((b,d).a,b.UP).UP..!.....GCREA |
bbec0 | 54 45 20 54 41 42 4c 45 20 74 31 28 49 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t1(I,b,c,d,PRIMARY.KEY( |
bbee0 | 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 | b,d));.WITH.data(a,b,c,d).AS.(VA |
bbf00 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 | LUES(1,2,3,4),(5,6,7,8),(9,10,11 |
bbf20 | 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 | ,12)).INSERT.INTO.t1(a,b,c,d).SE |
bbf40 | 4c 45 43 54 20 2a 20 46 52 4f 4d 28 28 62 2c 64 29 20 55 50 29 20 55 50 0a 81 23 8a 0d 04 00 82 | LECT.*.FROM((b,d).UP).UP..#..... |
bbf60 | 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 49 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | KCREATE.TABLE.t1(I,b,c,d,PRIMARY |
bbf80 | 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 | .KEY(b,d));.WITH.data(a,b,c,d).A |
bbfa0 | 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | S.(VALUES(1,2,3,4),(5,6,7,8),(9, |
bbfc0 | 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c | 10,11,12)).INSERT.INTO.t1(a,b,c, |
bbfe0 | 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 28 62 2c 64 29 4f 4e 20 55 50 29 20 55 50 0a | d).SELECT.*.FROM.(b,d)ON.UP).UP. |
bc000 | 0d 00 00 00 0c 02 21 00 1d 7b 1b 6e 18 eb 16 68 14 59 11 a1 0f 0d 0c 7a 09 e5 07 4e 04 b7 02 21 | ......!..{.n...h.Y.....z...N...! |
bc020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
bc220 | 00 85 12 8a 2e 04 00 8a 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ........)CREATE.TABLE.t1(a.INT); |
bc240 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.'a''b'(v,INTEGER.P |
bc260 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
bc280 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
bc2a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
bc2c0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
bc2e0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
bc300 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
bc320 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
bc340 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
bc360 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
bc380 | 6c 64 2e 61 3b 0a 20 57 49 54 48 20 41 42 4f 52 54 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 | ld.a;..WITH.ABORTc(x).AS.(values |
bc3a0 | 28 31 29 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b 0a 43 52 | (1)).VALUES(new.a,1)...;.END;.CR |
bc3c0 | 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | EALICT(v).DO.UT.n=n+1;.END;.CREA |
bc3e0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
bc400 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
bc420 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 | E.v=old.a.AND.n==1;............. |
bc440 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | ...............UPDATE.counts.SET |
bc460 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
bc480 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
bc4a0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 13 8a 2d 04 00 8a 2b 43 | 3),(1),(3),(2),(4),(7);...-...+C |
bc4c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
bc4e0 | 42 4c 45 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.'a''b'(v,INTEGER.PRIMARY.KEY |
bc500 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
bc520 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
bc540 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
bc560 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
bc580 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
bc5a0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
bc5c0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
bc5e0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
bc600 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 57 49 54 | ts.SET.n=n-1.WHERE.v=old.a;..WIT |
bc620 | 48 20 2f 2a 20 2a 2f 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 | H./*.*/.c(x).AS.(values(1)).VALU |
bc640 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 | ES(new.a,1)...;.END;.CREALICT(v) |
bc660 | 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | .DO.UT.n=n+1;.END;.CREATE.TRIGGE |
bc680 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
bc6a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
bc6c0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 | .AND.n==1;...................... |
bc6e0 | a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | ......UPDATE.counts.SET.n=n-1.WH |
bc700 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
bc720 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
bc740 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 13 8a 2c 04 00 8a 2b 43 52 45 41 54 45 20 54 41 42 | ),(2),(4),(7);...,...+CREATE.TAB |
bc760 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 | LE.t1(a.INT);.CREATE.TABLE.'a''b |
bc780 | 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | '(v,INTEGER.PRIMARY.KEY,.n.INT)/ |
bc7a0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
bc7c0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
bc7e0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
bc800 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
bc820 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
bc840 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
bc860 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
bc880 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
bc8a0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
bc8c0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 2f 2a | .counts(v,n).VALUES(new.a,1)../* |
bc8e0 | 20 2a 2f 20 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d | .*/..;.END;.CREALICT(v).DO.UT.n= |
bc900 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
bc920 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
bc940 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
bc960 | 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 | ;............................UPD |
bc980 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
bc9a0 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
bc9c0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
bc9e0 | 2c 28 37 29 3b 85 11 8a 2b 04 00 8a 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ,(7);...+...'CREATE.TABLE.t1(a.I |
bca00 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 | NT);.CREATE.TABLE.'a''b'(v,INTEG |
bca20 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
bca40 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
bca60 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
bca80 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
bcaa0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
bcac0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
bcae0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
bcb00 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
bcb20 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
bcb40 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 43 41 53 45 63 6f 75 6e | .v=old.a;...INSERT.INTO.CASEcoun |
bcb60 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b | ts(v,n).VALUES(new.a,1)...;.END; |
bcb80 | 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | .CREALICT(v).DO.UT.n=n+1;.END;.C |
bcba0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
bcbc0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
bcbe0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 | HERE.v=old.a.AND.n==1;.......... |
bcc00 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | ..................UPDATE.counts. |
bcc20 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
bcc40 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
bcc60 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 0f 8a 2a 04 00 | ),(3),(1),(3),(2),(4),(7);...*.. |
bcc80 | 8a 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .#CREATE.TABLE.t1(a.INT);.CREATE |
bcca0 | 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.'a''b'(v,INTEGER.PRIMARY. |
bccc0 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
bcce0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
bcd00 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
bcd20 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
bcd40 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
bcd60 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
bcd80 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
bcda0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
bcdc0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
bcde0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 41 53 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | .INSERT.INTO.AScounts(v,n).VALUE |
bce00 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 | S(new.a,1)...;.END;.CREALICT(v). |
bce20 | 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | DO.UT.n=n+1;.END;.CREATE.TRIGGER |
bce40 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
bce60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
bce80 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 | AND.n==1;....................... |
bcea0 | a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | .....UPDATE.counts.SET.n=n-1.WHE |
bcec0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
bcee0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
bcf00 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 10 8a 29 04 00 8a 25 43 52 45 41 54 45 20 54 41 42 4c | ,(2),(4),(7);...)...%CREATE.TABL |
bcf20 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 | E.t1(a.INT);.CREATE.TABLE.'a''b' |
bcf40 | 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v,INTEGER.PRIMARY.KEY,.n.INT)/* |
bcf60 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
bcf80 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
bcfa0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
bcfc0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
bcfe0 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
bd000 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
bd020 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
bd040 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
bd060 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
bd080 | 41 44 44 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | ADDcounts(v,n).VALUES(new.a,1).. |
bd0a0 | 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b | .;.END;.CREALICT(v).DO.UT.n=n+1; |
bd0c0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
bd0e0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
bd100 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 | ounts.WHERE.v=old.a.AND.n==1;... |
bd120 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 | .........................UPDATE. |
bd140 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
bd160 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
bd180 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
bd1a0 | 3b 85 34 8a 28 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ;.4.(...mCREATE.TABLE.t1(a.INT); |
bd1c0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.'a''b'(v.INTEGER.P |
bd1e0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
bd200 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
bd220 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
bd240 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
bd260 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
bd280 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
bd2a0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
bd2c0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
bd2e0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
bd300 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
bd320 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
bd340 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
bd360 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
bd380 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
bd3a0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
bd3c0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
bd3e0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
bd400 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
bd420 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
bd440 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0b 8a 27 04 00 88 | ELETE.FROM.t1.WHERE.a=7;....'... |
bd460 | 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .CREATE.TABLE.t1(a.INT);.CREATE. |
bd480 | 54 41 42 4c 45 20 27 61 27 27 41 44 44 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TABLE.'a''ADDb'(v,INTEGER.PRIMAR |
bd4a0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 57 49 54 48 4f 55 | Y.KEY,.n.INT)/*WUT.ROWID*/WITHOU |
bd4c0 | 54 20 52 4f 57 49 44 47 45 52 20 72 31 20 41 46 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | T.ROWIDGER.r1.AFTE.TRIGGER.r2.AF |
bd4e0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
bd500 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
bd520 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
bd540 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
bd560 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
bd580 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
bd5a0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
bd5c0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
bd5e0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
bd600 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
bd620 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
bd640 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
bd660 | 28 34 29 2c 28 37 29 3b 84 7f 8a 26 04 00 8a 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | (4),(7);...&....CREATE.TABLE.t1( |
bd680 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 41 44 44 62 27 28 76 | a.INT);.CREATE.TABLE.'a''ADDb'(v |
bd6a0 | 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | ,INTEGER.PRIMARY.KEY,.n.INT)/*WU |
bd6c0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
bd6e0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
bd700 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
bd720 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
bd740 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
bd760 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
bd780 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
bd7a0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
bd7c0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | .WHERE.v=old.a;...INSERT.INTO.co |
bd7e0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
bd800 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
bd820 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r3.AFTER |
bd840 | 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .DELETE.ON.t1.BEGIN...DELETE.FRO |
bd860 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
bd880 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
bd8a0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
bd8c0 | 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 | .VALUES(1),(2),(1),(3),(1),(3),( |
bd8e0 | 32 29 2c 28 34 29 2c 28 37 29 3b 84 7f 8a 25 04 00 8a 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 | 2),(4),(7);...%....CREATE.TABLE. |
bd900 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 41 44 44 62 | t1(a.INT);.CREATE.TABLE.'a''ADDb |
bd920 | 27 28 76 0c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | '(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
bd940 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
bd960 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
bd980 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
bd9a0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
bd9c0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
bd9e0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
bda00 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
bda20 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
bda40 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
bda60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
bda80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
bdaa0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
bdac0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
bdae0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
bdb00 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
bdb20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
bdb40 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
bdb60 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 09 8a 24 04 00 88 17 43 52 45 41 54 45 20 54 41 42 | ),(2),(4),(7);...$....CREATE.TAB |
bdb80 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 41 | LE.t1(a.INT);.CREATE.TABLE.'a''A |
bdba0 | 42 4f 52 54 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | BORTb'(v,INTEGER.PRIMARY.KEY,.n. |
bdbc0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 57 49 54 48 4f 55 54 20 52 4f 57 49 44 47 45 | INT)/*WUT.ROWID*/WITHOUT.ROWIDGE |
bdbe0 | 52 20 72 31 20 41 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | R.r1.ATRIGGER.r2.AFTER.UPDATE.ON |
bdc00 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
bdc20 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
bdc40 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
bdc60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
bdc80 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
bdca0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
bdcc0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
bdce0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
bdd00 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
bdd20 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
bdd40 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
bdd60 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 01 8a 23 04 | 1),(3),(1),(3),(2),(4),(7);...#. |
bdd80 | 00 8a 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
bdda0 | 45 20 54 41 42 4c 45 20 27 61 27 27 41 42 4f 52 54 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 | E.TABLE.'a''ABORTb'(v,INTEGER.PR |
bddc0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
bdde0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
bde00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
bde20 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
bde40 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
bde60 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
bde80 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
bdea0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
bdec0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
bdee0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
bdf00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
bdf20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
bdf40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
bdf60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
bdf80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
bdfa0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
bdfc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
bdfe0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
be000 | 0d 00 00 00 0e 00 b0 00 1d 6c 1a d4 18 41 15 ac 13 1b 10 8a 0f df 0f 32 0e 82 0b ab 08 f3 06 30 | .........l...A.........2.......0 |
be020 | 03 70 00 b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .p.............................. |
be040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
be060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
be080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 42 | ...............................B |
be0a0 | 8a 3c 04 00 8b 09 43 52 45 41 54 45 20 54 41 42 85 3c 8a 3c 04 00 8a 7d 43 52 45 41 54 45 20 54 | .<....CREATE.TAB.<.<...}CREATE.T |
be0c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
be0e0 | 6e 74 73 28 76 20 49 4e 54 45 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTE9ER.PRIMARY.KEY,.n.INT |
be100 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
be120 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
be140 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
be160 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
be180 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
be1a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
be1c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f | .DELETE.FROM.counts.WHERE.v=.jso |
be1e0 | 6e 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | n(1)COLLATE.nocase;...UPDATE.cou |
be200 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
be220 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
be240 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
be260 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
be280 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
be2a0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
be2c0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
be2e0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 b6 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v.old.a;.END;.INSE |
be300 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
be320 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
be340 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=1;.DELETE.FRO |
be360 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3c 8a 3b 04 00 8a 7d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..<.;...}CREATE.T |
be380 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
be3a0 | 6e 74 73 28 76 20 49 4e 54 45 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTE9ER.PRIMARY.KEY,.n.INT |
be3c0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
be3e0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
be400 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
be420 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
be440 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
be460 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
be480 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f | .DELETE.FROM.counts.WHERE.v=.jso |
be4a0 | 6e 28 30 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | n(0)COLLATE.nocase;...UPDATE.cou |
be4c0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
be4e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
be500 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
be520 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
be540 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
be560 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
be580 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
be5a0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 b6 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v.old.a;.END;.INSE |
be5c0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
be5e0 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
be600 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
be620 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3f 8a 3a 04 00 8b 03 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..?.:....CREATE.T |
be640 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
be660 | 6e 74 73 28 76 20 49 4e 54 45 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTE9ER.PRIMARY.KEY,.n.INT |
be680 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
be6a0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
be6c0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
be6e0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
be700 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
be720 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
be740 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f | .DELETE.FROM.counts.WHERE.v=.jso |
be760 | 6e 28 20 2d 31 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 3b 0a 20 20 55 50 44 41 54 45 20 | n(.-11)COLLATE.nocase;...UPDATE. |
be780 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
be7a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
be7c0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
be7e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
be800 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
be820 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
be840 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
be860 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 b6 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v.old.a;.END;.I |
be880 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
be8a0 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
be8c0 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
be8e0 | 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8a 39 04 00 8a 6d 43 52 45 41 54 | FROM.t1.WHERE.a=7;..4.9...mCREAT |
be900 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
be920 | 63 6f 75 6e 74 73 28 76 20 29 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.)NTEGER.PRIMARY.KEY,.n. |
be940 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
be960 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
be980 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
be9a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
be9c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
be9e0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
bea00 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
bea20 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
bea40 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
bea60 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
bea80 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
beaa0 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
beac0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
beae0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
beb00 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
beb20 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
beb40 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
beb60 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
beb80 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
beba0 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 53 8a 38 04 00 8b 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..S.8...+CREATE.TABLE. |
bebc0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 71 28 76 | t1(a.INT);.CREATE.TABLE.countq(v |
bebe0 | 20 49 4e 54 45 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTE9ER.PRIMARY.KEY,.n.INT)/*WU |
bec00 | 54 ff 52 47 45 52 20 70 37 20 41 46 54 45 33 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | T.RGER.p7.AFTE3.INSERT.ON.t1.BEG |
bec20 | 49 4e 0a 02 20 49 4e 53 45 52 54 20 49 4e 54 4f 43 48 45 43 4b 20 63 6f 75 6e 74 73 28 77 2c 6e | IN...INSERT.INTOCHECK.counts(w,n |
bec40 | 29 20 56 41 34 55 45 53 28 6e 65 77 2e 2a 2a 2a 2a 2a 52 49 ff 7f 54 20 4f 4e 20 43 4f 4e 46 4c | ).VA4UES(new.*****RI..T.ON.CONFL |
bec60 | 2c 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ,CT(v).DO.UPDATE.SET.n=n+1;.END; |
bec80 | 0a 43 52 45 41 54 45 20 54 49 4e 54 47 45 52 20 72 32 20 41 47 54 45 52 64 6f 6d 45 20 52 45 20 | .CREATE.TINTGER.r2.AGTERdomE.RE. |
beca0 | fa 00 00 fa 0a 44 45 4c 45 54 45 20 46 3e 52 20 55 50 1e 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | .....DELETE.F>R.UP.ATE.ON.t1.BEG |
becc0 | 49 4e 0a 20 20 44 45 4c 4c 4e 45 20 46 52 4f 4d 3e 63 6f 75 6e 74 73 20 4d 48 45 52 45 20 76 3d | IN...DELLNE.FROM>counts.MHERE.v= |
bece0 | 20 6a 65 6f 6e 5f 70 61 72 73 65 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | .jeon_parse(1);...UPDATE.counts. |
bed00 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 64 6f 6d 45 20 52 45 20 fa 00 ff 7f 0a 44 45 4c 45 54 | SET.n=n-1.WHERdomE.RE......DELET |
bed20 | 45 20 46 3e 4f 4d 20 74 31 20 57 48 45 52 45 20 61 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | E.F>OM.t1.WHERE.av,n).VALUES(new |
bed40 | 3f 61 7f 31 29 0a 20 20 20 1b 20 20 4f 4e 20 2a 4f 4e 46 4c 41 34 55 45 53 28 6e 65 77 2e 2a 2a | ?a.1).......ON.*ONFLA4UES(new.** |
bed60 | 2a 2a 2a 52 49 ff 49 43 40 00 00 00 20 21 4f 20 55 50 44 41 54 61 40 53 2a 2a 2a 2a 2a 52 49 ff | ***RI.IC@....!O.UPDATa@S*****RI. |
bed80 | 7f 54 20 4f 4e 20 43 4f 4e 45 41 54 45 20 54 52 49 47 41 54 45 20 54 41 42 4c 45 20 74 52 20 44 | .T.ON.CONEATE.TRIGATE.TABLE.tR.D |
beda0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 ff 49 4e 0a 20 20 44 45 4c 2b 54 45 20 46 52 4f 4d 67 | ELETE.ON.t1.BE.IN...DEL+TE.FROMg |
bedc0 | 65 74 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 20 37 50 44 41 54 45 20 63 6f 75 | etunts.WHERE.v=old.a..7PDATE.cou |
bede0 | 6e 74 73 20 53 45 31 3b 0a 45 54 20 6e 3d 6e 2d 31 20 57 48 74 65 73 74 31 45 52 45 20 76 b6 6f | nts.SE1;.ET.n=n-1.WHtest1ERE.v.o |
bee00 | 6c 64 2e 61 3b 64 45 4e 45 20 76 3d 20 6a 4c 6f 6e 5f 70 61 72 73 65 28 31 29 3b 0a 20 20 55 50 | ld.a;dENE.v=.jLon_parse(1);...UP |
bee20 | 44 41 54 45 20 00 00 00 20 3b 0a 49 4e 53 45 52 54 20 49 4e 3b 0a 55 50 44 41 54 45 20 74 31 20 | DATE.....;.INSERT.IN;.UPDATE.t1. |
bee40 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 49 43 54 3e 76 47 20 21 4f 20 55 50 44 41 54 45 40 53 | SET.a=5.WHERE.ICT>vG.!O.UPDATE@S |
bee60 | 2a 2a 2a 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 65 63 6f 72 64 57 48 45 52 45 20 61 3d 37 | ***a=4;.DELETE.FROecordWHERE.a=7 |
bee80 | 3b 0a 81 2c 8a 37 04 00 82 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..,.7...]CREATE.TABLE.t1(a.INT) |
beea0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 2f 2a 20 2a 2f 73 51 55 45 52 59 28 76 20 49 4e 54 | ;.CREATE.TABLE./*.*/sQUERY(v.INT |
beec0 | 45 5a 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EZER.PRIMARY.KEY,.n.INT)/*WUT.RO |
beee0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r3.AFTER.I |
bef00 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | NSERT.ON.t1.BEGIN..VALUES(new.a, |
bef20 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 37 3b 0a 81 29 8a 36 04 00 82 57 43 52 45 41 54 45 | 1).......ON.CON7;..).6...WCREATE |
bef40 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 2f | .TABLE.t1(a.INT);.CREATE.TABLE./ |
bef60 | 2a 20 2a 2f 73 28 76 20 49 4e 54 45 5a 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | *.*/s(v.INTEZER.PRIMARY.KEY,.n.I |
bef80 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
befa0 | 20 72 33 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 56 41 | .r3.AFTER.INSERT.ON.t1.BEGIN..VA |
befc0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 2f 2a 20 2a 2f 20 20 4f 4e 20 43 0a 81 | LUES(new.a,1)....../*.*/..ON.C.. |
befe0 | 27 8a 35 04 00 82 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | '.5...SCREATE.TABLE.t1(a.INT);.C |
bf000 | 52 45 41 54 45 20 54 41 42 4c 45 20 2f 2a 20 2a 2f 73 28 76 20 49 4e 54 45 5a 45 52 20 50 52 49 | REATE.TABLE./*.*/s(v.INTEZER.PRI |
bf020 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
bf040 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r3.AFTER.INSERT.ON |
bf060 | 20 53 28 27 42 45 47 49 4e 0a 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | .S('BEGIN..VALUES(new.a,1)...... |
bf080 | 20 4f 4e 20 43 4f 4e 37 3b 0a 85 0d 8a 34 04 00 8a 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .ON.CON7;....4....CREATE.TABLE.t |
bf0a0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 2c | 1(a.INT);.CREATE.TABLE.'a''b'(v, |
bf0c0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
bf0e0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
bf100 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
bf120 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
bf140 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
bf160 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
bf180 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
bf1a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
bf1c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
bf1e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c | WHERE.v=old.a;.WITH.c(x).AS.(val |
bf200 | 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 | ues(1))..VALUES(new.a,1)...;.END |
bf220 | 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | ;.CREALICT(v).DO.UT.n=n+1;.END;. |
bf240 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
bf260 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
bf280 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 | WHERE.v=old.a.AND.n==1;......... |
bf2a0 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | ...................UPDATE.counts |
bf2c0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
bf2e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
bf300 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 0d 8a 33 04 | 1),(3),(1),(3),(2),(4),(7);...3. |
bf320 | 00 8a 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
bf340 | 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.'a''b'(v,INTEGER.PRIMARY |
bf360 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
bf380 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
bf3a0 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
bf3c0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
bf3e0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
bf400 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
bf420 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
bf440 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
bf460 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
bf480 | 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 | .WITH.c(x).AS.(values(1)).VALUES |
bf4a0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 | (new.a,1)...;.END;.CREALICT(v).D |
bf4c0 | 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | O.UT.n=n+1;.END;.CREATE.TRIGGER. |
bf4e0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
bf500 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
bf520 | 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 | ND.n==1;........................ |
bf540 | a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ....UPDATE.counts.SET.n=n-1.WHER |
bf560 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
bf580 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
bf5a0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 11 8a 32 04 00 8a 27 43 52 45 41 54 45 20 54 41 42 4c 45 | (2),(4),(7);...2...'CREATE.TABLE |
bf5c0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 | .t1(a.INT);.CREATE.TABLE.'a''b'( |
bf5e0 | 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v,INTEGER.PRIMARY.KEY,.n.INT)/*W |
bf600 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
bf620 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
bf640 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
bf660 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
bf680 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
bf6a0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
bf6c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
bf6e0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
bf700 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 57 49 54 48 20 43 41 53 45 63 28 78 29 20 | 1.WHERE.v=old.a;..WITH.CASEc(x). |
bf720 | 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | AS.(values(1)).VALUES(new.a,1).. |
bf740 | 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b | .;.END;.CREALICT(v).DO.UT.n=n+1; |
bf760 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
bf780 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
bf7a0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 | ounts.WHERE.v=old.a.AND.n==1;... |
bf7c0 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 | .........................UPDATE. |
bf7e0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
bf800 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
bf820 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
bf840 | 3b 85 0f 8a 31 04 00 8a 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ;...1...#CREATE.TABLE.t1(a.INT); |
bf860 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.'a''b'(v,INTEGER.P |
bf880 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
bf8a0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
bf8c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
bf8e0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
bf900 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
bf920 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
bf940 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
bf960 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
bf980 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
bf9a0 | 6c 64 2e 61 3b 0a 20 57 49 54 48 20 41 53 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 | ld.a;..WITH.ASc(x).AS.(values(1) |
bf9c0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c | ).VALUES(new.a,1)...;.END;.CREAL |
bf9e0 | 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | ICT(v).DO.UT.n=n+1;.END;.CREATE. |
bfa00 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
bfa20 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
bfa40 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 | =old.a.AND.n==1;................ |
bfa60 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | ............UPDATE.counts.SET.n= |
bfa80 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
bfaa0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
bfac0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 14 8a 30 04 00 8a 2d 43 52 45 41 | (1),(3),(2),(4),(7);...0...-CREA |
bfae0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
bfb00 | 20 27 61 27 27 62 27 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .'a''b'(v,INTEGER.PRIMARY.KEY,.n |
bfb20 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
bfb40 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
bfb60 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
bfb80 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
bfba0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
bfbc0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
bfbe0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
bfc00 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
bfc20 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 57 49 54 48 20 41 | SET.n=n-1.WHERE.v=old.a;..WITH.A |
bfc40 | 4e 41 4c 59 5a 45 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 | NALYZEc(x).AS.(values(1)).VALUES |
bfc60 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 | (new.a,1)...;.END;.CREALICT(v).D |
bfc80 | 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | O.UT.n=n+1;.END;.CREATE.TRIGGER. |
bfca0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
bfcc0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
bfce0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 | ND.n==1;........................ |
bfd00 | a7 a7 a7 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ....UPDATE.counts.SET.n=n-1.WHER |
bfd20 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
bfd40 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
bfd60 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 10 8a 2f 04 00 8a 25 43 52 45 41 54 45 20 54 41 42 4c 45 | (2),(4),(7);.../...%CREATE.TABLE |
bfd80 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 27 61 27 27 62 27 28 | .t1(a.INT);.CREATE.TABLE.'a''b'( |
bfda0 | 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v,INTEGER.PRIMARY.KEY,.n.INT)/*W |
bfdc0 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
bfde0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
bfe00 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
bfe20 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
bfe40 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
bfe60 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
bfe80 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
bfea0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
bfec0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 57 49 54 48 20 41 44 44 63 28 78 29 20 41 | 1.WHERE.v=old.a;..WITH.ADDc(x).A |
bfee0 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | S.(values(1)).VALUES(new.a,1)... |
bff00 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 4c 49 43 54 28 76 29 20 44 4f 20 55 54 20 6e 3d 6e 2b 31 3b 0a | ;.END;.CREALICT(v).DO.UT.n=n+1;. |
bff20 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
bff40 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
bff60 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 a7 a7 | unts.WHERE.v=old.a.AND.n==1;.... |
bff80 | a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 a7 20 55 50 44 41 54 45 20 63 | ........................UPDATE.c |
bffa0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
bffc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
bffe0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
c0000 | 0d 17 bc 00 0c 00 39 00 1d 46 1a 86 17 d4 15 2c 12 9b 10 0d 0d 51 0a be 08 32 05 a9 02 f1 00 39 | ......9..F.....,.....Q...2.....9 |
c0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8a 48 04 00 8a | ..........................4.H... |
c0040 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
c0060 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
c0080 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
c00a0 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.DELETE.ON.t1.BE |
c00c0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
c00e0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
c0100 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
c0120 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
c0140 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
c0160 | 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=CURRENT_TIME=1;...UPDATE.co |
c0180 | 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 | unts.SET.n=CURRENT_TIMESTAMP;... |
c01a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
c01c0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
c01e0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
c0200 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
c0220 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
c0240 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
c0260 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
c0280 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
c02a0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
c02c0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a+4;.DELETE.FR |
c02e0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8a 47 04 00 8a 6d 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..4.G...mCREATE. |
c0300 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
c0320 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
c0340 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
c0360 | 72 31 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.DELETE.ON.t1.BEGIN...IN |
c0380 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
c03a0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
c03c0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
c03e0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.DELETE.ON.t1.BEGIN. |
c0400 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v>old |
c0420 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
c0440 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
c0460 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
c0480 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
c04a0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
c04c0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
c04e0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 bd 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v.old.a.AND |
c0500 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
c0520 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
c0540 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
c0560 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
c0580 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
c05a0 | 45 52 45 20 61 3d 37 3b 0a 85 05 8a 46 04 00 8a 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;....F....CREATE.TABLE.t1 |
c05c0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
c05e0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
c0600 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 27 61 27 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.'a'AFTER |
c0620 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
c0640 | 4f 20 41 42 4f 52 54 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | O.ABORTcounts(v,n).VALUES(new.a, |
c0660 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
c0680 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
c06a0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
c06c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
c06e0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
c0700 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c0720 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c0740 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c0760 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c0780 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c07a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c07c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c07e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
c0800 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c0820 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 0a 85 08 8a 45 04 00 8a 15 43 52 45 41 54 45 | ),(2),(4),(7);.UP....E....CREATE |
c0840 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
c0860 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
c0880 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
c08a0 | 20 20 27 61 27 27 62 27 27 61 27 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | ..'a''b''a'AFTER.INSERT.ON.t1.BE |
c08c0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 41 42 4f 52 54 63 6f 75 6e 74 73 28 76 2c | GIN...INSERT.INTO.ABORTcounts(v, |
c08e0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
c0900 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
c0920 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
c0940 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
c0960 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
c0980 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
c09a0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
c09c0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c09e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c0a00 | 54 45 20 54 52 49 47 47 45 52 20 27 61 27 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.'a'AFTER.DELETE.ON.t1 |
c0a20 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c0a40 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c0a60 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
c0a80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
c0aa0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 0f | ),(1),(3),(1),(3),(2),(4),(7);.. |
c0ac0 | 8a 44 04 00 8a 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .D...#CREATE.TABLE.t1(a.INT);.CR |
c0ae0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c0b00 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c0b20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 20 27 61 27 27 62 27 27 20 61 62 73 28 31 29 61 27 41 46 | EATE.TRIGGER..'a''b''.abs(1)a'AF |
c0b40 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
c0b60 | 49 4e 54 4f 20 41 42 4f 52 54 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | INTO.ABORTcounts(v,n).VALUES(new |
c0b80 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
c0ba0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
c0bc0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
c0be0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
c0c00 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
c0c20 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
c0c40 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
c0c60 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
c0c80 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
c0ca0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
c0cc0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
c0ce0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
c0d00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
c0d20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
c0d40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 38 8a 43 04 00 8a 75 43 52 45 41 54 45 20 | ,(3),(2),(4),(7);.8.C...uCREATE. |
c0d60 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
c0d80 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
c0da0 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
c0dc0 | 20 27 61 27 27 61 27 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | .'a''a'AFTER.INSERT.ON.t1.BEGIN. |
c0de0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
c0e00 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
c0e20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
c0e40 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
c0e60 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
c0e80 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
c0ea0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
c0ec0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
c0ee0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
c0f00 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
c0f20 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
c0f40 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
c0f60 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
c0f80 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
c0fa0 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
c0fc0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
c0fe0 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=5.WHERE.a=4;.DELETE.FROM.t |
c1000 | 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 0a 8a 42 04 00 8a 19 43 52 45 41 54 45 20 54 41 42 4c | 1.WHERE.a=7;....B....CREATE.TABL |
c1020 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
c1040 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
c1060 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 20 27 61 27 | WUT.ROWID*/;.CREATE.TRIGGER..'a' |
c1080 | 27 41 53 62 27 27 61 27 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | 'ASb''a'AFTER.INSERT.ON.t1.BEGIN |
c10a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 41 42 4f 52 54 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ...INSERT.INTO.ABORTcounts(v,n). |
c10c0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
c10e0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
c1100 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
c1120 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
c1140 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
c1160 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
c1180 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
c11a0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
c11c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
c11e0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
c1200 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
c1220 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
c1240 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
c1260 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
c1280 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 0d 8a 41 04 | 1),(3),(1),(3),(2),(4),(7);...A. |
c12a0 | 00 8a 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
c12c0 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
c12e0 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
c1300 | 45 20 54 52 49 47 47 45 52 20 20 27 61 27 27 41 42 4f 52 54 62 27 27 61 27 41 46 54 45 52 20 49 | E.TRIGGER..'a''ABORTb''a'AFTER.I |
c1320 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
c1340 | 41 42 4f 52 54 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | ABORTcounts(v,n).VALUES(new.a,1) |
c1360 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
c1380 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
c13a0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
c13c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
c13e0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
c1400 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
c1420 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
c1440 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
c1460 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
c1480 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
c14a0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
c14c0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
c14e0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
c1500 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
c1520 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 0c 8a 40 04 00 8a 1d 43 52 45 41 54 45 20 54 41 42 4c 45 | (2),(4),(7);...@....CREATE.TABLE |
c1540 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
c1560 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
c1580 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 20 20 27 61 27 | UT.ROWID*/;.CREATE.TRIGGER...'a' |
c15a0 | 27 61 27 27 62 27 27 61 27 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | 'a''b''a'AFTER.INSERT.ON.t1.BEGI |
c15c0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 41 42 4f 52 54 63 6f 75 6e 74 73 28 76 2c 6e 29 | N...INSERT.INTO.ABORTcounts(v,n) |
c15e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
c1600 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
c1620 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
c1640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
c1660 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
c1680 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
c16a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
c16c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
c16e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
c1700 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
c1720 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
c1740 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
c1760 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
c1780 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
c17a0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 00 00 00 18 | (1),(3),(1),(3),(2),(4),(7);.... |
c17c0 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 85 2e 8a 3f 04 00 8a 61 43 52 45 41 | ...mCREATE.TABLE.t1(...?...aCREA |
c17e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
c1800 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTE9ER.PRIMARY.KEY,.n |
c1820 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
c1840 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
c1860 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
c1880 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
c18a0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
c18c0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
c18e0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
c1900 | 2b 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | +json(1);...UPDATE.counts.SET.n= |
c1920 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c1940 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c1960 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c1980 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c19a0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c19c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c19e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c1a00 | 45 52 45 20 76 b6 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v.old.a;.END;.INSERT.INTO.t1 |
c1a20 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c1a40 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
c1a60 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
c1a80 | 20 61 3d 37 3b 0a 85 3c 8a 3e 04 00 8a 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..<.>...}CREATE.TABLE.t1(a. |
c1aa0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
c1ac0 | 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | 9ER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
c1ae0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
c1b00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
c1b20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
c1b40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
c1b60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
c1b80 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
c1ba0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 43 4f 4c 4c 41 54 | OM.counts.WHERE.v=.json(1)COLLAT |
c1bc0 | 45 20 ee 6f 63 61 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | E..ocase;...UPDATE.counts.SET.n= |
c1be0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c1c00 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c1c20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c1c40 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c1c60 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c1c80 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c1ca0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c1cc0 | 45 52 45 20 76 b6 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v.old.a;.END;.INSERT.INTO.t1 |
c1ce0 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c1d00 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
c1d20 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
c1d40 | 20 61 3d 37 3b 0a 85 36 8a 3d 04 00 8a 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..6.=...qCREATE.TABLE.t1(a. |
c1d60 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
c1d80 | 39 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | 9ER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
c1da0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
c1dc0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
c1de0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
c1e00 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
c1e20 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
c1e40 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
c1e60 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 43 4f 4c 4c 41 54 | OM.counts.WHERE.v=.json(1)COLLAT |
c1e80 | 45 20 6e 6f 63 61 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | E.nocase;...UPDATE.counts.SET.n= |
c1ea0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c1ec0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c1ee0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c1f00 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c1f20 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c1f40 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c1f60 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c1f80 | 45 52 45 20 76 b6 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v.old.a;.END;.INSERT.INTO.t1 |
c1fa0 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c1fc0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
c1fe0 | 20 57 48 45 52 45 20 6a 73 6f 6e 28 31 29 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .WHERE.json(1)ROM.t1.WHERE.a=7;. |
c2000 | 0d 00 00 00 0c 02 60 00 1d 48 1a 90 17 d8 15 cb 13 be 11 b1 0f 14 0d 04 0a 48 07 b0 04 f8 02 60 | ......`..H...............H.....` |
c2020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c21a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c21c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c21e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c2260 | 85 14 8a 54 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...T...-CREATE.TABLE.t1(a.INT);. |
c2280 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
c22a0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
c22c0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
c22e0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
c2300 | 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | n,n).VALUES(new.a,1).......ON.CO |
c2320 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c2340 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
c2360 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c2380 | 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.randomblob(1)==1;...UP |
c23a0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
c23c0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
c23e0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c2400 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c2420 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c2440 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c2460 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c2480 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c24a0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
c24c0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
c24e0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 34 8a 53 04 00 8a 6d | .UPDATE.t1.SET.a=0.AND.t.4.S...m |
c2500 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
c2520 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
c2540 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
c2560 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
c2580 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(n,n).VAL |
c25a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c25c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c25e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
c2600 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c2620 | 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.random()AND.n==1;...UPDATE.cou |
c2640 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
c2660 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
c2680 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
c26a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
c26c0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
c26e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
c2700 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
c2720 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
c2740 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
c2760 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
c2780 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a-4;.DELETE.FRO |
c27a0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 14 8a 52 04 00 8a 2d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;....R...-CREATE.T |
c27c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
c27e0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
c2800 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
c2820 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
c2840 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(n,n).VALUES(new. |
c2860 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
c2880 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
c28a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
c28c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 63 6f 61 6c 65 73 | .DELETE.FROM.counts.WHERE.coales |
c28e0 | 63 65 28 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ce(1,1)==1;...UPDATE.counts.SET. |
c2900 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
c2920 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
c2940 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c2960 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
c2980 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
c29a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
c29c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c29e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c2a00 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c2a20 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c2a40 | 3d 30 20 41 4e 44 20 74 85 38 8a 51 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | =0.AND.t.8.Q...uCREATE.TABLE.t1( |
c2a60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c2a80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c2aa0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c2ac0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
c2ae0 | 20 63 6f 75 6e 74 73 28 20 61 2c 62 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | .counts(.a,bv,n).VALUES(new.a,1) |
c2b00 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
c2b20 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
c2b40 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
c2b60 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
c2b80 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
c2ba0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
c2bc0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
c2be0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
c2c00 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
c2c20 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
c2c40 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
c2c60 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
c2c80 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
c2ca0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
c2cc0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
c2ce0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
c2d00 | 3d 37 3b 0a 84 0c 8a 50 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;....P....CREATE.TABLE.t1(a.IN |
c2d20 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
c2d40 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
c2d60 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
c2d80 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
c2da0 | 2e 74 73 28 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .ts(nts.SET.n=n-1.WHERE.v=old.a; |
c2dc0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
c2de0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
c2e00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
c2e20 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
c2e40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
c2e60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
c2e80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
c2ea0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
c2ec0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
c2ee0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
c2f00 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 19 8a 4f 04 00 8a 37 43 52 45 41 | .FROM.t1.WHERE.a=7;....O...7CREA |
c2f20 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
c2f40 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
c2f60 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
c2f80 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
c2fa0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 76 2c 6e 29 20 56 41 4c 55 45 53 28 | ..DELETE.FROM.countsv,n).VALUES( |
c2fc0 | 76 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | vew.a,1).......ON.CONFLICT(v).DO |
c2fe0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
c3000 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
c3020 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 3d 6f 6c 64 2e 61 20 41 4e 45 20 63 6f | IN...DELETE.FROM.co=old.a.ANE.co |
c3040 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
c3060 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
c3080 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
c30a0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
c30c0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
c30e0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
c3100 | 64 00 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 00 00 00 6e 74 73 20 53 | d..a.AND.n==1;...UPDATE....nts.S |
c3120 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
c3140 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
c3160 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
c3180 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 9c 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;..ELETE.FR |
c31a0 | 4f 4d 20 74 31 2c 57 48 45 52 45 20 61 3d 37 3b 0a 84 09 8a 4e 04 00 88 17 43 52 45 41 54 45 20 | OM.t1,WHERE.a=7;....N....CREATE. |
c31c0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
c31e0 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
c3200 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
c3220 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 4d 41 54 43 48 74 2e 20 42 45 47 49 4e | r1.AFTER.INSERT.ON.MATCHt..BEGIN |
c3240 | 0a 20 20 49 4e 53 45 52 54 29 20 56 41 4c 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ...INSERT).VALnts.SET.n=n-1.WHER |
c3260 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
c3280 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
c32a0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c32c0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
c32e0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c3300 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
c3320 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
c3340 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
c3360 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
c3380 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
c33a0 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 09 | =4;.DELETE.FROM.t1.WHERE.a=7;... |
c33c0 | 8a 4d 04 00 88 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .M....CREATE.TABLE.t1(a.INT);.CR |
c33e0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c3400 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c3420 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
c3440 | 4d 41 49 4e 2e 74 2e 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 29 20 56 41 4c 6e 74 73 20 53 | MAIN.t..BEGIN...INSERT).VALnts.S |
c3460 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
c3480 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
c34a0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
c34c0 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
c34e0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
c3500 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
c3520 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
c3540 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
c3560 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
c3580 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
c35a0 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
c35c0 | 57 48 45 52 45 20 61 3d 37 3b 0a 84 09 8a 4c 04 00 88 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;....L....CREATE.TABLE. |
c35e0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
c3600 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
c3620 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
c3640 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 4d 41 49 43 48 74 2e 20 42 45 47 49 4e 0a 20 20 49 4e 53 | ER.INSERT.ON.MAICHt..BEGIN...INS |
c3660 | 45 52 54 29 20 56 41 4c 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | ERT).VALnts.SET.n=n-1.WHERE.v=ol |
c3680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
c36a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c36c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c36e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c3700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c3720 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c3740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c3760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
c3780 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
c37a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
c37c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8a 4b 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.K...m |
c37e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
c3800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
c3820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
c3840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.DELETE.ON.t1.BEG |
c3860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
c3880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c38a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c38c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
c38e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c3900 | 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v>old.a.AND.n==1;...UPDATE.cou |
c3920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v>old.a;...I |
c3940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
c3960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
c3980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
c39a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
c39c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
c39e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
c3a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
c3a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
c3a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
c3a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
c3a80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8a 4a 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.J...mCREATE.T |
c3aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
c3ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
c3ae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
c3b00 | 31 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.DELETE.ON.t1.BEGIN...INS |
c3b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
c3b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
c3b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
c3b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
c3ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v>old. |
c3bc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
c3be0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
c3c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
c3c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c3c40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
c3c60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
c3c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 bd 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v.old.a.AND. |
c3ca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c3cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c3ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c3d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c3d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
c3d40 | 52 45 20 61 3d 37 3b 0a 85 34 8a 49 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.I...mCREATE.TABLE.t1( |
c3d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c3d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c3da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c3dc0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | DELETE.ON.t1.BEGIN...INSERT.INTO |
c3de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c3e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c3e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
c3e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
c3e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c3e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c3ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
c3ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
c3ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
c3f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
c3f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
c3f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
c3f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
c3f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
c3fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
c3fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 2d 30 | (4),(7);.UPDATE.t1.SET.a=52001-0 |
c3fe0 | 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | 1-01;.DELETE.FROM.t1.WHERE.a=7;. |
c4000 | 0d 00 00 00 0c 00 c0 00 1d 68 1a d0 18 38 15 80 12 e8 10 50 0d b8 0b 20 08 88 05 f0 03 58 00 c0 | .........h...8.....P.........X.. |
c4020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c4040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c4080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c40a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c40c0 | 85 14 8a 60 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...`...-CREATE.TABLE.t1(a.INT);. |
c40e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
c4100 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
c4120 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
c4140 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
c4160 | 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | n,n).VALUES(new.a,1).......ON.CO |
c4180 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c41a0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
c41c0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c41e0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
c4200 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 26 6f 6c | DATE.counts.SET.n=n-1.WHERE.v&ol |
c4220 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
c4240 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c4260 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c4280 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c42a0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c42c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c42e0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c4300 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
c4320 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
c4340 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 14 8a 5f 04 00 8a 2d | .UPDATE.t1.SET.a=0.AND.t..._...- |
c4360 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
c4380 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
c43a0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
c43c0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
c43e0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(n,n).VAL |
c4400 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c4420 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c4440 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
c4460 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c4480 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c44a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 4f 52 20 74 72 75 65 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.OR.true=old.a;...I |
c44c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
c44e0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
c4500 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
c4520 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
c4540 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
c4560 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
c4580 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
c45a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
c45c0 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
c45e0 | 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 14 8a 5e 04 00 8a 2d 43 52 45 41 54 45 20 54 | t1.SET.a=0.AND.t...^...-CREATE.T |
c4600 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
c4620 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
c4640 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
c4660 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
c4680 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(n,n).VALUES(new. |
c46a0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
c46c0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
c46e0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
c4700 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
c4720 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
c4740 | 6e 3d 6e 2d 20 6d 61 78 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-.max(1,1)=old.a;...INSERT.IN |
c4760 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
c4780 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c47a0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
c47c0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
c47e0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
c4800 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c4820 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c4840 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c4860 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c4880 | 3d 30 20 41 4e 44 20 74 85 14 8a 5d 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | =0.AND.t...]...-CREATE.TABLE.t1( |
c48a0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c48c0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c48e0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c4900 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
c4920 | 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(n,n).VALUES(new.a,1).... |
c4940 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c4960 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
c4980 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
c49a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c49c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 73 71 6c 69 74 | =1;...UPDATE.counts.SET.n=.sqlit |
c49e0 | 65 5f 76 65 72 73 69 6f 6e 28 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | e_version();...INSERT.INTO.count |
c4a00 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
c4a20 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
c4a40 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
c4a60 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
c4a80 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
c4aa0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
c4ac0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
c4ae0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
c4b00 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 | (4),(7);.UPDATE.t1.SET.a=0.AND.t |
c4b20 | 85 14 8a 5c 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...\...-CREATE.TABLE.t1(a.INT);. |
c4b40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
c4b60 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
c4b80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
c4ba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
c4bc0 | 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | n,n).VALUES(new.a,1).......ON.CO |
c4be0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c4c00 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
c4c20 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c4c40 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
c4c60 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 31 29 3d 6f 6c | DATE.counts.SET.n=.round(1,1)=ol |
c4c80 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
c4ca0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c4cc0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c4ce0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c4d00 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c4d20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c4d40 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c4d60 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
c4d80 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
c4da0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 14 8a 5b 04 00 8a 2d | .UPDATE.t1.SET.a=0.AND.t...[...- |
c4dc0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
c4de0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
c4e00 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
c4e20 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
c4e40 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(n,n).VAL |
c4e60 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c4e80 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c4ea0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
c4ec0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c4ee0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c4f00 | 6e 74 73 20 53 45 54 20 6e 3d 20 6c 74 72 69 6d 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=.ltrim(1,1)=old.a;...I |
c4f20 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
c4f40 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
c4f60 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
c4f80 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
c4fa0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
c4fc0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
c4fe0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
c5000 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
c5020 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
c5040 | 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 14 8a 5a 04 00 8a 2d 43 52 45 41 54 45 20 54 | t1.SET.a=0.AND.t...Z...-CREATE.T |
c5060 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
c5080 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
c50a0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
c50c0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
c50e0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(n,n).VALUES(new. |
c5100 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
c5120 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
c5140 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
c5160 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
c5180 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
c51a0 | 6e 3d 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=.julianday(1,1,1);...INSERT.IN |
c51c0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
c51e0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c5200 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
c5220 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
c5240 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
c5260 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c5280 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c52a0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c52c0 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c52e0 | 3d 30 20 41 4e 44 20 74 85 14 8a 59 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | =0.AND.t...Y...-CREATE.TABLE.t1( |
c5300 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c5320 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c5340 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c5360 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
c5380 | 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(n,n).VALUES(new.a,1).... |
c53a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c53c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
c53e0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
c5400 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 20 3e 3d 20 6e 3d | FROM.counts.WHERE.v=old.a..>=.n= |
c5420 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c5440 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
c5460 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
c5480 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
c54a0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
c54c0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
c54e0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
c5500 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
c5520 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
c5540 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
c5560 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 | (4),(7);.UPDATE.t1.SET.a=0.AND.t |
c5580 | 85 34 8a 58 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.X...mCREATE.TABLE.t1(a.INT);. |
c55a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
c55c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
c55e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
c5600 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
c5620 | 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | n,n).VALUES(new.a,1).......ON.CO |
c5640 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c5660 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
c5680 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c56a0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=CURRENT_TIME=1;...UP |
c56c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 | DATE.counts.SET.n=CURRENT_TIMEST |
c56e0 | 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | AMP;...INSERT.INTO.counts(v,n).V |
c5700 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c5720 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c5740 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c5760 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c5780 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c57a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c57c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
c57e0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
c5800 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a+4;.DE |
c5820 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 14 8a 57 04 00 8a 2d | LETE.FROM.t1.WHERE.a=7;....W...- |
c5840 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
c5860 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
c5880 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
c58a0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
c58c0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(n,n).VAL |
c58e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c5900 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c5920 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
c5940 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c5960 | 45 20 76 3d 20 7a 65 72 6f 62 6c 6f 62 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=.zeroblob(1)=1;...UPDATE.cou |
c5980 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
c59a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
c59c0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
c59e0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
c5a00 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
c5a20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
c5a40 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
c5a60 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
c5a80 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
c5aa0 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
c5ac0 | 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 14 8a 56 04 00 8a 2d 43 52 45 41 54 45 20 54 | t1.SET.a=0.AND.t...V...-CREATE.T |
c5ae0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
c5b00 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
c5b20 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
c5b40 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
c5b60 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(n,n).VALUES(new. |
c5b80 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
c5ba0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
c5bc0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
c5be0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 69 6e 73 | .DELETE.FROM.counts.WHERE.v=.ins |
c5c00 | 74 72 28 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | tr(1,1)==1;...UPDATE.counts.SET. |
c5c20 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
c5c40 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
c5c60 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c5c80 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
c5ca0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
c5cc0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
c5ce0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c5d00 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c5d20 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c5d40 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c5d60 | 3d 30 20 41 4e 44 20 74 85 14 8a 55 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | =0.AND.t...U...-CREATE.TABLE.t1( |
c5d80 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c5da0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c5dc0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c5de0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
c5e00 | 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(n,n).VALUES(new.a,1).... |
c5e20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c5e40 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
c5e60 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
c5e80 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 64 61 74 65 28 31 2c 31 2c 31 29 | FROM.counts.WHERE.v=.date(1,1,1) |
c5ea0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c5ec0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
c5ee0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
c5f00 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
c5f20 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
c5f40 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
c5f60 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
c5f80 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
c5fa0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
c5fc0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
c5fe0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 | (4),(7);.UPDATE.t1.SET.a=0.AND.t |
c6000 | 0d 00 00 00 0d 00 7d 00 1d 68 1a a9 18 11 15 6e 12 cb 10 60 0d c8 0b ba 09 aa 07 27 04 a3 02 93 | ......}..h.....n...`.......'.... |
c6020 | 00 7d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .}.............................. |
c6040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 12 8a | ................................ |
c6080 | 6d 04 00 88 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | m...)CREATE.TABLE.t1(a.INT);.CRE |
c60a0 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
c60c0 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
c60e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
c6100 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
c6120 | 29 20 53 45 4c 45 43 54 20 61 2c 62 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 48 41 56 49 4e | ).SELECT.a,b(new.a,1)......HAVIN |
c6140 | 47 20 cf 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 20 63 6f 75 6e | G..N.CONFLICT(v).DO.UPDATE..coun |
c6160 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
c6180 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
c61a0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
c61c0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
c61e0 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
c6200 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
c6220 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
c6240 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
c6260 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
c6280 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 84 0c 8a 6c 04 00 88 1d 43 52 45 41 54 | 3),(1),(3),(2),(4),...l....CREAT |
c62a0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
c62c0 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
c62e0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
c6300 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
c6320 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 20 61 | INSERT.INTO.counts(v,n).SELECT.a |
c6340 | 2c 62 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 cf 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ,b(new.a,1)........N.CONFLICT(v) |
c6360 | 20 44 4f 20 55 50 44 41 54 45 20 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | .DO.UPDATE..counts.SET.n=n-1.WHE |
c6380 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
c63a0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
c63c0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
c63e0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
c6400 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
c6420 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
c6440 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
c6460 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
c6480 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
c64a0 | 34 29 2c 85 00 8a 6b 04 00 8a 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | 4),...k....CREATE.TABLE.t1(a.INT |
c64c0 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
c64e0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
c6500 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
c6520 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
c6540 | 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 20 60 61 60 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | ts(v,n).SELECT.`a`(new.a,1)..... |
c6560 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
c6580 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
c65a0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
c65c0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
c65e0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
c6600 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
c6620 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
c6640 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
c6660 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
c6680 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
c66a0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
c66c0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
c66e0 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
c6700 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
c6720 | 34 29 2c 28 37 29 3b 84 7f 8a 6a 04 00 8a 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | 4),(7);...j....CREATE.TABLE.t1(a |
c6740 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
c6760 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
c6780 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
c67a0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
c67c0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 20 40 31 28 6e 65 77 2e 61 2c 31 29 0a 20 | counts(v,n).SELECT.@1(new.a,1).. |
c67e0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c6800 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
c6820 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
c6840 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
c6860 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c6880 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
c68a0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
c68c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
c68e0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
c6900 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
c6920 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
c6940 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
c6960 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
c6980 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
c69a0 | 29 2c 28 34 29 2c 28 37 29 3b 84 0c 8a 69 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ),(4),(7);...i....CREATE.TABLE.t |
c69c0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
c69e0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
c6a00 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
c6a20 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
c6a40 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 20 61 2c 62 41 2c 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | TO.counts(v,.a,bA,n=n-1.WHERE.v= |
c6a60 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
c6a80 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
c6aa0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
c6ac0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
c6ae0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
c6b00 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
c6b20 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
c6b40 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
c6b60 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
c6b80 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
c6ba0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8a 68 04 00 | DELETE.FROM.t1.WHERE.a=7;....h.. |
c6bc0 | 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
c6be0 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
c6c00 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
c6c20 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
c6c40 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 57 | EGIN...INSERT.INTO.counts(n,n).W |
c6c60 | 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 | ITH.c(x).AS.(values(1))..VALUES( |
c6c80 | 6e 65 77 2e 61 2c 31 29 0a 55 4e 49 4f 4e 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | new.a,1).UNION.VALUES(new.a,1).. |
c6ca0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
c6cc0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
c6ce0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
c6d00 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
c6d20 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
c6d40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c6d60 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c6d80 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c6da0 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
c6dc0 | 52 45 20 61 3d 37 3b 0a 85 14 8a 67 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;....g...-CREATE.TABLE.t1( |
c6de0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c6e00 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c6e20 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c6e40 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
c6e60 | 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(n,n).VALUES(new.a,1).... |
c6e80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c6ea0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
c6ec0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
c6ee0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c6f00 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.v=n-1.WH |
c6f20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
c6f40 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
c6f60 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
c6f80 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
c6fa0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
c6fc0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
c6fe0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
c7000 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
c7020 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
c7040 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 | (4),(7);.UPDATE.t1.SET.a=0.AND.t |
c7060 | 84 67 8a 66 04 00 89 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .g.f...SCREATE.TABLE.t1(a.INT);. |
c7080 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
c70a0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
c70c0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
c70e0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
c7100 | 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | n,n).VALUES(new.a,1).......ON.CO |
c7120 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c7140 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
c7160 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c7180 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
c71a0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
c71c0 | e4 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | ..a;...INSERT.INTO.counts(v,n).V |
c71e0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c7200 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c7220 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c7240 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c7260 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c7280 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c72a0 | 4e 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ND;EXPLAIN.INSERT.INTO.t1(a).VAL |
c72c0 | 55 45 53 28 31 29 3b 28 61 3d 34 85 1f 8a 65 04 00 8a 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 | UES(1);(a=4...e...CCREATE.TABLE. |
c72e0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
c7300 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
c7320 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
c7340 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
c7360 | 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(n,n).VALUES(new.a,1). |
c7380 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
c73a0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
c73c0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
c73e0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
c7400 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
c7420 | 20 57 48 45 52 45 20 76 3d 6f 6c e4 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | .WHERE.v=ol..a;...INSERT.INTO.co |
c7440 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
c7460 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
c7480 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r3.AFTER |
c74a0 | 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .DELETE.ON.t1.BEGIN...DELETE.FRO |
c74c0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
c74e0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
c7500 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 | .v=old.a;.END;EXPLAIN.INSERT.INT |
c7520 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
c7540 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
c7560 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 1f 8a 64 04 00 8a 43 43 52 45 41 54 45 20 54 41 42 | .a=5.WHERE.a=4...d...CCREATE.TAB |
c7580 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
c75a0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
c75c0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
c75e0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
c7600 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(n,n).VALUES(new.a, |
c7620 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
c7640 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
c7660 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
c7680 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
c76a0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
c76c0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c e4 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=ol..a;...INSERT.INTO |
c76e0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c7700 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c7720 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c7740 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c7760 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c7780 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c77a0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 | ERE.v=old.a;.END;.WITH.c(x).AS.( |
c77c0 | 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | values(1)).VALUES(1),(2),(1),(3) |
c77e0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
c7800 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 14 8a 63 04 00 8a 2d 43 52 45 41 54 45 20 | SET.a=5.WHERE.a=4...c...-CREATE. |
c7820 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
c7840 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
c7860 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
c7880 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
c78a0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(n,n).VALUES(new |
c78c0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
c78e0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
c7900 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
c7920 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
c7940 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
c7960 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
c7980 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
c79a0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
c79c0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
c79e0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
c7a00 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
c7a20 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
c7a40 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
c7a60 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
c7a80 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
c7aa0 | 61 3d 30 20 41 4e 44 20 74 85 3b 8a 62 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | a=0.AND.t.;.b...{CREATE.TABLE.t1 |
c7ac0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
c7ae0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
c7b00 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
c7b20 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
c7b40 | 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(n,n).VALUES(new.a,1)... |
c7b60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
c7b80 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
c7ba0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
c7bc0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
c7be0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
c7c00 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
c7c20 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
c7c40 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
c7c60 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
c7c80 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
c7ca0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 | counts.WHERE.v=.nullif(1,1)OR.tr |
c7cc0 | 75 65 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | ue=1;...UPDATE.counts.SET.n=n-1. |
c7ce0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
c7d00 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
c7d20 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
c7d40 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
c7d60 | 52 45 20 61 3d 37 3b 0a 85 14 8a 61 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;....a...-CREATE.TABLE.t1( |
c7d80 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
c7da0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
c7dc0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
c7de0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
c7e00 | 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(n,n).VALUES(new.a,1).... |
c7e20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c7e40 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
c7e60 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
c7e80 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c7ea0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c7ec0 | 45 52 45 20 76 2b 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v+old.a;...INSERT.INTO.count |
c7ee0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
c7f00 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
c7f20 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
c7f40 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
c7f60 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
c7f80 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
c7fa0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
c7fc0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
c7fe0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 | (4),(7);.UPDATE.t1.SET.a=0.AND.t |
c8000 | 0d 1a f3 00 0d 01 fe 00 1d 73 1a f9 18 6e 16 5e 13 da 11 5a 0e d2 0c be 0a ae 08 9e 06 1e 04 0e | .........s...n.^...Z............ |
c8020 | 01 fe 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c80a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c80c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c80e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c8180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c81a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c81c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
c81e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 0c | ................................ |
c8200 | 8a 7a 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .z....CREATE.TABLE.t1(a.INT);.CR |
c8220 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c8240 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c8260 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
c8280 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
c82a0 | 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 57 48 45 52 45 20 43 4f 4e 46 | n).SELECT(new.a,1)....WHERE.CONF |
c82c0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 74 73 20 53 45 54 20 6e 3d | LICT(v).DO.UPDATE.SET.nts.SET.n= |
c82e0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c8300 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c8320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c8340 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c8360 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c8380 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c83a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c83c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
c83e0 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c8400 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 0c 8a 79 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 | ),(2),(4),(7);...y....CREATE.TAB |
c8420 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
c8440 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
c8460 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
c8480 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
c84a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).SELECT(new.a, |
c84c0 | 31 29 0a 20 20 20 4c 49 4d 49 54 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1)....LIMIT.CONFLICT(v).DO.UPDAT |
c84e0 | 45 20 53 45 54 20 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | E.SET.nts.SET.n=n-1.WHERE.v=old. |
c8500 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
c8520 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c8540 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c8560 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
c8580 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c85a0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c85c0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
c85e0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
c8600 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 7c | ),(1),(3),(1),(3),(2),(4),(7);.| |
c8620 | 8a 78 04 00 89 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .x...}CREATE.TABLE.t1(a.INT);.CR |
c8640 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c8660 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c8680 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
c86a0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
c86c0 | 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 a0 20 4f 4e 20 43 4f 4e 46 | n).SELECT(new.a,1).......ON.CONF |
c86e0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
c8700 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
c8720 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
c8740 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
c8760 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
c8780 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
c87a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c87c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c87e0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
c8800 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c8820 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c8840 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
c8860 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
c8880 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 0c | ),(1),(3),(1),(3),(2),(4),(7);.. |
c88a0 | 8a 77 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .w....CREATE.TABLE.t1(a.INT);.CR |
c88c0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c88e0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c8900 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
c8920 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
c8940 | 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 46 52 4f 4d 20 43 4f 4e 46 | n).SELECT(new.a,1).....FROM.CONF |
c8960 | 4c 49 43 54 28 20 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 74 73 20 53 45 54 20 6e 3d | LICT(.).DO.UPDATE.SET.nts.SET.n= |
c8980 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c89a0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c89c0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c89e0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c8a00 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c8a20 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c8a40 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c8a60 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
c8a80 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c8aa0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 0c 8a 76 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 | ),(2),(4),(7);...v....CREATE.TAB |
c8ac0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
c8ae0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
c8b00 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
c8b20 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
c8b40 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).SELECT(new.a, |
c8b60 | 31 29 0a 20 20 20 20 46 52 4f 4d 20 43 20 61 2c 62 20 22 61 22 2c 22 62 22 4f 20 55 50 44 41 54 | 1).....FROM.C.a,b."a","b"O.UPDAT |
c8b80 | 45 20 53 45 54 20 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | E.SET.nts.SET.n=n-1.WHERE.v=old. |
c8ba0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
c8bc0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c8be0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c8c00 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
c8c20 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c8c40 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c8c60 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
c8c80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
c8ca0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 10 | ),(1),(3),(1),(3),(2),(4),(7);.. |
c8cc0 | 8a 75 04 00 88 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .u...%CREATE.TABLE.t1(a.INT);.CR |
c8ce0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c8d00 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c8d20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
c8d40 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
c8d60 | 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 46 52 4f 4d 20 43 20 28 31 | n).SELECT(new.a,1).....FROM.C.(1 |
c8d80 | 29 20 61 2c 62 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 74 73 20 53 45 | ).a,bICT(v).DO.UPDATE.SET.nts.SE |
c8da0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
c8dc0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
c8de0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
c8e00 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
c8e20 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
c8e40 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
c8e60 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
c8e80 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
c8ea0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
c8ec0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 04 8a 74 04 00 8a 0d 43 52 45 41 54 45 | ),(3),(2),(4),(7);...t....CREATE |
c8ee0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
c8f00 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
c8f20 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
c8f40 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
c8f60 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 | NSERT.INTO.counts(v,n).SELECT(ne |
c8f80 | 77 2e 61 2c 31 29 0a 20 20 20 20 22 61 22 2c 22 62 22 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | w.a,1)....."a","b"...ON.CONFLICT |
c8fa0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c8fc0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
c8fe0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c9000 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c9020 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
c9040 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
c9060 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
c9080 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
c90a0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
c90c0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
c90e0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
c9100 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
c9120 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
c9140 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 7c 8a 73 04 00 | ),(3),(1),(3),(2),(4),(7);.|.s.. |
c9160 | 89 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .}CREATE.TABLE.t1(a.INT);.CREATE |
c9180 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
c91a0 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
c91c0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
c91e0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 | EGIN...INSERT.INTO.counts(v,n).S |
c9200 | 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ELECT(new.a,1).......ON.CONFLICT |
c9220 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c9240 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
c9260 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c9280 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c92a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
c92c0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 | .INSERT.INTO.counts(v,n).SELECT( |
c92e0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
c9300 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
c9320 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
c9340 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
c9360 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
c9380 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
c93a0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
c93c0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 00 8a 72 04 00 | ),(3),(1),(3),(2),(4),(7);...r.. |
c93e0 | 8a 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
c9400 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
c9420 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
c9440 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
c9460 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 | EGIN...INSERT.INTO.counts(v,n).S |
c9480 | 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 20 60 61 60 4f 4e 20 43 4f 4e 46 | ELECT(new.a,1)........`a`ON.CONF |
c94a0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
c94c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
c94e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
c9500 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
c9520 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
c9540 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
c9560 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
c9580 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
c95a0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
c95c0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
c95e0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
c9600 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
c9620 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
c9640 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 0c | ),(1),(3),(1),(3),(2),(4),(7);.. |
c9660 | 8a 71 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .q....CREATE.TABLE.t1(a.INT);.CR |
c9680 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
c96a0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
c96c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
c96e0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
c9700 | 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 20 4e 20 43 4f 4e 46 | n).SELECT(new.a,1)........N.CONF |
c9720 | 4c 49 43 54 28 76 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | LICT(v=1;...UPDATE.counts.SET.n= |
c9740 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
c9760 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
c9780 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
c97a0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
c97c0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
c97e0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
c9800 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
c9820 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
c9840 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
c9860 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 01 8a 70 04 00 8a 07 43 52 45 41 54 45 20 54 41 42 | ),(2),(4),(7);...p....CREATE.TAB |
c9880 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
c98a0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
c98c0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
c98e0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
c9900 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 41 42 4f 52 54 6e | T.INTO.counts(v,n).SELECT(ABORTn |
c9920 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
c9940 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
c9960 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
c9980 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
c99a0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
c99c0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
c99e0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
c9a00 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
c9a20 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
c9a40 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
c9a60 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
c9a80 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
c9aa0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
c9ac0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
c9ae0 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 00 00 00 06 04 00 84 76 8a 6f 04 00 89 | 1),(3),(2),(4),(7);.......v.o... |
c9b00 | 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | qCREATE.TABLE.t1(a.INT);.CREATE. |
c9b20 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
c9b40 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
c9b60 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
c9b80 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 | GIN...INSERT.INTO.counts(v,n).SE |
c9ba0 | 4c 45 43 54 20 6a 73 6f 6e 28 31 29 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | LECT.json(1)..ON.CONFLICT(v).DO. |
c9bc0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
c9be0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
c9c00 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
c9c20 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
c9c40 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
c9c60 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
c9c80 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
c9ca0 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
c9cc0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
c9ce0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
c9d00 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
c9d20 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
c9d40 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
c9d60 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 09 8a 6e 04 00 8a 17 43 52 45 41 54 | 1),(3),(2),(4),(7);...n....CREAT |
c9d80 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
c9da0 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
c9dc0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
c9de0 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
c9e00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 20 63 | INSERT.INTO.counts(v,n).SELECT.c |
c9e20 | 6f 75 6e 74 28 31 29 20 61 2c 62 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | ount(1).a,b(new.a,1).......ON.CO |
c9e40 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
c9e60 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
c9e80 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
c9ea0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
c9ec0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
c9ee0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
c9f00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
c9f20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
c9f40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
c9f60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
c9f80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
c9fa0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
c9fc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
c9fe0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
ca000 | 0d 00 00 00 0d 00 95 00 1d 7c 1a fc 18 76 15 f6 13 e6 11 d6 0f 51 0c c5 0a 3d 07 b5 05 2d 02 a5 | .........|...v.......Q...=...-.. |
ca020 | 00 95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ca040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ca060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ca080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 0c 8b 07 04 00 88 1d 43 52 45 | .............................CRE |
ca0a0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
ca0c0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
ca0e0 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
ca100 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
ca120 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
ca140 | 28 40 65 77 2e 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 4e 53 45 52 54 20 49 4e 54 4f 20 | (@ew....ON.CONFLICT(vNSERT.INTO. |
ca160 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
ca180 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
ca1a0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
ca1c0 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
ca1e0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
ca200 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
ca220 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
ca240 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
ca260 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
ca280 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
ca2a0 | 61 3d 37 3b 0a 85 04 8b 06 04 00 8a 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;.........CREATE.TABLE.t1(a.I |
ca2c0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
ca2e0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
ca300 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
ca320 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
ca340 | 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 4f 52 44 45 52 20 42 | unts(v,n).SELECT(new.a,1)ORDER.B |
ca360 | 59 40 61 2c 62 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | Y@a,b...ON.CONFLICT(v).DO.UPDATE |
ca380 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
ca3a0 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
ca3c0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
ca3e0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
ca400 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
ca420 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
ca440 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
ca460 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
ca480 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
ca4a0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
ca4c0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
ca4e0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
ca500 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
ca520 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 04 8b 05 04 00 8a 0d 43 52 45 41 54 45 20 54 41 42 4c | ,(2),(4),(7);........CREATE.TABL |
ca540 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
ca560 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
ca580 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
ca5a0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
ca5c0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).SELECT(new.a,1 |
ca5e0 | 29 4f 52 44 45 52 20 42 59 20 61 2c 62 20 20 20 4f 4e 60 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | )ORDER.BY.a,b...ON`CONFLICT(v).D |
ca600 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
ca620 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
ca640 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
ca660 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
ca680 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
ca6a0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
ca6c0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
ca6e0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
ca700 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
ca720 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
ca740 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
ca760 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
ca780 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
ca7a0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 04 8b 04 04 00 8a 0d 43 52 45 | ,(1),(3),(2),(4),(7);........CRE |
ca7c0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
ca7e0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
ca800 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
ca820 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
ca840 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 | ..INSERT.INTO.counts(v,n).SELECT |
ca860 | 28 6e 65 77 2e 61 2c 31 29 4f 52 44 45 52 20 42 59 20 61 2c 62 20 20 20 4f 4e 20 43 4f 4e 46 4c | (new.a,1)ORDER.BY.a,b...ON.CONFL |
ca880 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
ca8a0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
ca8c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
ca8e0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
ca900 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
ca920 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
ca940 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
ca960 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
ca980 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
ca9a0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
ca9c0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
ca9e0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
caa00 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
caa20 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 04 8b | ,(1),(3),(1),(3),(2),(4),(7);... |
caa40 | 03 04 00 8a 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | .....CREATE.TABLE.t1(a.INT);.CRE |
caa60 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
caa80 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
caaa0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
caac0 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
caae0 | 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 4f 52 44 45 52 20 42 59 20 61 2c 62 20 20 20 | ).SELECT(new.a,1)ORDER.BY.a,b... |
cab00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
cab20 | 2b 31 3b 0a 45 4e 44 2b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END+.CREATE.TRIGGER.r2.AFTER |
cab40 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
cab60 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
cab80 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
caba0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
cabc0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
cabe0 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
cac00 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
cac20 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
cac40 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
cac60 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
cac80 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
caca0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
cacc0 | 2c 28 37 29 3b 85 08 8b 02 04 00 8a 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ,(7);........CREATE.TABLE.t1(a.I |
cace0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
cad00 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
cad20 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
cad40 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
cad60 | 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 4f 52 44 45 52 20 42 | unts(v,n).SELECT(new.a,1)ORDER.B |
cad80 | 59 20 20 61 2c 62 61 2c 62 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | Y..a,ba,b...ON.CONFLICT(v).DO.UP |
cada0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
cadc0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
cade0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
cae00 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
cae20 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
cae40 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
cae60 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
cae80 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
caea0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
caec0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
caee0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
caf00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
caf20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
caf40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 01 8b 01 04 00 8a 07 43 52 45 41 54 45 20 | ,(3),(2),(4),(7);........CREATE. |
caf60 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
caf80 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
cafa0 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
cafc0 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
cafe0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 | SERT.INTO.counts(v,n).SELECT(new |
cb000 | 2e 61 2c 31 29 4c 49 4d 49 54 20 61 2c 62 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | .a,1)LIMIT.a,b...ON.CONFLICT(v). |
cb020 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cb040 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
cb060 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cb080 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cb0a0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
cb0c0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
cb0e0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
cb100 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
cb120 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
cb140 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
cb160 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
cb180 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
cb1a0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
cb1c0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 0c 8b 00 04 00 88 1d 43 52 | ),(1),(3),(2),(4),(7);........CR |
cb1e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
cb200 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
cb220 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
cb240 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
cb260 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 | ...INSERT.INTO.counts(v,n).SELEC |
cb280 | 54 28 6e 65 77 2e 61 2c 31 29 46 52 4f 4d 20 61 2c 62 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | T(new.a,1)FROM.a,b...ON.CONFLICT |
cb2a0 | 2c 76 29 20 44 4f 20 55 50 44 41 54 45 20 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | ,v).DO.UPDATE..counts.SET.n=n-1. |
cb2c0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
cb2e0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
cb300 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
cb320 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
cb340 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
cb360 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
cb380 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
cb3a0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
cb3c0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
cb3e0 | 29 2c 28 34 29 2c 84 0c 8a 7f 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | ),(4),........CREATE.TABLE.t1(a. |
cb400 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
cb420 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
cb440 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
cb460 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
cb480 | 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 46 52 4f 4d 20 61 | ounts(v,n).SELECT(new.a,1)FROM.a |
cb4a0 | 2c 62 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 20 3b 20 55 50 44 41 54 45 20 20 63 | ,b...ON.CONFLICT(v)..;.UPDATE..c |
cb4c0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
cb4e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
cb500 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
cb520 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
cb540 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
cb560 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
cb580 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
cb5a0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
cb5c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
cb5e0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 84 7c 8a 7e 04 00 89 7d 43 52 | ),(3),(1),(3),(2),(4),.|.~...}CR |
cb600 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
cb620 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
cb640 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
cb660 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
cb680 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 | ...INSERT.INTO.counts(v,n).SELEC |
cb6a0 | 54 28 6e 65 77 2e 61 2c 31 29 20 61 2c 62 20 a0 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | T(new.a,1).a,b...ON.CONFLICT(v). |
cb6c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cb6e0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
cb700 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cb720 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cb740 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
cb760 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
cb780 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
cb7a0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
cb7c0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
cb7e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
cb800 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
cb820 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
cb840 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
cb860 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 5b 85 02 8a 7d 04 00 8a 09 43 52 | ),(1),(3),(2),(4),(7)[...}....CR |
cb880 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
cb8a0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
cb8c0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
cb8e0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
cb900 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 53 45 4c 45 43 | ...INSERT.INTO.counts(v,n).SELEC |
cb920 | 54 28 6e 65 77 2e 61 2c 31 29 20 61 2c 41 43 54 49 4f 4e 62 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | T(new.a,1).a,ACTIONb...ON.CONFLI |
cb940 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
cb960 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
cb980 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
cb9a0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
cb9c0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cb9e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
cba00 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
cba20 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cba40 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
cba60 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cba80 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cbaa0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
cbac0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
cbae0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 84 7c 8a 7c | (1),(3),(1),(3),(2),(4),(7);.|.| |
cbb00 | 04 00 89 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...}CREATE.TABLE.t1(a.INT);.CREA |
cbb20 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
cbb40 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
cbb60 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
cbb80 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
cbba0 | 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 20 20 61 2c 62 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .SELECT(new.a,1)..a,b..ON.CONFLI |
cbbc0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
cbbe0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
cbc00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
cbc20 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
cbc40 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cbc60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
cbc80 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
cbca0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cbcc0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
cbce0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cbd00 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cbd20 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
cbd40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
cbd60 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 00 8a 7b | (1),(3),(1),(3),(2),(4),(7);...{ |
cbd80 | 04 00 8a 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
cbda0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
cbdc0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
cbde0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
cbe00 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
cbe20 | 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 61 2c 62 20 20 20 20 4f 4e 20 43 4f | .SELECT(new.a,1)....a,b....ON.CO |
cbe40 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
cbe60 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
cbe80 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
cbea0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
cbec0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
cbee0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
cbf00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
cbf20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
cbf40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
cbf60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
cbf80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
cbfa0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
cbfc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
cbfe0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
cc000 | 0d 00 00 00 0c 02 65 00 1d 7c 1a f8 18 40 15 84 13 74 10 ba 0e aa 0b f2 09 e2 07 d5 05 1d 02 65 | ......e..|...@...t.............e |
cc020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
cc260 | 00 00 00 00 00 85 34 8b 13 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ......4.....mCREATE.TABLE.t1(a.I |
cc280 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
cc2a0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
cc2c0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
cc2e0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
cc300 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
cc320 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
cc340 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
cc360 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
cc380 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 6a 73 | M.counts.WHERE.6=old.a.AND.n=.js |
cc3a0 | 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 74 72 75 65 3d 31 3b 0a 20 20 55 | on_object(1,1,1,1)OR.true=1;...U |
cc3c0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
cc3e0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
cc400 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | VALUES(new.a,1)...ON.CONFLICT(v) |
cc420 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
cc440 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
cc460 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
cc480 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
cc4a0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
cc4c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
cc4e0 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
cc500 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a 85 34 8b | DATE.t1.SET.a=5.WHERE.a=4;.D..4. |
cc520 | 12 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | ....mCREATE.TABLE.t1(a.INT);.CRE |
cc540 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
cc560 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
cc580 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
cc5a0 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
cc5c0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
cc5e0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
cc600 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
cc620 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
cc640 | 20 57 48 45 52 45 20 20 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 3b 0a 20 20 55 50 44 41 54 | .WHERE..json_patch(1,1);...UPDAT |
cc660 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
cc680 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
cc6a0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
cc6c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
cc6e0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
cc700 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
cc720 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
cc740 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
cc760 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
cc780 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
cc7a0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a-4;.DELET |
cc7c0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 09 8b 11 04 00 88 17 43 52 45 | E.FROM.t1.WHERE.a=7;.........CRE |
cc7e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
cc800 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
cc820 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
cc840 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
cc860 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
cc880 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
cc8a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
cc8c0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
cc8e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 20 20 20 20 20 20 4f | GIN...DELETE.FROM.counts.......O |
cc900 | 4e 20 43 4f 4e 54 28 76 29 20 44 4f 20 55 57 48 45 52 45 20 76 3d 6f 6c 64 54 45 20 46 52 4f 4d | N.CONT(v).DO.UWHERE.v=oldTE.FROM |
cc920 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
cc940 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
cc960 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
cc980 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
cc9a0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
cc9c0 | 52 45 20 5f 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE._=4;.DELETE.FROM.t1.WHERE.a=7 |
cc9e0 | 3b 0a 84 0c 8b 10 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;.........CREATE.TABLE.t1(a.INT) |
cca00 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
cca20 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
cca40 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
cca60 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
cca80 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
ccaa0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
ccac0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
ccae0 | 44 41 54 45 20 4f 46 20 74 31 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 63 6f 75 6e 74 73 20 57 48 | DATE.OF.t1.ON.CONFLICT.counts.WH |
ccb00 | 45 52 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | ERGGER.r3.AFTER.DELETE.ON.t1.BEG |
ccb20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
ccb40 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
ccb60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
ccb80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
ccba0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
ccbc0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
ccbe0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 0f 04 00 8a 6d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..4.....mCREATE |
ccc00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
ccc20 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
ccc40 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
ccc60 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
ccc80 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
ccca0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
cccc0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
ccce0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.DELETE.ON.t1.BEGIN |
ccd00 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 74 6f 74 | ...DELETE.FROM.counts.WHERE..tot |
ccd20 | 61 6c 5f 63 68 61 6e 67 65 73 28 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | al_changes();...UPDATE.counts.SE |
ccd40 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
ccd60 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
ccd80 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
ccda0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
ccdc0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
ccde0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
cce00 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
cce20 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
cce40 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
cce60 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
cce80 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
ccea0 | 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8b 0e 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;.........CREATE.TABLE.t |
ccec0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
ccee0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
ccf00 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
ccf20 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
ccf40 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
ccf60 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
ccf80 | 54 20 6e 3d 6e 2b 31 20 3b 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1.;END;.CREATE.TRIGGER.r2. |
ccfa0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
ccfc0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 a0 57 48 45 52 45 20 76 3d 6f 6c 64 2e 3d 31 3b 0a 20 20 | E.FROM.counts.WHERE.v=old.=1;... |
ccfe0 | 55 50 44 41 54 45 20 63 6f 75 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | UPDATE.cou...DELETE.FROM.counts. |
cd000 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
cd020 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cd040 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
cd060 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
cd080 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
cd0a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 36 8b 0d 04 00 | DELETE.FROM.t1.WHERE.a=7;..6.... |
cd0c0 | 8a 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .qCREATE.TABLE.t1(a.INT);.CREATE |
cd0e0 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
cd100 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
cd120 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
cd140 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
cd160 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
cd180 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 20 2a 3b 0a 45 4e 44 3b 0a | (v).DO.UPDATE.SET.n=n+1.*;.END;. |
cd1a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
cd1c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
cd1e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
cd200 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cd220 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
cd240 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
cd260 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cd280 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
cd2a0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cd2c0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cd2e0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
cd300 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
cd320 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
cd340 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
cd360 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8b 0c 04 00 88 1d 43 52 45 41 | .FROM.t1.WHERE.a=7;.........CREA |
cd380 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
cd3a0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
cd3c0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
cd3e0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
cd400 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
cd420 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 61 2c 62 76 | new.a,1).......ON.CONFLICT(.a,bv |
cd440 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 3f 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+?;.END;.CREA |
cd460 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
cd480 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
cd4a0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
cd4c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
cd4e0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
cd500 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
cd520 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
cd540 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
cd560 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
cd580 | 52 45 20 61 85 38 8b 0b 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | RE.a.8.....uCREATE.TABLE.t1(a.IN |
cd5a0 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
cd5c0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
cd5e0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
cd600 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
cd620 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
cd640 | 4e 20 43 4f 4e 46 4c 49 43 54 28 20 61 2c 62 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | N.CONFLICT(.a,bv).DO.UPDATE.SET. |
cd660 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
cd680 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
cd6a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
cd6c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
cd6e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
cd700 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
cd720 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
cd740 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
cd760 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
cd780 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
cd7a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
cd7c0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
cd7e0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
cd800 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
cd820 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
cd840 | 85 34 8b 0a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.....mCREATE.TABLE.t1(a.INT);. |
cd860 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
cd880 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
cd8a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
cd8c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
cd8e0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 30 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,0).......ON.CO |
cd900 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
cd920 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
cd940 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
cd960 | 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.random()AND.n==1;...UP |
cd980 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
cd9a0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
cd9c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
cd9e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
cda00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
cda20 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
cda40 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
cda60 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
cda80 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
cdaa0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
cdac0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 37 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=7.WHERE.a-4;.DE |
cdae0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 00 8b 09 04 00 8a 05 | LETE.FROM.t1.WHERE.a=7;......... |
cdb00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
cdb20 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
cdb40 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
cdb60 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
cdb80 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
cdba0 | 55 45 53 28 6e 65 57 48 45 4e 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | UES(neWHENw.a,1).......ON.CONFLI |
cdbc0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
cdbe0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r2.AFTER.INSERT.O |
cdc00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
cdc20 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
cdc40 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cdc60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
cdc80 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
cdca0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cdcc0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.INSERT.ON.t1.B |
cdce0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cdd00 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cdd20 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
cdd40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
cdd60 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 00 8b 08 | (1),(3),(1),(3),(2),(4),(7);.... |
cdd80 | 04 00 8a 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
cdda0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
cddc0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
cdde0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
cde00 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
cde20 | 20 56 41 4c 55 45 53 28 6e 65 57 48 45 4e 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | .VALUES(neWHENw.a,1).......ON.CO |
cde40 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
cde60 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 | ND;.CREATE.TRIGGER.r2.AFTER.INSE |
cde80 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | RT.ON.t1.BEGIN...DELETE.FROM.cou |
cdea0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6e 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=nld.a.AND.n==1;...UP |
cdec0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
cdee0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
cdf00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
cdf20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
cdf40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
cdf60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
cdf80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
cdfa0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
cdfc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
cdfe0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
ce000 | 0d 00 00 00 0b 02 2d 00 1d 64 1a ac 17 f4 15 3c 12 84 0f cc 0d 14 0a 55 07 9d 04 e5 02 2d 00 00 | ......-..d.....<.......U.....-.. |
ce020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ce220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8b 1e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c | ..............4.....mCREATE.TABL |
ce240 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
ce260 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
ce280 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
ce2a0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
ce2c0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
ce2e0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
ce300 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
ce320 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
ce340 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6c 6f 77 65 72 28 31 29 41 | LETE.FROM.counts.WHERE.lower(1)A |
ce360 | 4e 44 20 76 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.v==N;...UPDATE.counts.SET.n=n |
ce380 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
ce3a0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
ce3c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
ce3e0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
ce400 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
ce420 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
ce440 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
ce460 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
ce480 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
ce4a0 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
ce4c0 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
ce4e0 | 61 3d 37 3b 0a 85 34 8b 1d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..4.....mCREATE.TABLE.t1(a.I |
ce500 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
ce520 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
ce540 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
ce560 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
ce580 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
ce5a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
ce5c0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
ce5e0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
ce600 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 31 29 3d 3d 4e 3b | M.counts.WHERE.json_valid(1)==N; |
ce620 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
ce640 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
ce660 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
ce680 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
ce6a0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
ce6c0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
ce6e0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
ce700 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
ce720 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
ce740 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
ce760 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
ce780 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b | 4;.DELETE.FROM.t1.WHERE.a=7;..4. |
ce7a0 | 1c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | ....mCREATE.TABLE.t1(a.INT);.CRE |
ce7c0 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
ce7e0 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
ce800 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
ce820 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
ce840 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
ce860 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
ce880 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
ce8a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
ce8c0 | 20 57 48 45 52 45 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 | .WHERE.json_test1(1)==N;...UPDAT |
ce8e0 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
ce900 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
ce920 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
ce940 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
ce960 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
ce980 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
ce9a0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
ce9c0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
ce9e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
cea00 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
cea20 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
cea40 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8b 1b 04 00 8a 7b 43 52 45 | E.FROM.t1.WHERE.a=7;..;.....{CRE |
cea60 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
cea80 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
ceaa0 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
ceac0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
ceae0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
ceb00 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
ceb20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
ceb40 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
ceb60 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 63 | GIN...DELETE.FROM.counts.WHERE.c |
ceb80 | 68 61 72 28 31 29 4f 52 20 74 72 75 65 20 4f 52 20 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 | har(1)OR.true.OR.false;...UPDATE |
ceba0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cebc0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
cebe0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
cec00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cec20 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
cec40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cec60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cec80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
ceca0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
cecc0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
cece0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
ced00 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 1a 04 00 8a 6d 43 52 45 41 | .FROM.t1.WHERE.a=7;..4.....mCREA |
ced20 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
ced40 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
ced60 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
ced80 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
ceda0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
cedc0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
cede0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
cee00 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
cee20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 63 68 | IN...DELETE.FROM.counts.WHERE.ch |
cee40 | 61 72 28 31 29 20 4f 52 20 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | ar(1).OR.false;...UPDATE.counts. |
cee60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
cee80 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
ceea0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
ceec0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
ceee0 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
cef00 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
cef20 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
cef40 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
cef60 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 34 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(4),(1),(3), |
cef80 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
cefa0 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
cefc0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 19 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..4.....mCREATE.TABLE |
cefe0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
cf000 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
cf020 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
cf040 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
cf060 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
cf080 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
cf0a0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
cf0c0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
cf0e0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 63 68 61 72 28 31 29 20 4f 52 | ETE.FROM.counts.WHERE.char(1).OR |
cf100 | 20 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | .false;...UPDATE.counts.SET.n=n- |
cf120 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
cf140 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
cf160 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
cf180 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
cf1a0 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
cf1c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
cf1e0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
cf200 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
cf220 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
cf240 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
cf260 | 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=1;.DELETE.FROM.t1.WHERE.a |
cf280 | 3d 37 3b 0a 85 34 8b 18 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..4.....mCREATE.TABLE.t1(a.IN |
cf2a0 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
cf2c0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
cf2e0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
cf300 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
cf320 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
cf340 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
cf360 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
cf380 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
cf3a0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 63 68 61 72 28 31 29 20 4f 52 20 66 61 6c 73 65 3b 0a | .counts.WHERE.char(1).OR.false;. |
cf3c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
cf3e0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
cf400 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
cf420 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
cf440 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
cf460 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
cf480 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
cf4a0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
cf4c0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
cf4e0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
cf500 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3c 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a<4 |
cf520 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 17 | ;.DELETE.FROM.t1.WHERE.a=7;..4.. |
cf540 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
cf560 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
cf580 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
cf5a0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
cf5c0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
cf5e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
cf600 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
cf620 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
cf640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
cf660 | 57 48 45 52 45 20 63 68 61 72 28 31 29 20 4f 52 20 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 | WHERE.char(1).OR.false;...UPDATE |
cf680 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
cf6a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
cf6c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
cf6e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
cf700 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
cf720 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
cf740 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
cf760 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
cf780 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
cf7a0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
cf7c0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
cf7e0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 16 04 00 8a 6d 43 52 45 41 | .FROM.t1.WHERE.a=7;..4.....mCREA |
cf800 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
cf820 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
cf840 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
cf860 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
cf880 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
cf8a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
cf8c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
cf8e0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
cf900 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 36 3d | IN...DELETE.FROM.counts.WHERE.6= |
cf920 | 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 56 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.v==V;...UPDATE.counts. |
cf940 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
cf960 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
cf980 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
cf9a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
cf9c0 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
cf9e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
cfa00 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
cfa20 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
cfa40 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
cfa60 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
cfa80 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
cfaa0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 15 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..4.....mCREATE.TABLE |
cfac0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
cfae0 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
cfb00 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
cfb20 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
cfb40 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
cfb60 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
cfb80 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
cfba0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
cfbc0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.6=old.a.AN |
cfbe0 | 44 20 76 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.v==N;...UPDATE.counts.SET.n=n- |
cfc00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
cfc20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
cfc40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
cfc60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
cfc80 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
cfca0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
cfcc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
cfce0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
cfd00 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
cfd20 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
cfd40 | 48 45 52 45 20 61 3d 41 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=A;.DELETE.FROM.t1.WHERE.a |
cfd60 | 3d 37 3b 0a 85 18 8b 14 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;........5CREATE.TABLE.t1(a.IN |
cfd80 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
cfda0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
cfdc0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
cfde0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
cfe00 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
cfe20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
cfe40 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
cfe60 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
cfe80 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.6=old.a.AND.n==1;. |
cfea0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
cfec0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
cfee0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
cff00 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
cff20 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
cff40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
cff60 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
cff80 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
cffa0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
cffc0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 3b 41 4e 41 4c 59 5a 45 3b 0a 55 50 44 41 54 45 20 | (1),(2),(1),(3);ANALYZE;.UPDATE. |
cffe0 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
d0000 | 0d 00 00 00 0b 01 ea 00 1d 48 1a 90 17 f4 15 3c 12 82 0f ae 0c ec 0a 2a 07 6b 04 ac 01 ea 00 00 | .........H.....<.......*.k...... |
d0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d0180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d01a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d01c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d01e0 | 00 00 00 00 00 00 00 00 00 00 85 3e 8b 29 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ...........>.)....CREATE.TABLE.t |
d0200 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
d0220 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
d0240 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
d0260 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
d0280 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
d02a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
d02c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
d02e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
d0300 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 | E.FROM.counts.WHERE.random()AND. |
d0320 | 6e 3d 20 63 68 61 6e 67 65 73 28 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | n=.changes()=1;...UPDATE.counts. |
d0340 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
d0360 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d0380 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d03a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d03c0 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
d03e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
d0400 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
d0420 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
d0440 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
d0460 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
d0480 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a-4;.DELETE.FROM.t1 |
d04a0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8b 28 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..;.(...{CREATE.TABLE |
d04c0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
d04e0 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
d0500 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
d0520 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
d0540 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
d0560 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
d0580 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
d05a0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
d05c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e | ETE.FROM.counts.WHERE.random()AN |
d05e0 | 44 20 6e 3d 20 61 62 73 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | D.n=.abs(1)=1;...UPDATE.counts.S |
d0600 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
d0620 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
d0640 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
d0660 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
d0680 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
d06a0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
d06c0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
d06e0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
d0700 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
d0720 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
d0740 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
d0760 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8b 27 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..;.'...{CREATE.TABLE. |
d0780 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
d07a0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
d07c0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
d07e0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
d0800 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
d0820 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
d0840 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
d0860 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
d0880 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 | TE.FROM.counts.WHERE.random()AND |
d08a0 | 20 6e 3d 20 61 62 73 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | .n=.abs(1)=1;...UPDATE.counts.SE |
d08c0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
d08e0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
d0900 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
d0920 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
d0940 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
d0960 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
d0980 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
d09a0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
d09c0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
d09e0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
d0a00 | 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a-4;.DELETE.FROM.t1.W |
d0a20 | 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 26 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..>.&....CREATE.TABLE.t |
d0a40 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
d0a60 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
d0a80 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
d0aa0 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
d0ac0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
d0ae0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
d0b00 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
d0b20 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
d0b40 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 | E.FROM.counts.WHERE.random()AND. |
d0b60 | 6e 2d 32 30 30 31 2d 30 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | n-2001-01-01=1;...UPDATE.counts. |
d0b80 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
d0ba0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d0bc0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d0be0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d0c00 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
d0c20 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
d0c40 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
d0c60 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
d0c80 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
d0ca0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
d0cc0 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a-4;.DELETE.FROM.t1 |
d0ce0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 25 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..>.%....CREATE.TABLE |
d0d00 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
d0d20 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
d0d40 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
d0d60 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
d0d80 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
d0da0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
d0dc0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
d0de0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
d0e00 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e | ETE.FROM.counts.WHERE.random()AN |
d0e20 | 44 20 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | D..randomblob(1);...UPDATE.count |
d0e40 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
d0e60 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
d0e80 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
d0ea0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
d0ec0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
d0ee0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
d0f00 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
d0f20 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
d0f40 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
d0f60 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
d0f80 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a-4;.DELETE.FROM. |
d0fa0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 50 8b 24 04 00 8b 25 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..P.$...%CREATE.TAB |
d0fc0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
d0fe0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
d1000 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
d1020 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
d1040 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d1060 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d1080 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d10a0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
d10c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 | ELETE.FROM.counts.WHERE.random() |
d10e0 | 20 7c 7c 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 | .||.n=.sqlite_compileoption_get( |
d1100 | 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | 1)=1;...UPDATE.counts.SET.n=n-1. |
d1120 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
d1140 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
d1160 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
d1180 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
d11a0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
d11c0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
d11e0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
d1200 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
d1220 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
d1240 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
d1260 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
d1280 | 3b 0a 85 36 8b 23 04 00 8a 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..6.#...qCREATE.TABLE.t1(a.INT) |
d12a0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
d12c0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
d12e0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
d1300 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
d1320 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d1340 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d1360 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
d1380 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
d13a0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 20 2a 29 41 4e 44 20 6e 3d 3d 31 3b 0a | ounts.WHERE.random(.*)AND.n==1;. |
d13c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
d13e0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
d1400 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
d1420 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
d1440 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
d1460 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
d1480 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
d14a0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
d14c0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
d14e0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
d1500 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
d1520 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 22 | ;.DELETE.FROM.t1.WHERE.a=7;..4." |
d1540 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
d1560 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
d1580 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
d15a0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
d15c0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
d15e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
d1600 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
d1620 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
d1640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
d1660 | 57 48 45 52 45 20 6e 3d 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 | WHERE.n=old.a.AND.v==N;...UPDATE |
d1680 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
d16a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d16c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d16e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d1700 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
d1720 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d1740 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
d1760 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
d1780 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
d17a0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
d17c0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
d17e0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8b 21 04 00 8a 35 43 52 45 41 | .FROM.t1.WHERE.a=7;....!...5CREA |
d1800 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
d1820 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
d1840 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
d1860 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
d1880 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
d18a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
d18c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
d18e0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
d1900 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6e 3d | IN...DELETE.FROM.counts.WHERE.n= |
d1920 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
d1940 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
d1960 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d1980 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d19a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d19c0 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
d19e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
d1a00 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
d1a20 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
d1a40 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 3b | NTO.t1(a).VALUES(1),(2),(1),(3); |
d1a60 | 41 4e 41 4c 59 5a 45 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | ANALYZE;.UPDATE.t1.SET.a=5.WHERE |
d1a80 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 85 34 8b 20 04 00 8a 6d 43 52 45 41 54 45 20 54 | .a=4;.DELETE.FRO.4.....mCREATE.T |
d1aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
d1ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
d1ae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
d1b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
d1b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
d1b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
d1b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
d1b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
d1ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6e 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.n=old. |
d1bc0 | 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 | a.AND.n=.json_object(1,1,1,1)OR. |
d1be0 | 74 72 75 65 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | true=N;...UPDATE.counts.SET.n=n- |
d1c00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
d1c20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 | ounts(v,n).VALUES(new.a,1)...ON. |
d1c40 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d1c60 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d1c80 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d1ca0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d1cc0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d1ce0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d1d00 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d1d20 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d1d40 | 20 61 3d 34 3b 0a 44 0a 85 34 8b 1f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .a=4;.D..4.....mCREATE.TABLE.t1( |
d1d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
d1d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
d1da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
d1dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
d1de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
d1e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
d1e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
d1e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
d1e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 | FROM.counts.WHERE.n=CURRENT_TIME |
d1e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e | =1;...UPDATE.counts.SET.n=CURREN |
d1ea0 | 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | T_TIMESTAMP;...INSERT.INTO.count |
d1ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d1ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d1f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d1f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d1f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d1f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d1f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d1fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d1fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d1fe0 | 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a+4;.DELETE.FROM.t1.WHERE.a=7;. |
d2000 | 0d 09 db 00 0b 01 85 00 1d 38 1a 76 17 b4 14 f5 12 35 0f 6b 0c a1 09 e1 07 13 04 4b 01 85 00 00 | .........8.v.....5.k.......K.... |
d2020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d2180 | 00 00 00 00 00 85 42 8b 34 04 00 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ......B.4....CREATE.TABLE.t1(a.I |
d21a0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
d21c0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
d21e0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
d2200 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
d2220 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
d2240 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
d2260 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
d2280 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
d22a0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 | M.counts.WHERE.random()AND.n=.js |
d22c0 | 6f 6e 5f 71 75 6f 74 65 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | on_quote(1)=1;...UPDATE.counts.S |
d22e0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
d2300 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
d2320 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
d2340 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
d2360 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
d2380 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
d23a0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
d23c0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
d23e0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
d2400 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
d2420 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a-4;.DELETE.FROM.t1. |
d2440 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 44 8b 33 04 00 8b 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..D.3....CREATE.TABLE. |
d2460 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
d2480 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
d24a0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
d24c0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
d24e0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
d2500 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
d2520 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
d2540 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
d2560 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 | TE.FROM.counts.WHERE.random()AND |
d2580 | 20 6e 3d 20 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | .n=.json_patch(1,1)=1;...UPDATE. |
d25a0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
d25c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
d25e0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
d2600 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
d2620 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
d2640 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
d2660 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
d2680 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
d26a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
d26c0 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
d26e0 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
d2700 | 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 44 8b 32 04 00 8b 0d 43 52 45 41 54 | FROM.t1.WHERE.a=7;..D.2....CREAT |
d2720 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
d2740 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
d2760 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
d2780 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
d27a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
d27c0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
d27e0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
d2800 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
d2820 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e | N...DELETE.FROM.counts.WHERE.ran |
d2840 | 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 3d 31 3b 0a 20 | dom()AND.n=.json_patch(1,1)=1;.. |
d2860 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
d2880 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
d28a0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
d28c0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
d28e0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
d2900 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
d2920 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
d2940 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
d2960 | 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 | ;.END;.INSERT.INTO.t1(a).VALUES( |
d2980 | 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 | 1),(2),(1),(3),(1),(3),(2),(4),( |
d29a0 | 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b | 7);.UPDATE.t1.SET.a=5.WHERE.a-4; |
d29c0 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 00 00 00 06 04 | .DELETE.FROM.t1.WHERE.a=7;...... |
d29e0 | 00 85 3c 8b 31 04 00 8a 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..<.1...}CREATE.TABLE.t1(a.INT); |
d2a00 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
d2a20 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
d2a40 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
d2a60 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
d2a80 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
d2aa0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
d2ac0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
d2ae0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
d2b00 | 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 6f 6e 28 31 | unts.WHERE.random()AND.n=.json(1 |
d2b20 | 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | )=1;...UPDATE.counts.SET.n=n-1.W |
d2b40 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
d2b60 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
d2b80 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
d2ba0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
d2bc0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
d2be0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
d2c00 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
d2c20 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
d2c40 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
d2c60 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
d2c80 | 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a-4;.DELETE.FROM.t1.WHERE.a=7; |
d2ca0 | 0a 85 46 8b 30 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..F.0....CREATE.TABLE.t1(a.INT); |
d2cc0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
d2ce0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
d2d00 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
d2d20 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
d2d40 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
d2d60 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
d2d80 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
d2da0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
d2dc0 | 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 61 | unts.WHERE.random()AND.n=.json_a |
d2de0 | 72 72 61 79 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | rray(1,1,1)=1;...UPDATE.counts.S |
d2e00 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
d2e20 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
d2e40 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
d2e60 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
d2e80 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
d2ea0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
d2ec0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
d2ee0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
d2f00 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
d2f20 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
d2f40 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
d2f60 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 46 8b 2f 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..F./....CREATE.TABLE. |
d2f80 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
d2fa0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
d2fc0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
d2fe0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
d3000 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
d3020 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
d3040 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
d3060 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
d3080 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 | TE.FROM.counts.WHERE.random()AND |
d30a0 | 20 6e 3d 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 | .n=.json_array(1,1,1)=1;...UPDAT |
d30c0 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
d30e0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
d3100 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
d3120 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
d3140 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
d3160 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
d3180 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
d31a0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
d31c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
d31e0 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
d3200 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a-4;.DELET |
d3220 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3c 8b 2e 04 00 8a 7d 43 52 45 | E.FROM.t1.WHERE.a=7;..<.....}CRE |
d3240 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
d3260 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
d3280 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
d32a0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
d32c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
d32e0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
d3300 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
d3320 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
d3340 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 | GIN...DELETE.FROM.counts.WHERE.r |
d3360 | 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 6f 6e 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 | andom()AND.n=.json(1)=1;...UPDAT |
d3380 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
d33a0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
d33c0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
d33e0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
d3400 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
d3420 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
d3440 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
d3460 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
d3480 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
d34a0 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
d34c0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a-4;.DELET |
d34e0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8b 2d 04 00 8a 7b 43 52 45 | E.FROM.t1.WHERE.a=7;..;.-...{CRE |
d3500 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
d3520 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
d3540 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
d3560 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
d3580 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
d35a0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
d35c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
d35e0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
d3600 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 | GIN...DELETE.FROM.counts.WHERE.r |
d3620 | 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 68 65 78 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 | andom()AND.n=.hex(1)=1;...UPDATE |
d3640 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
d3660 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d3680 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d36a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d36c0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
d36e0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d3700 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
d3720 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
d3740 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
d3760 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
d3780 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
d37a0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 2c 04 00 8b 01 43 52 45 41 | .FROM.t1.WHERE.a=7;..>.,....CREA |
d37c0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
d37e0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
d3800 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
d3820 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
d3840 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
d3860 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
d3880 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
d38a0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
d38c0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 | IN...DELETE.FROM.counts.WHERE.ra |
d38e0 | 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 68 65 78 28 31 29 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 | ndom()AND.n=.hex(1)-01=1;...UPDA |
d3900 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
d3920 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
d3940 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
d3960 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
d3980 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
d39a0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
d39c0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
d39e0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
d3a00 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
d3a20 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
d3a40 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a-4;.DELE |
d3a60 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 2b 04 00 8b 01 43 52 | TE.FROM.t1.WHERE.a=7;..>.+....CR |
d3a80 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
d3aa0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
d3ac0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
d3ae0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
d3b00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d3b20 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d3b40 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d3b60 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
d3b80 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d3ba0 | 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 67 6c 6f 62 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 | random()AND.n=.glob(1,1)=1;...UP |
d3bc0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
d3be0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
d3c00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
d3c20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
d3c40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
d3c60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
d3c80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
d3ca0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
d3cc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
d3ce0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
d3d00 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a-4;.DE |
d3d20 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 44 8b 2a 04 00 8b 0d | LETE.FROM.t1.WHERE.a=7;..D.*.... |
d3d40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
d3d60 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
d3d80 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
d3da0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
d3dc0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
d3de0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
d3e00 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
d3e20 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
d3e40 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
d3e60 | 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 | E.random()AND.n=.datetime(1,1,1) |
d3e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d3ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
d3ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d3ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d3f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d3f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d3f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d3f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d3f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d3fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d3fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d3fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
d4000 | 0d 00 00 00 0b 01 63 00 1d 3a 1a 74 17 a8 14 e6 12 25 0f 64 0c a0 09 df 07 0b 04 37 01 63 00 00 | ......c..:.t.....%.d.......7.c.. |
d4020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d40a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d40c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d40e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d4160 | 00 00 00 85 50 8b 3f 04 00 8b 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ....P.?...%CREATE.TABLE.t1(a.INT |
d4180 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
d41a0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
d41c0 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
d41e0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
d4200 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
d4220 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
d4240 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
d4260 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
d4280 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 73 71 6c 69 | counts.WHERE.random()AND.n=.sqli |
d42a0 | 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 39 29 3d 31 3b 0a 20 20 55 50 44 | te_compileoption_get(9)=1;...UPD |
d42c0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
d42e0 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
d4300 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
d4320 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
d4340 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
d4360 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
d4380 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
d43a0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
d43c0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
d43e0 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
d4400 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
d4420 | 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 50 8b 3e 04 00 8b 25 43 | ETE.FROM.t1.WHERE.a=7;..P.>...%C |
d4440 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
d4460 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
d4480 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
d44a0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
d44c0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
d44e0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
d4500 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
d4520 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
d4540 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
d4560 | 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 | .random()AND.n=.sqlite_compileop |
d4580 | 74 69 6f 6e 5f 67 65 74 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | tion_get(1)=1;...UPDATE.counts.S |
d45a0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
d45c0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
d45e0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
d4600 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
d4620 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
d4640 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
d4660 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
d4680 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
d46a0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
d46c0 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
d46e0 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=1;.DELETE.FROM.t1. |
d4700 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 50 8b 3d 04 00 8b 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..P.=...%CREATE.TABLE. |
d4720 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
d4740 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
d4760 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
d4780 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
d47a0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
d47c0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
d47e0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
d4800 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
d4820 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 | TE.FROM.counts.WHERE.random()AND |
d4840 | 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 3d | .n=.sqlite_compileoption_get(1)= |
d4860 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
d4880 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
d48a0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
d48c0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
d48e0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
d4900 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
d4920 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
d4940 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
d4960 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
d4980 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
d49a0 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 72 61 6e 64 6f 6d 28 | 4),(7);.UPDATE.t1.SET.a=.random( |
d49c0 | 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 | )=4;.DELETE.FROM.t1.WHERE.a=7;.. |
d49e0 | 3d 8b 3c 04 00 8a 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | =.<....CREATE.TABLE.t1(a.INT);.C |
d4a00 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
d4a20 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
d4a40 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
d4a60 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
d4a80 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
d4aa0 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
d4ac0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
d4ae0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
d4b00 | 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 71 75 6f 74 65 28 31 29 | ts.WHERE.random()AND.n=.quote(1) |
d4b20 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d4b40 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
d4b60 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d4b80 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d4ba0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d4bc0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d4be0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d4c00 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d4c20 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d4c40 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d4c60 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d4c80 | 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a-4;.DELETE.FROM.t1.WHERE.a=7;. |
d4ca0 | 85 40 8b 3b 04 00 8b 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .@.;....CREATE.TABLE.t1(a.INT);. |
d4cc0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
d4ce0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
d4d00 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
d4d20 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
d4d40 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
d4d60 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
d4d80 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
d4da0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
d4dc0 | 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 70 72 69 6e 74 66 28 | nts.WHERE.random()AND.n=.printf( |
d4de0 | 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | 1,1)=1;...UPDATE.counts.SET.n=n- |
d4e00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
d4e20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
d4e40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
d4e60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
d4e80 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
d4ea0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
d4ec0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
d4ee0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
d4f00 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
d4f20 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
d4f40 | 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a-4;.DELETE.FROM.t1.WHERE.a |
d4f60 | 3d 37 3b 0a 85 3d 8b 3a 04 00 8a 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..=.:....CREATE.TABLE.t1(a.IN |
d4f80 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
d4fa0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
d4fc0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
d4fe0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
d5000 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
d5020 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
d5040 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
d5060 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
d5080 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6d 61 78 | .counts.WHERE.random()AND.n=.max |
d50a0 | 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | (1,1)=1;...UPDATE.counts.SET.n=n |
d50c0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
d50e0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
d5100 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
d5120 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
d5140 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
d5160 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
d5180 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
d51a0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
d51c0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
d51e0 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
d5200 | 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a-4;.DELETE.FROM.t1.WHERE. |
d5220 | 61 3d 37 3b 0a 85 3d 8b 39 04 00 8a 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..=.9....CREATE.TABLE.t1(a.I |
d5240 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
d5260 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
d5280 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
d52a0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
d52c0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
d52e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
d5300 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
d5320 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
d5340 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6c 6f | M.counts.WHERE.random()AND.n=.lo |
d5360 | 77 65 72 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | wer(1)=1;...UPDATE.counts.SET.n= |
d5380 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
d53a0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
d53c0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
d53e0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
d5400 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
d5420 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
d5440 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d5460 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
d5480 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
d54a0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
d54c0 | 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a-4;.DELETE.FROM.t1.WHERE |
d54e0 | 20 61 3d 37 3b 0a 85 3e 8b 38 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..>.8....CREATE.TABLE.t1(a. |
d5500 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
d5520 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
d5540 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
d5560 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
d5580 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
d55a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
d55c0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
d55e0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
d5600 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6c | OM.counts.WHERE.random()AND.n=.l |
d5620 | 65 6e 67 74 68 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ength(1)=1;...UPDATE.counts.SET. |
d5640 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
d5660 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
d5680 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
d56a0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
d56c0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
d56e0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
d5700 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
d5720 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
d5740 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
d5760 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
d5780 | 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a-4;.DELETE.FROM.t1.WHE |
d57a0 | 52 45 20 61 3d 37 3b 0a 85 48 8b 37 04 00 8b 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..H.7....CREATE.TABLE.t1( |
d57c0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
d57e0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
d5800 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
d5820 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
d5840 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
d5860 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
d5880 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
d58a0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
d58c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d | FROM.counts.WHERE.random()AND.n= |
d58e0 | 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 | .last_insert_rowid()=1;...UPDATE |
d5900 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
d5920 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d5940 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d5960 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d5980 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
d59a0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d59c0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
d59e0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
d5a00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
d5a20 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
d5a40 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a-4;.DELETE |
d5a60 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8b 36 04 00 8b 09 43 52 45 41 | .FROM.t1.WHERE.a=7;..B.6....CREA |
d5a80 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
d5aa0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
d5ac0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
d5ae0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
d5b00 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
d5b20 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
d5b40 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
d5b60 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
d5b80 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 | IN...DELETE.FROM.counts.WHERE.ra |
d5ba0 | 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 31 29 3d 31 3b 0a 20 20 | ndom()AND.n=.json_valid(1)=1;... |
d5bc0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d5be0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
d5c00 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
d5c20 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
d5c40 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
d5c60 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
d5c80 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
d5ca0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
d5cc0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
d5ce0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
d5d00 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a-4;. |
d5d20 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8b 35 04 00 | DELETE.FROM.t1.WHERE.a=7;..B.5.. |
d5d40 | 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
d5d60 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
d5d80 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
d5da0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
d5dc0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
d5de0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
d5e00 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
d5e20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
d5e40 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
d5e60 | 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 | ERE.random()AND.n=.json_test1(1) |
d5e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d5ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
d5ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d5ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d5f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d5f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d5f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d5f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d5f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d5fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d5fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d5fe0 | 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a-4;.DELETE.FROM.t1.WHERE.a=7;. |
d6000 | 0d 00 00 00 0b 01 62 00 1d 2b 1a 56 17 8b 14 c0 11 f6 0f 2c 0c 66 09 9e 06 dc 04 1a 01 62 00 00 | ......b..+.V.......,.f.......b.. |
d6020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d60a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d60c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d60e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d6160 | 00 00 85 34 8b 4a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ...4.J...mCREATE.TABLE.t1(a.INT) |
d6180 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
d61a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
d61c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
d61e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
d6200 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d6220 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d6240 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
d6260 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
d6280 | 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 2e 31 3b 0a 20 20 | ounts.WHERE.random()AND.n=.1;... |
d62a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d62c0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
d62e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
d6300 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
d6320 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
d6340 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
d6360 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
d6380 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
d63a0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
d63c0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
d63e0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a-4;. |
d6400 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 49 04 00 | DELETE.FROM.t1.WHERE.a=7;..>.I.. |
d6420 | 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
d6440 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
d6460 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
d6480 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
d64a0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
d64c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
d64e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
d6500 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
d6520 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
d6540 | 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 74 79 70 65 6f 66 28 31 29 3d 31 3b 0a | ERE.random()AND.n=.typeof(1)=1;. |
d6560 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
d6580 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
d65a0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
d65c0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
d65e0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
d6600 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
d6620 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
d6640 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
d6660 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
d6680 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
d66a0 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
d66c0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 48 | ;.DELETE.FROM.t1.WHERE.a=7;..>.H |
d66e0 | 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
d6700 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
d6720 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
d6740 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
d6760 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
d6780 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
d67a0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
d67c0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
d67e0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
d6800 | 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 74 79 70 65 6f 66 28 31 29 3d 31 | WHERE.random()AND.n=.typeof(1)=1 |
d6820 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
d6840 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
d6860 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
d6880 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
d68a0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
d68c0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
d68e0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
d6900 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
d6920 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
d6940 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
d6960 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
d6980 | 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 44 | -4;.DELETE.FROM.t1.WHERE.a=7;..D |
d69a0 | 8b 47 04 00 8b 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .G....CREATE.TABLE.t1(a.INT);.CR |
d69c0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
d69e0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
d6a00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
d6a20 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
d6a40 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
d6a60 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
d6a80 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
d6aa0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
d6ac0 | 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 74 6f 74 61 6c 5f 63 68 61 | s.WHERE.random()AND.n=.total_cha |
d6ae0 | 6e 67 65 73 28 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | nges()=1;...UPDATE.counts.SET.n= |
d6b00 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
d6b20 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
d6b40 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
d6b60 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
d6b80 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
d6ba0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
d6bc0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d6be0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
d6c00 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
d6c20 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
d6c40 | 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a-4;.DELETE.FROM.t1.WHERE |
d6c60 | 20 61 3d 37 3b 0a 85 42 8b 46 04 00 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..B.F....CREATE.TABLE.t1(a. |
d6c80 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
d6ca0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
d6cc0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
d6ce0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
d6d00 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
d6d20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
d6d40 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
d6d60 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
d6d80 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 73 | OM.counts.WHERE.random()AND.n=.s |
d6da0 | 75 62 73 74 72 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | ubstr(1,1,1)=1;...UPDATE.counts. |
d6dc0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
d6de0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d6e00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d6e20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d6e40 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
d6e60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
d6e80 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
d6ea0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
d6ec0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
d6ee0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
d6f00 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a-4;.DELETE.FROM.t1 |
d6f20 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 46 8b 45 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..F.E....CREATE.TABLE |
d6f40 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
d6f60 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
d6f80 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
d6fa0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
d6fc0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
d6fe0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
d7000 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
d7020 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
d7040 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e | ETE.FROM.counts.WHERE.random()AN |
d7060 | 44 20 6e 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 | D.n=.strftime(1,1,1,1)=1;...UPDA |
d7080 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
d70a0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
d70c0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
d70e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
d7100 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
d7120 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
d7140 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
d7160 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
d7180 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
d71a0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
d71c0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
d71e0 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 46 8b 44 04 00 8b 11 43 52 | TE.FROM.t1.WHERE.a=7;..F.D....CR |
d7200 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
d7220 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
d7240 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
d7260 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
d7280 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d72a0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d72c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d72e0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
d7300 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d7320 | 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 | random()AND.n=.strftime(1,1,1,1) |
d7340 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d7360 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
d7380 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d73a0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d73c0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d73e0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d7400 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d7420 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d7440 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d7460 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d7480 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d74a0 | 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a-4;.DELETE.FROM.t1.WHERE.a=7;. |
d74c0 | 85 47 8b 43 04 00 8b 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .G.C....CREATE.TABLE.t1(a.INT);. |
d74e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
d7500 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
d7520 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
d7540 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
d7560 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
d7580 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
d75a0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
d75c0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
d75e0 | 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 73 71 6c 69 74 65 5f | nts.WHERE.random()AND.n=.sqlite_ |
d7600 | 73 6f 75 72 63 65 5f 69 64 28 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | source_id()=1;...UPDATE.counts.S |
d7620 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
d7640 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
d7660 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
d7680 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
d76a0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
d76c0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
d76e0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
d7700 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
d7720 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
d7740 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
d7760 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
d7780 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 47 8b 42 04 00 8b 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..G.B....CREATE.TABLE. |
d77a0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
d77c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
d77e0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
d7800 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
d7820 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
d7840 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
d7860 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
d7880 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
d78a0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 | TE.FROM.counts.WHERE.random()AND |
d78c0 | 20 6e 3d 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 3d 31 3b 0a 20 20 55 50 44 41 | .n=.sqlite_source_id()=1;...UPDA |
d78e0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
d7900 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
d7920 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
d7940 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
d7960 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
d7980 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
d79a0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
d79c0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
d79e0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
d7a00 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
d7a20 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a-4;.DELE |
d7a40 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 51 8b 41 04 00 8b 27 43 52 | TE.FROM.t1.WHERE.a=7;..Q.A...'CR |
d7a60 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
d7a80 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
d7aa0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
d7ac0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
d7ae0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d7b00 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d7b20 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d7b40 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
d7b60 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d7b80 | 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 | random()AND.n=.sqlite_compileopt |
d7ba0 | 69 6f 6e 5f 75 73 65 64 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ion_used(1)=1;...UPDATE.counts.S |
d7bc0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
d7be0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
d7c00 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
d7c20 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
d7c40 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
d7c60 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
d7c80 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
d7ca0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
d7cc0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
d7ce0 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
d7d00 | 54 20 61 3d 37 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=7.WHERE.a-4;.DELETE.FROM.t1. |
d7d20 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 51 8b 40 04 00 8b 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..Q.@...'CREATE.TABLE. |
d7d40 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
d7d60 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
d7d80 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
d7da0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
d7dc0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
d7de0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
d7e00 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
d7e20 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
d7e40 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 | TE.FROM.counts.WHERE.random()AND |
d7e60 | 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 | .n=.sqlite_compileoption_used(1) |
d7e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d7ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
d7ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d7ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d7f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d7f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d7f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d7f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d7f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d7fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d7fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d7fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
d8000 | 0d 00 00 00 0b 01 a6 00 1d 3e 1a 78 17 b6 14 f4 12 32 0f 70 0c ae 09 ec 07 2a 04 68 01 a6 00 00 | .........>.x.....2.p.....*.h.... |
d8020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d80a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d80c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d80e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d8180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
d81a0 | 00 00 00 00 00 00 85 3e 8b 55 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .......>.U....CREATE.TABLE.t1(a. |
d81c0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
d81e0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
d8200 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
d8220 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
d8240 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
d8260 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
d8280 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
d82a0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
d82c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 32 30 | OM.counts.WHERE.random()AND.n=20 |
d82e0 | 30 31 2e 30 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | 01.01-01=1;...UPDATE.counts.SET. |
d8300 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
d8320 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
d8340 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
d8360 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
d8380 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
d83a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
d83c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
d83e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
d8400 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
d8420 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
d8440 | 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a-4;.DELETE.FROM.t1.WHE |
d8460 | 52 45 20 61 3d 37 3b 0a 85 3e 8b 54 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..>.T....CREATE.TABLE.t1( |
d8480 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
d84a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
d84c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
d84e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
d8500 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
d8520 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
d8540 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
d8560 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
d8580 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d | FROM.counts.WHERE.random()AND.n= |
d85a0 | 32 30 30 31 2d 3f 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | 2001-?1-01=1;...UPDATE.counts.SE |
d85c0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
d85e0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
d8600 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
d8620 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
d8640 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
d8660 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
d8680 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
d86a0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
d86c0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
d86e0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
d8700 | 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a-4;.DELETE.FROM.t1.W |
d8720 | 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 53 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..>.S....CREATE.TABLE.t |
d8740 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
d8760 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
d8780 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
d87a0 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
d87c0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
d87e0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
d8800 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
d8820 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
d8840 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 | E.FROM.counts.WHERE.random()AND. |
d8860 | 6e 3d 32 30 30 31 2d 30 31 2e 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | n=2001-01.01=1;...UPDATE.counts. |
d8880 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
d88a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d88c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d88e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d8900 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
d8920 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
d8940 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
d8960 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
d8980 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
d89a0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
d89c0 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a-4;.DELETE.FROM.t1 |
d89e0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 52 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..>.R....CREATE.TABLE |
d8a00 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
d8a20 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
d8a40 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
d8a60 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
d8a80 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
d8aa0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
d8ac0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
d8ae0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
d8b00 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e | ETE.FROM.counts.WHERE.random()AN |
d8b20 | 44 20 6e 3d 32 30 30 31 2d 30 31 2d 4e 55 4c 4c 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | D.n=2001-01-NULL;...UPDATE.count |
d8b40 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
d8b60 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
d8b80 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
d8ba0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
d8bc0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
d8be0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
d8c00 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
d8c20 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
d8c40 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
d8c60 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
d8c80 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a-4;.DELETE.FROM. |
d8ca0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 51 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..>.Q....CREATE.TAB |
d8cc0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
d8ce0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
d8d00 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
d8d20 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
d8d40 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
d8d60 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
d8d80 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
d8da0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
d8dc0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 | ELETE.FROM.counts.WHERE.random() |
d8de0 | 41 4e 44 20 6e 3d 32 30 30 31 2d 30 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | AND.n=2001-01-01=1;...UPDATE.cou |
d8e00 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
d8e20 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
d8e40 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
d8e60 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
d8e80 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
d8ea0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
d8ec0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
d8ee0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
d8f00 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
d8f20 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 3f 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(?);.UPDATE. |
d8f40 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a-4;.DELETE.FRO |
d8f60 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 50 04 00 8b 01 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..>.P....CREATE.T |
d8f80 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
d8fa0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
d8fc0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
d8fe0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
d9000 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
d9020 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
d9040 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
d9060 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
d9080 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d | .DELETE.FROM.counts.WHERE.random |
d90a0 | 28 29 41 4e 44 20 6e 3d 32 30 30 31 2d 30 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ()AND.n=2001-01-01=1;...UPDATE.c |
d90c0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
d90e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(n,n).VALUES( |
d9100 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
d9120 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
d9140 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
d9160 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
d9180 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
d91a0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
d91c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
d91e0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
d9200 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a-4;.DELETE.F |
d9220 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 4f 04 00 8b 01 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..>.O....CREATE |
d9240 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
d9260 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
d9280 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
d92a0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
d92c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
d92e0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
d9300 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
d9320 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
d9340 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 | ...DELETE.FROM.counts.WHERE.rand |
d9360 | 6f 6d 28 29 41 4e 44 20 6e 3d 32 30 30 31 2d 30 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 | om()AND.n=2001-01-01=1;...UPDATE |
d9380 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 6e 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.n=old.a; |
d93a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d93c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d93e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d9400 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
d9420 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d9440 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
d9460 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
d9480 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
d94a0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
d94c0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a-4;.DELETE |
d94e0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 4e 04 00 8b 01 43 52 45 41 | .FROM.t1.WHERE.a=7;..>.N....CREA |
d9500 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
d9520 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
d9540 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
d9560 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
d9580 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
d95a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
d95c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
d95e0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
d9600 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 | IN...DELETE.FROM.counts.WHERE.ra |
d9620 | 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 32 30 30 31 2d 30 31 2d 30 31 3d 31 3b 0a 20 20 55 50 44 41 | ndom()AND.n=2001-01-01=1;...UPDA |
d9640 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 | TE.counts.SET.n=n-.replace(1,1,1 |
d9660 | 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | );...INSERT.INTO.counts(v,n).VAL |
d9680 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
d96a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
d96c0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
d96e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
d9700 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
d9720 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
d9740 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
d9760 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
d9780 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a-4;.DELE |
d97a0 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 4d 04 00 8b 01 43 52 | TE.FROM.t1.WHERE.a=7;..>.M....CR |
d97c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
d97e0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
d9800 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
d9820 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
d9840 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
d9860 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
d9880 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
d98a0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
d98c0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
d98e0 | 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 32 30 30 31 2d 30 31 2d 30 31 2d 31 3b 0a 20 20 55 50 | random()AND.n=2001-01-01-1;...UP |
d9900 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
d9920 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
d9940 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
d9960 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
d9980 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
d99a0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
d99c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
d99e0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
d9a00 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
d9a20 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
d9a40 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a-4;.DE |
d9a60 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8b 4c 04 00 8b 09 | LETE.FROM.t1.WHERE.a=7;..B.L.... |
d9a80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
d9aa0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
d9ac0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
d9ae0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
d9b00 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
d9b20 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
d9b40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
d9b60 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
d9b80 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
d9ba0 | 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 32 30 30 31 2d 30 20 7c 7c 20 31 2d 30 31 3d 31 | E.random()AND.n=2001-0.||.1-01=1 |
d9bc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
d9be0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
d9c00 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
d9c20 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
d9c40 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
d9c60 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
d9c80 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
d9ca0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
d9cc0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
d9ce0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
d9d00 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
d9d20 | 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e | -4;.DELETE.FROM.t1.WHERE.a=7;..> |
d9d40 | 8b 4b 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .K....CREATE.TABLE.t1(a.INT);.CR |
d9d60 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
d9d80 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
d9da0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
d9dc0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
d9de0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
d9e00 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
d9e20 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
d9e40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
d9e60 | 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 32 30 30 2f 2d 30 31 2d 30 31 | s.WHERE.random()AND.n=200/-01-01 |
d9e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
d9ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
d9ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
d9ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
d9f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
d9f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
d9f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
d9f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
d9f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
d9fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
d9fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
d9fe0 | 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a-4;.DELETE.FROM.t1.WHERE.a=7;. |
da000 | 0d 00 00 00 0b 02 0e 00 1d 3e 1a 86 17 ce 15 16 12 5e 0f a6 0c ee 0a 36 07 7e 04 c6 02 0e 00 00 | .........>.......^.....6.~...... |
da020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
da200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8b 60 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | ...............4.`...mCREATE.TAB |
da220 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
da240 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
da260 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
da280 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
da2a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
da2c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
da2e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
da300 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
da320 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 | ELETE.FROM.counts.WHERE.random() |
da340 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
da360 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
da380 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
da3a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
da3c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
da3e0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
da400 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
da420 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
da440 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
da460 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
da480 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
da4a0 | 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 00 57 48 45 52 45 | .WHERE.a-4;.DELETE.FROM.t1.WHERE |
da4c0 | 20 61 3d 37 3b 0a 85 34 8b 5f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4._...mCREATE.TABLE.t1(a. |
da4e0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
da500 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
da520 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
da540 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
da560 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
da580 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
da5a0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
da5c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
da5e0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.random()AND.n==1 |
da600 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
da620 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
da640 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
da660 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
da680 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
da6a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
da6c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=CURRENT_TIME=1;...UP |
da6e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
da700 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
da720 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
da740 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
da760 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 | =4;.DELETE.FROM.t1.WHERE.a=7;..4 |
da780 | 8b 5e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .^...mCREATE.TABLE.t1(a.INT);.CR |
da7a0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
da7c0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
da7e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
da800 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
da820 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
da840 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
da860 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
da880 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
da8a0 | 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.random()AND.n==1;...UPDA |
da8c0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
da8e0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
da900 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
da920 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
da940 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
da960 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
da980 | 45 20 76 3d 20 70 72 69 6e 74 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=.printf(1,1)=1;...UPDATE.cou |
da9a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
da9c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
da9e0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
daa00 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
daa20 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 5d 04 00 8a 6d 43 52 | TE.FROM.t1.WHERE.a=7;..4.]...mCR |
daa40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
daa60 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
daa80 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
daaa0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
daac0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
daae0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
dab00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
dab20 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
dab40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
dab60 | 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | random()AND.n==1;...UPDATE.count |
dab80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
daba0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
dabc0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
dabe0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
dac00 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
dac20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d | .DELETE.FROM.counts.WHERE.random |
dac40 | 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ()AND.n==1;...UPDATE.counts.SET. |
dac60 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
dac80 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
daca0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
dacc0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
dace0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 5c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..4.\...mCREATE.TAB |
dad00 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
dad20 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
dad40 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
dad60 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
dad80 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
dada0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
dadc0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
dade0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
dae00 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 | ELETE.FROM.counts.WHERE.random() |
dae20 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
dae40 | 6e 2d 31 20 57 48 45 52 45 20 20 68 65 78 28 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE..hex(1);...INSERT.INTO |
dae60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
dae80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
daea0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
daec0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
daee0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
daf00 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
daf20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
daf40 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
daf60 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
daf80 | 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a-4;.DELETE.FROM.t1.WHERE |
dafa0 | 20 61 3d 37 3b 0a 85 34 8b 5b 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.[...mCREATE.TABLE.t1(a. |
dafc0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
dafe0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
db000 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
db020 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
db040 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
db060 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
db080 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
db0a0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
db0c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.random()AND.n==1 |
db0e0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 65 70 6c 61 | ;...UPDATE.counts.SET.n=n-.repla |
db100 | 63 65 28 31 2c 31 2c 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | ce(1,1,1);...INSERT.INTO.counts( |
db120 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
db140 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
db160 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
db180 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
db1a0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
db1c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
db1e0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
db200 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
db220 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
db240 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 | =4;.DELETE.FROM.t1.WHERE.a=7;..4 |
db260 | 8b 5a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .Z...mCREATE.TABLE.t1(a.INT);.CR |
db280 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
db2a0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
db2c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
db2e0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
db300 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
db320 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
db340 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
db360 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
db380 | 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.random()AND.n==1;...UPDA |
db3a0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 6c 6f 77 65 72 28 31 29 3d 6f 6c 64 2e | TE.counts.SET.n=n-.lower(1)=old. |
db3c0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
db3e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
db400 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
db420 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
db440 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
db460 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
db480 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
db4a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
db4c0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
db4e0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
db500 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 59 04 00 8a 6d 43 52 | TE.FROM.t1.WHERE.a=7;..4.Y...mCR |
db520 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
db540 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
db560 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
db580 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
db5a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
db5c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
db5e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
db600 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
db620 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
db640 | 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | random()AND.n==1;...UPDATE.count |
db660 | 73 20 53 45 54 20 6e 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=.unicode(1)=old.a;...INS |
db680 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
db6a0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
db6c0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
db6e0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
db700 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
db720 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
db740 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
db760 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
db780 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
db7a0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a-4;.DELETE.FROM. |
db7c0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 58 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..4.X...mCREATE.TAB |
db7e0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
db800 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
db820 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
db840 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
db860 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
db880 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
db8a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
db8c0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
db8e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 | ELETE.FROM.counts.WHERE.random() |
db900 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
db920 | 20 72 74 72 69 6d 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .rtrim(1,1)=old.a;...INSERT.INTO |
db940 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
db960 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
db980 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
db9a0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
db9c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
db9e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
dba00 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
dba20 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
dba40 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
dba60 | 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a-4;.DELETE.FROM.t1.WHERE |
dba80 | 20 61 3d 37 3b 0a 85 34 8b 57 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.W...mCREATE.TABLE.t1(a. |
dbaa0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
dbac0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
dbae0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
dbb00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
dbb20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
dbb40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
dbb60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
dbb80 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
dbba0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.random()AND.n==1 |
dbbc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 22 61 22 57 48 45 52 | ;...UPDATE.counts.SET.n=."a"WHER |
dbbe0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
dbc00 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
dbc20 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
dbc40 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
dbc60 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
dbc80 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
dbca0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
dbcc0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
dbce0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
dbd00 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
dbd20 | 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e | -4;.DELETE.FROM.t1.WHERE.a=7;..> |
dbd40 | 8b 56 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .V....CREATE.TABLE.t1(a.INT);.CR |
dbd60 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
dbd80 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
dbda0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
dbdc0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
dbde0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
dbe00 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
dbe20 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
dbe40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
dbe60 | 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 32 3c 30 31 2d 30 31 2d 30 31 | s.WHERE.random()AND.n=2<01-01-01 |
dbe80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
dbea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
dbec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
dbee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
dbf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
dbf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
dbf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
dbf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
dbf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
dbfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
dbfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
dbfe0 | 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a-4;.DELETE.FROM.t1.WHERE.a=7;. |
dc000 | 0d 00 00 00 0b 02 a5 00 1d 48 1a 90 17 d1 15 0f 12 57 0f 9f 0c dd 0a 25 07 6d 04 b5 02 a5 00 00 | .........H.......W.....%.m...... |
dc020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
dc2a0 | 00 00 00 00 00 84 0c 8b 6b 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ........k....CREATE.TABLE.t1(a.I |
dc2c0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
dc2e0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
dc300 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
dc320 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
dc340 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
dc360 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
dc380 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
dc3a0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
dc3c0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 73 75 62 73 74 72 28 31 2c 31 2c 31 29 3d 3d 31 3b | M.counts.WHERE.substr(1,1,1)==1; |
dc3e0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 3f 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-?.WHERE |
dc400 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
dc420 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
dc440 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
dc460 | 44 3b 0a 43 52 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | D;.CR(3),(1),(3),(2),(4),(7);.UP |
dc480 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
dc4a0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 6a 04 00 8a 6d 43 52 45 | E.FROM.t1.WHERE.a=7;..4.j...mCRE |
dc4c0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
dc4e0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
dc500 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
dc520 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
dc540 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
dc560 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
dc580 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
dc5a0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
dc5c0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 73 | GIN...DELETE.FROM.counts.WHERE.s |
dc5e0 | 75 62 73 74 72 28 31 2c 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | ubstr(1,1,1)==1;...UPDATE.counts |
dc600 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
dc620 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
dc640 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
dc660 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
dc680 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
dc6a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
dc6c0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
dc6e0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
dc700 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
dc720 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
dc740 | 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=52001-01-01;.DELETE.FROM.t |
dc760 | 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 69 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c | 1.WHERE.a=7;..4.i...mCREATE.TABL |
dc780 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
dc7a0 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
dc7c0 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
dc7e0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
dc800 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
dc820 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
dc840 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
dc860 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
dc880 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 62 6c 6f | LETE.FROM.counts.WHERE.randomblo |
dc8a0 | 62 28 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | b(1)==1;...UPDATE.counts.SET.n=n |
dc8c0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c e4 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=ol..a;...INSERT.INTO. |
dc8e0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
dc900 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
dc920 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
dc940 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
dc960 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
dc980 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
dc9a0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
dc9c0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
dc9e0 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
dca00 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
dca20 | 61 3d 37 3b 0a 85 34 8b 68 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..4.h...mCREATE.TABLE.t1(a.I |
dca40 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
dca60 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
dca80 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
dcaa0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
dcac0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
dcae0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
dcb00 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
dcb20 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
dcb40 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 3d 3d 31 3b | M.counts.WHERE.randomblob(1)==1; |
dcb60 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
dcb80 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
dcba0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
dcbc0 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
dcbe0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
dcc00 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
dcc20 | 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.randomblob(1)==1;...UPD |
dcc40 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
dcc60 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
dcc80 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
dcca0 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
dccc0 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b | 4;.DELETE.FROM.t1.WHERE.a=7;..>. |
dcce0 | 67 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | g....CREATE.TABLE.t1(a.INT);.CRE |
dcd00 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
dcd20 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
dcd40 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
dcd60 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
dcd80 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
dcda0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
dcdc0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
dcde0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
dce00 | 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 2d 6e 3d 32 30 30 31 2d 30 31 2d 30 31 3d | .WHERE.random()AND-n=2001-01-01= |
dce20 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
dce40 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
dce60 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
dce80 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
dcea0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
dcec0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
dcee0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
dcf00 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
dcf20 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
dcf40 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
dcf60 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
dcf80 | 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 | a-4;.DELETE.FROM.t1.WHERE.a=7;.. |
dcfa0 | 34 8b 66 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | 4.f...mCREATE.TABLE.t1(a.INT);.C |
dcfc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
dcfe0 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
dd000 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
dd020 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
dd040 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
dd060 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
dd080 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
dd0a0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
dd0c0 | 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 76 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.random()AND.v==1;...UPD |
dd0e0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
dd100 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
dd120 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
dd140 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
dd160 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
dd180 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
dd1a0 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
dd1c0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
dd1e0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
dd200 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
dd220 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
dd240 | 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 65 04 00 8a 6d 43 | ETE.FROM.t1.WHERE.a=7;..4.e...mC |
dd260 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
dd280 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
dd2a0 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
dd2c0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
dd2e0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
dd300 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
dd320 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
dd340 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
dd360 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
dd380 | 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 76 3c 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .random()AND.v<=1;...UPDATE.coun |
dd3a0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
dd3c0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
dd3e0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
dd400 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
dd420 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
dd440 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
dd460 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
dd480 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
dd4a0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
dd4c0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
dd4e0 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
dd500 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8b 64 04 00 8b 01 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a=7;..>.d....CREATE.TA |
dd520 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
dd540 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
dd560 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
dd580 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
dd5a0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
dd5c0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
dd5e0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
dd600 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
dd620 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 | DELETE.FROM.counts.WHERE.random( |
dd640 | 29 41 4e 44 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | )AND.replace(1,1,1);...UPDATE.co |
dd660 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
dd680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
dd6a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
dd6c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
dd6e0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
dd700 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
dd720 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
dd740 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
dd760 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
dd780 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
dd7a0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a-4;.DELETE.FR |
dd7c0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8b 63 04 00 8a 7b 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..;.c...{CREATE. |
dd7e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
dd800 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
dd820 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
dd840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
dd860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
dd880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
dd8a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
dd8c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
dd8e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f | ..DELETE.FROM.counts.WHERE.rando |
dd900 | 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | m()AND.n==1;...UPDATE.counts.SET |
dd920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
dd940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
dd960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
dd980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 | ET.n=n+1;.END;EXPLAIN.CREATE.TRI |
dd9a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
dd9c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
dd9e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
dda00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
dda20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
dda40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
dda60 | 74 31 20 53 45 54 20 61 3d 37 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=7.WHERE.a-4;.DELETE.FRO |
dda80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 62 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.b...mCREATE.T |
ddaa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
ddac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
ddae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
ddb00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
ddb20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
ddb40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
ddb60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
ddb80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
ddba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d | .DELETE.FROM.counts.WHERE.random |
ddbc0 | 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ()AND.n==1;...UPDATE.counts.SET. |
ddbe0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
ddc00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
ddc20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
ddc40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
ddc60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
ddc80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
ddca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
ddcc0 | 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v>old.a;.END;.INSERT.INTO. |
ddce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
ddd00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
ddd20 | 3d 37 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =7.WHERE.a-4;.DELETE.FROM.t1.WHE |
ddd40 | 52 45 20 61 3d 37 3b 0a 85 34 8b 61 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.a...mCREATE.TABLE.t1( |
ddd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
ddd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
ddda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
dddc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
ddde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
dde00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
dde20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
dde40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
dde60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d | FROM.counts.WHERE.random()AND.n= |
dde80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
ddea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
ddec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
ddee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
ddf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
ddf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
ddf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
ddf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
ddf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
ddfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
ddfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
ddfe0 | 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a<4;.DELETE.FROM.t1.WHERE.a=7;. |
de000 | 0d 1a 90 00 0b 02 11 00 1d 48 1a 96 17 d8 15 20 12 68 0f b0 0c f8 0a 40 07 88 04 d0 02 11 00 00 | .........H.......h.....@........ |
de020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
de200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 3b 8b 76 04 00 8a 7b 43 52 45 41 54 45 20 | ..................;.v...{CREATE. |
de220 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
de240 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
de260 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
de280 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
de2a0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
de2c0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
de2e0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
de300 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
de320 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v<old |
de340 | 2e 61 20 41 4e 44 20 6e 3d 20 68 65 78 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | .a.AND.n=.hex(1)=1;...UPDATE.cou |
de360 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
de380 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
de3a0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
de3c0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
de3e0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
de400 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
de420 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
de440 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
de460 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
de480 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
de4a0 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
de4c0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 75 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.u...mCREATE.T |
de4e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
de500 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
de520 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
de540 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
de560 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
de580 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
de5a0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
de5c0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
de5e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 2f 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v/old. |
de600 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
de620 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
de640 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
de660 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
de680 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
de6a0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
de6c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
de6e0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
de700 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
de720 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
de740 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
de760 | 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =52001-01-01;.DELETE.FROM.t1.WHE |
de780 | 52 45 20 61 3d 37 3b 0a 85 34 8b 74 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.t...mCREATE.TABLE.t1( |
de7a0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
de7c0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
de7e0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
de800 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
de820 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
de840 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
de860 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
de880 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
de8a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 2f 43 55 52 52 45 4e 54 5f 54 49 4d 45 | FROM.counts.WHERE.v/CURRENT_TIME |
de8c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e | =1;...UPDATE.counts.SET.n=CURREN |
de8e0 | 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | T_TIMESTAMP;...INSERT.INTO.count |
de900 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
de920 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
de940 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
de960 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
de980 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
de9a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
de9c0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
de9e0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
dea00 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
dea20 | 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a+4;.DELETE.FROM.t1.WHERE.a=7;. |
dea40 | 85 34 8b 73 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.s...mCREATE.TABLE.t1(a.INT);. |
dea60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
dea80 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
deaa0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
deac0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
deae0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
deb00 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
deb20 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
deb40 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
deb60 | 6e 74 73 20 57 48 45 52 45 20 76 2b 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v+CURRENT_TIME=1;...UP |
deb80 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 | DATE.counts.SET.n=CURRENT_TIMEST |
deba0 | 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | AMP;...INSERT.INTO.counts(v,n).V |
debc0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
debe0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
dec00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
dec20 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
dec40 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
dec60 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
dec80 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
deca0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
decc0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a+4;.DE |
dece0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 72 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.r...m |
ded00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
ded20 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
ded40 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
ded60 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
ded80 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
deda0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
dedc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
dede0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
dee00 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
dee20 | 45 20 76 2a 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v*CURRENT_TIME=1;...UPDATE.cou |
dee40 | 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 | nts.SET.n=CURRENT_TIMESTAMP;...I |
dee60 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
dee80 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
deea0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
deec0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
deee0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
def00 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
def20 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
def40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
def60 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
def80 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a+4;.DELETE.FRO |
defa0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 71 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.q...mCREATE.T |
defc0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
defe0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
df000 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
df020 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
df040 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
df060 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
df080 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
df0a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
df0c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 26 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v&old. |
df0e0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
df100 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
df120 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
df140 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
df160 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
df180 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
df1a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
df1c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
df1e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
df200 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
df220 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
df240 | 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =52001-01-01;.DELETE.FROM.t1.WHE |
df260 | 52 45 20 61 3d 37 3b 0a 85 34 8b 70 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.p...mCREATE.TABLE.t1( |
df280 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
df2a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
df2c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
df2e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
df300 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
df320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
df340 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
df360 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
df380 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 26 43 55 52 52 45 4e 54 5f 54 49 4d 45 | FROM.counts.WHERE.v&CURRENT_TIME |
df3a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e | =1;...UPDATE.counts.SET.n=CURREN |
df3c0 | 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | T_TIMESTAMP;...INSERT.INTO.count |
df3e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
df400 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
df420 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
df440 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
df460 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
df480 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
df4a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
df4c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
df4e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
df500 | 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a+4;.DELETE.FROM.t1.WHERE.a=7;. |
df520 | 85 34 8b 6f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.o...mCREATE.TABLE.t1(a.INT);. |
df540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
df560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
df580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
df5a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
df5c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
df5e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
df600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
df620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
df640 | 6e 74 73 20 57 48 45 52 45 20 76 25 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v%old.a.AND.n==1;...UP |
df660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
df680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
df6a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
df6c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
df6e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
df700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
df720 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
df740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
df760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
df780 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
df7a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 | .UPDATE.t1.SET.a=52001-01-01;.DE |
df7c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8b 6e 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.n...m |
df7e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
df800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
df820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
df840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
df860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
df880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
df8a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
df8c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
df8e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
df900 | 45 20 76 25 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v%CURRENT_TIME=1;...UPDATE.cou |
df920 | 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 | nts.SET.n=CURRENT_TIMESTAMP;...I |
df940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
df960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
df980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
df9a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
df9c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
df9e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
dfa00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
dfa20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
dfa40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
dfa60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a+4;.DELETE.FRO |
dfa80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 00 00 00 06 04 00 85 2e 8b 6d 04 00 8a 61 43 52 | M.t1.WHERE.a=7;..........m...aCR |
dfaa0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
dfac0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
dfae0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
dfb00 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
dfb20 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
dfb40 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
dfb60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
dfb80 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
dfba0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
dfbc0 | 76 25 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | v%.json(1);...UPDATE.counts.SET. |
dfbe0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
dfc00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
dfc20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
dfc40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
dfc60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
dfc80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
dfca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
dfcc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
dfce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
dfd00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
dfd20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
dfd40 | 52 45 20 61 3d 37 3b 0a 85 34 8b 6c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.l...mCREATE.TABLE.t1( |
dfd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
dfd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
dfda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
dfdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
dfde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
dfe00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
dfe20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
dfe40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
dfe60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 73 75 62 73 74 72 28 31 2c 31 2c 31 29 3d | FROM.counts.WHERE.substr(1,1,1)= |
dfe80 | 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =N;...UPDATE.counts.SET.n=n-1.WH |
dfea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
dfec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
dfee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
dff00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
dff20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
dff40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
dff60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
dff80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
dffa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
dffc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
dffe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
e0000 | 0d 00 00 00 0b 01 79 00 1d 3a 1a 74 17 b0 14 ec 12 2b 0f 56 0c 8b 09 c1 06 fb 04 37 01 79 00 00 | ......y..:.t.....+.V.......7.y.. |
e0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e0160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 3a 8c 01 04 00 8a | ..........................:..... |
e0180 | 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | yCREATE.TABLE.t1(a.INT);.CREATE. |
e01a0 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
e01c0 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
e01e0 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
e0200 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
e0220 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
e0240 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
e0260 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
e0280 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
e02a0 | 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v<old.a.AND.n==1;...UPDATE.co |
e02c0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.6=old.a;... |
e02e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
e0300 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
e0320 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
e0340 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
e0360 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
e0380 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
e03a0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
e03c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
e03e0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
e0400 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
e0420 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 40 8c 00 04 00 8b 05 43 | OM.t1.WHERE.a=7;VACUUM..@......C |
e0440 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
e0460 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
e0480 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
e04a0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
e04c0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
e04e0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
e0500 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
e0520 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
e0540 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
e0560 | 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 74 69 6d 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 | .v<old.a.AND.n=.time(1,1,1)=1;.. |
e0580 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
e05a0 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
e05c0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
e05e0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
e0600 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
e0620 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
e0640 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
e0660 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
e0680 | 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 | ;.END;.INSERT.INTO.t1(a).VALUES( |
e06a0 | 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 | 1),(2),(1),(3),(1),(3),(2),(4),( |
e06c0 | 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b | 7);.UPDATE.t1.SET.a=5.WHERE.a=4; |
e06e0 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8b 7f 04 | .DELETE.FROM.t1.WHERE.a=7;..B... |
e0700 | 00 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
e0720 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
e0740 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
e0760 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
e0780 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
e07a0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
e07c0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
e07e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
e0800 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
e0820 | 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 75 62 73 74 72 28 31 2c 31 2c 31 | HERE.v<old.a.AND.n=.substr(1,1,1 |
e0840 | 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | )=1;...UPDATE.counts.SET.n=n-1.W |
e0860 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
e0880 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
e08a0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
e08c0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
e08e0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
e0900 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
e0920 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
e0940 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
e0960 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
e0980 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
e09a0 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
e09c0 | 0a 85 46 8b 7e 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..F.~....CREATE.TABLE.t1(a.INT); |
e09e0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
e0a00 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
e0a20 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
e0a40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
e0a60 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
e0a80 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
e0aa0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
e0ac0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
e0ae0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 74 72 66 74 69 | unts.WHERE.v<old.a.AND.n=.strfti |
e0b00 | 6d 65 28 31 2c 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | me(1,1,1,1)=1;...UPDATE.counts.S |
e0b20 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
e0b40 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
e0b60 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
e0b80 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
e0ba0 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
e0bc0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
e0be0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
e0c00 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
e0c20 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
e0c40 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
e0c60 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
e0c80 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 47 8b 7d 04 00 8b 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..G.}....CREATE.TABLE. |
e0ca0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
e0cc0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
e0ce0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
e0d00 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
e0d20 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
e0d40 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
e0d60 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
e0d80 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
e0da0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v<old.a.AND |
e0dc0 | 20 6e 3d 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 3d 31 3b 0a 20 20 55 50 44 41 | .n=.sqlite_source_id()=1;...UPDA |
e0de0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
e0e00 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
e0e20 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
e0e40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
e0e60 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
e0e80 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
e0ea0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
e0ec0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
e0ee0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
e0f00 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
e0f20 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
e0f40 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 51 8b 7c 04 00 8b 27 43 52 | TE.FROM.t1.WHERE.a=7;..Q.|...'CR |
e0f60 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
e0f80 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
e0fa0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
e0fc0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
e0fe0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
e1000 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
e1020 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
e1040 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
e1060 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
e1080 | 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 | v<old.a.AND.n=.sqlite_compileopt |
e10a0 | 69 6f 6e 5f 75 73 65 64 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ion_used(1)=1;...UPDATE.counts.S |
e10c0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
e10e0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
e1100 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
e1120 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
e1140 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
e1160 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
e1180 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
e11a0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
e11c0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
e11e0 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
e1200 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
e1220 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 3d 8b 7b 04 00 8a 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..=.{....CREATE.TABLE. |
e1240 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
e1260 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
e1280 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
e12a0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
e12c0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
e12e0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
e1300 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
e1320 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
e1340 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v<old.a.AND |
e1360 | 20 6e 3d 20 71 75 6f 74 65 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | .n=.quote(1)=1;...UPDATE.counts. |
e1380 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
e13a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
e13c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
e13e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
e1400 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
e1420 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
e1440 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
e1460 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
e1480 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
e14a0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
e14c0 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
e14e0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 40 8b 7a 04 00 8b 05 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..@.z....CREATE.TABLE |
e1500 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
e1520 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
e1540 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
e1560 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
e1580 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e15a0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e15c0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e15e0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
e1600 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v<old.a.AN |
e1620 | 44 20 6e 3d 20 70 72 69 6e 74 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | D.n=.printf(1,1)=1;...UPDATE.cou |
e1640 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
e1660 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e1680 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e16a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e16c0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
e16e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
e1700 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
e1720 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
e1740 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
e1760 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
e1780 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
e17a0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 40 8b 79 04 00 8b 05 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..@.y....CREATE.T |
e17c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
e17e0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
e1800 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
e1820 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
e1840 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
e1860 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
e1880 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
e18a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
e18c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
e18e0 | 61 20 41 4e 44 20 6e 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 | a.AND.n=.nullif(1,1)=1;...UPDATE |
e1900 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e1920 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
e1940 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
e1960 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
e1980 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
e19a0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
e19c0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
e19e0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
e1a00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
e1a20 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
e1a40 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
e1a60 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8b 78 04 00 8b 09 43 52 45 41 | .FROM.t1.WHERE.a=7;..B.x....CREA |
e1a80 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
e1aa0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
e1ac0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
e1ae0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
e1b00 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e1b20 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e1b40 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e1b60 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
e1b80 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
e1ba0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 31 29 3d 31 3b 0a 20 20 | old.a.AND.n=.json_valid(1)=1;... |
e1bc0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e1be0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
e1c00 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
e1c20 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
e1c40 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
e1c60 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
e1c80 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
e1ca0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e1cc0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
e1ce0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
e1d00 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
e1d20 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8b 77 04 00 | DELETE.FROM.t1.WHERE.a=7;..B.w.. |
e1d40 | 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
e1d60 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
e1d80 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
e1da0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
e1dc0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
e1de0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
e1e00 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
e1e20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
e1e40 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
e1e60 | 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 | ERE.v<old.a.AND.n=.json_test1(1) |
e1e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
e1ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
e1ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
e1ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
e1f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
e1f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
e1f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
e1f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e1f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
e1fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
e1fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
e1fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
e2000 | 0d 00 00 00 0b 02 21 00 1d 48 1a 89 17 d1 15 19 12 61 0f a9 0c ec 0a 34 07 77 04 b8 02 21 00 00 | ......!..H.......a.....4.w...!.. |
e2020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e21a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e21c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e21e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e2220 | 00 85 13 8c 0c 04 00 8a 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ........+CREATE.TABLE.t1(a.INT); |
e2240 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
e2260 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
e2280 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
e22a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
e22c0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
e22e0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
e2300 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
e2320 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
e2340 | 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v<old.a.AND.n==1;...U |
e2360 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
e2380 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
e23a0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
e23c0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
e23e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
e2400 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
e2420 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
e2440 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
e2460 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
e2480 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
e24a0 | 3b 52 45 49 4e 44 45 58 20 72 74 72 69 6d 28 31 2c 31 29 20 74 31 20 53 85 3b 8c 0b 04 00 8a 7b | ;REINDEX.rtrim(1,1).t1.S.;.....{ |
e24c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
e24e0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
e2500 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
e2520 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
e2540 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
e2560 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
e2580 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
e25a0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
e25c0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
e25e0 | 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v<old.a.AND.n==1;...UPDATE.cou |
e2600 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
e2620 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e2640 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e2660 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e2680 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
e26a0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
e26c0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
e26e0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
e2700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
e2720 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 45 58 50 4c 41 49 4e 0a | (3),(1),(3),(2),(4),(7);EXPLAIN. |
e2740 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
e2760 | 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 39 8c 0a 04 00 8a 77 43 | ETE.FROM.t1.WHERE.a=7;..9.....wC |
e2780 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
e27a0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
e27c0 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
e27e0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
e2800 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
e2820 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
e2840 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
e2860 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
e2880 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
e28a0 | 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v<old.a.AND.n==1;...UPDATE.coun |
e28c0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
e28e0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
e2900 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
e2920 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
e2940 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
e2960 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
e2980 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
e29a0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
e29c0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 20 4d 41 54 43 48 2d 31 32 29 2c | T.INTO.t1(a).VALUES(1.MATCH-12), |
e29e0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
e2a00 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
e2a20 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 09 04 00 8a 6d 43 52 45 41 | .FROM.t1.WHERE.a=7;..4.....mCREA |
e2a40 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
e2a60 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
e2a80 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
e2aa0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
e2ac0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e2ae0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e2b00 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e2b20 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
e2b40 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
e2b60 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
e2b80 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
e2ba0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
e2bc0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
e2be0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
e2c00 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
e2c20 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
e2c40 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
e2c60 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
e2c80 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 20 2d 31 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1.-12),(1),(3), |
e2ca0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
e2cc0 | 45 54 20 61 3d 20 6c 6f 77 65 72 28 31 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=.lower(1)=4;.DELETE.FROM.t1 |
e2ce0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 39 8c 08 04 00 8a 77 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..9.....wCREATE.TABLE |
e2d00 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
e2d20 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
e2d40 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
e2d60 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
e2d80 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e2da0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e2dc0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e2de0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
e2e00 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v<old.a.AN |
e2e20 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
e2e40 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
e2e60 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
e2e80 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
e2ea0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
e2ec0 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
e2ee0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 44 41 54 45 47 52 | OM.counts.WHERE.v=CURRENT_DATEGR |
e2f00 | 4f 55 50 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | OUP=1;...UPDATE.counts.SET.n=n-1 |
e2f20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
e2f40 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
e2f60 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
e2f80 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
e2fa0 | 45 52 45 20 61 3d 37 3b 0a 85 34 8c 07 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..4.....mCREATE.TABLE.t1 |
e2fc0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
e2fe0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
e3000 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
e3020 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
e3040 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
e3060 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
e3080 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
e30a0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
e30c0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v<old.a.AND.n |
e30e0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
e3100 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
e3120 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
e3140 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
e3160 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
e3180 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
e31a0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 44 41 54 45 3d 31 3b 0a 20 | counts.WHERE.v=CURRENT_DATE=1;.. |
e31c0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
e31e0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
e3200 | 41 4c 55 45 53 28 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 29 2c 28 33 29 2c 28 32 29 | ALUES(CURRENT_TIMESTAMP),(3),(2) |
e3220 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
e3240 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
e3260 | 0a 85 34 8c 06 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..4.....mCREATE.TABLE.t1(a.INT); |
e3280 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
e32a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
e32c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
e32e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
e3300 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
e3320 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
e3340 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
e3360 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
e3380 | 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v<old.a.AND.n==1;...U |
e33a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
e33c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
e33e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
e3400 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
e3420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
e3440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
e3460 | 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 44 41 54 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=CURRENT_DATE=1;...UPDATE. |
e3480 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
e34a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
e34c0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
e34e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
e3500 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 31 3b 0a 85 34 8c 05 04 00 8a | ELETE.FROM.t1.WHERE.a=1;..4..... |
e3520 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
e3540 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
e3560 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
e3580 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
e35a0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
e35c0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
e35e0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
e3600 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
e3620 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
e3640 | 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v<old.a.AND.n==1;...UPDATE.co |
e3660 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
e3680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
e36a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
e36c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
e36e0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
e3700 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 | N...DELETE.FROM.counts.WHERE.v=C |
e3720 | 55 52 52 45 4e 54 5f 44 41 54 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | URRENT_DATE=1;...UPDATE.counts.S |
e3740 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
e3760 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
e3780 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
e37a0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
e37c0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 2b 37 3b 0a 85 34 8c 04 04 00 8a 6d 43 52 45 41 54 45 20 | OM.t1.WHERE.a+7;..4.....mCREATE. |
e37e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
e3800 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
e3820 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
e3840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
e3860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
e3880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
e38a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
e38c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
e38e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v<old |
e3900 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
e3920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
e3940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
e3960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
e3980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
e39a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
e39c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c | TE.FROM.counts.WHERE.v=.round(1, |
e39e0 | 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | 1)==1;...UPDATE.counts.SET.n=n-1 |
e3a00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
e3a20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
e3a40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
e3a60 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
e3a80 | 45 52 45 20 61 3d 37 3b 0a 85 3b 8c 03 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..;.....{CREATE.TABLE.t1 |
e3aa0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
e3ac0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
e3ae0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
e3b00 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
e3b20 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
e3b40 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
e3b60 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
e3b80 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
e3ba0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v<old.a.AND.n |
e3bc0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
e3be0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
e3c00 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
e3c20 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
e3c40 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
e3c60 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
e3c80 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 | counts.WHERE.v=.nullif(1,1)OR.tr |
e3ca0 | 75 65 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | ue=N;...UPDATE.counts.SET.n=n-1. |
e3cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
e3ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
e3d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
e3d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
e3d40 | 52 45 20 61 3d 37 3b 0a 85 34 8c 02 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
e3d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
e3d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
e3da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
e3dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
e3de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
e3e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
e3e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
e3e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
e3e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
e3e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
e3ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
e3ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
e3ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
e3f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
e3f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
e3f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v<old.a.AND.n==1;... |
e3f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e3f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
e3fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
e3fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
e3fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
e4000 | 0d 00 00 00 0b 02 1b 00 1d 74 1a bc 17 f8 15 34 12 6b 0f b3 0c fb 0a 43 07 8b 04 d3 02 1b 00 00 | .........t.....4.k.....C........ |
e4020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e40a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e40c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e40e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e41a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e41c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e41e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e4200 | 00 00 00 85 3a 8c 17 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 85 34 8c 17 04 | ....:.....yCREATE.TABLE.t1(.4... |
e4220 | 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..mCREATE.TABLE.t1(a.INT);.CREAT |
e4240 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
e4260 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
e4280 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
e42a0 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
e42c0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
e42e0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
e4300 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
e4320 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
e4340 | 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | HERE.v=.json(1);...UPDATE.counts |
e4360 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
e4380 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
e43a0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
e43c0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
e43e0 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
e4400 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
e4420 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
e4440 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
e4460 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
e4480 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
e44a0 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 60 61 60 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=5.WHERE.`a`;.DELETE.FROM.t |
e44c0 | 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8c 16 04 00 8a 6d 43 52 45 41 54 | 1.WHERE.a=7;VACUUM..4.....mCREAT |
e44e0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
e4500 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
e4520 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
e4540 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
e4560 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
e4580 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
e45a0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
e45c0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
e45e0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 | N...DELETE.FROM.counts.WHERE.v=. |
e4600 | 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | json(1);...UPDATE.counts.SET.n=n |
e4620 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
e4640 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
e4660 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
e4680 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
e46a0 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
e46c0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
e46e0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
e4700 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
e4720 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
e4740 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 32 30 | ,(2),(4),(7);.UPDATE.t1.SET.a=20 |
e4760 | 30 31 2d 30 31 2d 30 31 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | 01-01-014;.DELETE.FROM.t1.WHERE. |
e4780 | 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8c 15 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | a=7;VACUUM..4.....mCREATE.TABLE. |
e47a0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
e47c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
e47e0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
e4800 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
e4820 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
e4840 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
e4860 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
e4880 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
e48a0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 3b | TE.FROM.counts.WHERE.v=.json(1); |
e48c0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
e48e0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
e4900 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
e4920 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
e4940 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
e4960 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
e4980 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
e49a0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
e49c0 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
e49e0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
e4a00 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6d 61 78 28 31 2c 31 29 3d | ,(7);.UPDATE.t1.SET.a=.max(1,1)= |
e4a20 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 | 4;.DELETE.FROM.t1.WHERE.a=7;VACU |
e4a40 | 55 4d 0a 85 34 8c 14 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | UM..4.....mCREATE.TABLE.t1(a.INT |
e4a60 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
e4a80 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
e4aa0 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
e4ac0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
e4ae0 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
e4b00 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
e4b20 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
e4b40 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
e4b60 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 | counts.WHERE.v=.json(1);...UPDAT |
e4b80 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
e4ba0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
e4bc0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
e4be0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
e4c00 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
e4c20 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
e4c40 | 20 63 6f 61 6c 65 73 63 65 28 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .coalesce(1,1)==1;...UPDATE.coun |
e4c60 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
e4c80 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
e4ca0 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
e4cc0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
e4ce0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8c 13 04 | E.FROM.t1.WHERE.a=7;VACUUM..4... |
e4d00 | 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..mCREATE.TABLE.t1(a.INT);.CREAT |
e4d20 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
e4d40 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
e4d60 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
e4d80 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
e4da0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
e4dc0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
e4de0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
e4e00 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
e4e20 | 48 45 52 45 20 76 3d 20 64 61 74 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=.date(1,1,1)=1;...UPDATE. |
e4e40 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-.upper(1)=old.a;. |
e4e60 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
e4e80 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
e4ea0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
e4ec0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
e4ee0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
e4f00 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
e4f20 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
e4f40 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
e4f60 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
e4f80 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
e4fa0 | 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 12 04 00 8a 6d 43 52 45 41 54 | FROM.t1.WHERE.a=7;..4.....mCREAT |
e4fc0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
e4fe0 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
e5000 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
e5020 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
e5040 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
e5060 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
e5080 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
e50a0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
e50c0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f | N...DELETE.FROM.counts.WHERE.v<o |
e50e0 | 6c 64 2e 61 20 41 4e 44 20 76 3e 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.v>=1;...UPDATE.counts.S |
e5100 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
e5120 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
e5140 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
e5160 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
e5180 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
e51a0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
e51c0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
e51e0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
e5200 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
e5220 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
e5240 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
e5260 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 45 8c 11 04 00 8b 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..E......CREATE.TABLE. |
e5280 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
e52a0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
e52c0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
e52e0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
e5300 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
e5320 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
e5340 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
e5360 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
e5380 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v<old.a.AND |
e53a0 | 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3d 31 3b 0a 20 20 55 50 44 41 54 45 | .n=CURRENT_TIMESTAMP=1;...UPDATE |
e53c0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e53e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
e5400 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
e5420 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
e5440 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
e5460 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
e5480 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
e54a0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
e54c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
e54e0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
e5500 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
e5520 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 40 8c 10 04 00 8b 05 43 52 45 41 | .FROM.t1.WHERE.a=7;..@......CREA |
e5540 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
e5560 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
e5580 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
e55a0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
e55c0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e55e0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e5600 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e5620 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
e5640 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
e5660 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 | old.a.AND.n=CURRENT_TIME=1;...UP |
e5680 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
e56a0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
e56c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
e56e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
e5700 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
e5720 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
e5740 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
e5760 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
e5780 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
e57a0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
e57c0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
e57e0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 40 8c 0f 04 00 8b 05 | LETE.FROM.t1.WHERE.a=7;..@...... |
e5800 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
e5820 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
e5840 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
e5860 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
e5880 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
e58a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
e58c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
e58e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
e5900 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
e5920 | 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 43 55 52 52 45 4e 54 5f 44 41 54 45 3d 31 3b 0a | E.v<old.a.AND.n=CURRENT_DATE=1;. |
e5940 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
e5960 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
e5980 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
e59a0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
e59c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
e59e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
e5a00 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
e5a20 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
e5a40 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
e5a60 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
e5a80 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
e5aa0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 0e | ;.DELETE.FROM.t1.WHERE.a=7;..4.. |
e5ac0 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
e5ae0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
e5b00 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
e5b20 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
e5b40 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
e5b60 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
e5b80 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
e5ba0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
e5bc0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
e5be0 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.n==1;...UPDATE |
e5c00 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e5c20 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
e5c40 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
e5c60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
e5c80 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.UPDATE.ON.t1.B |
e5ca0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
e5cc0 | 76 3d 43 55 52 52 45 4e 54 5f 44 41 54 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=CURRENT_DATE=1;...UPDATE.count |
e5ce0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
e5d00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
e5d20 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
e5d40 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
e5d60 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 08 8c 0d 04 00 8a 15 43 52 45 41 | .FROM.t1.WHERE.a=7;.........CREA |
e5d80 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
e5da0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
e5dc0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
e5de0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
e5e00 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e5e20 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e5e40 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e5e60 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
e5e80 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
e5ea0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
e5ec0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
e5ee0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
e5f00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
e5f20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
e5f40 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
e5f60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
e5f80 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
e5fa0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
e5fc0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
e5fe0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 52 45 49 4e 44 45 58 20 74 31 20 53 | (1),(3),(2),(4),(7);REINDEX.t1.S |
e6000 | 0d 1a 8a 00 0b 02 12 00 1d 48 1a 96 17 d2 15 1a 12 62 0f aa 0c f2 0a 3a 07 82 04 ca 02 12 00 00 | .........H.......b.....:........ |
e6020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e60a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e60c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e60e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e61a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e61c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e61e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e6200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8c 22 04 00 8a 6d 43 52 45 41 54 45 | ...................4."...mCREATE |
e6220 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
e6240 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
e6260 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
e6280 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
e62a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e62c0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e62e0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e6300 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
e6320 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 | ...DELETE.FROM.counts.WHERE.v=.r |
e6340 | 61 6e 64 6f 6d 62 6c 6f 62 28 4e 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | andomblob(N);...UPDATE.counts.SE |
e6360 | 54 20 6e 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=.unicode(1)=old.a;...INSERT. |
e6380 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e63a0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e63c0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e63e0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
e6400 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
e6420 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
e6440 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
e6460 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
e6480 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
e64a0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a<4;.DELETE.FROM.t1.W |
e64c0 | 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 21 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..4.!...mCREATE.TABLE.t |
e64e0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
e6500 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
e6520 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
e6540 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
e6560 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
e6580 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
e65a0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
e65c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
e65e0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 61 6e 64 6f 6d 62 6c 6f | E.FROM.counts.WHERE.v=.randomblo |
e6600 | 62 28 4e 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 75 6e 69 | b(N);...UPDATE.counts.SET.n=.uni |
e6620 | 63 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | code(1)=old.a;...INSERT.INTO.cou |
e6640 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
e6660 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
e6680 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
e66a0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
e66c0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
e66e0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
e6700 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
e6720 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
e6740 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
e6760 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
e6780 | 3b 0a 85 34 8c 20 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..4.....mCREATE.TABLE.t1(a.INT) |
e67a0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
e67c0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
e67e0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
e6800 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
e6820 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
e6840 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
e6860 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
e6880 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
e68a0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 29 3b 0a 20 20 | ounts.WHERE.v=.randomblob(2);... |
e68c0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e68e0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
e6900 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
e6920 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
e6940 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
e6960 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
e6980 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
e69a0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e69c0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
e69e0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
e6a00 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
e6a20 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 1f 04 00 | DELETE.FROM.t1.WHERE.a=7;..4.... |
e6a40 | 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .mCREATE.TABLE.t1(a.INT);.CREATE |
e6a60 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
e6a80 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
e6aa0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
e6ac0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
e6ae0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
e6b00 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
e6b20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
e6b40 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
e6b60 | 45 52 45 20 76 3d 20 70 72 69 6e 74 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=.printf(1,1)=1;...UPDATE.c |
e6b80 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
e6ba0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e6bc0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e6be0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e6c00 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
e6c20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
e6c40 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
e6c60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
e6c80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
e6ca0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
e6cc0 | 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=52001-01-01;.DELETE.F |
e6ce0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 1e 04 00 8a 6d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..4.....mCREATE |
e6d00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
e6d20 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
e6d40 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
e6d60 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
e6d80 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e6da0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e6dc0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e6de0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
e6e00 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 70 | ...DELETE.FROM.counts.WHERE.v=.p |
e6e20 | 72 69 6e 74 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | rintf(1,1)=1;...UPDATE.counts.SE |
e6e40 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
e6e60 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e6e80 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e6ea0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e6ec0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
e6ee0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
e6f00 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
e6f20 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
e6f40 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
e6f60 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
e6f80 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
e6fa0 | 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 1d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..4.....mCREATE.TABLE.t |
e6fc0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
e6fe0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
e7000 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
e7020 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
e7040 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
e7060 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
e7080 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
e70a0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
e70c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c | E.FROM.counts.WHERE.v=.nullif(1, |
e70e0 | 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | 1)=1;...UPDATE.counts.SET.n=n-1. |
e7100 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
e7120 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
e7140 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
e7160 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
e7180 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
e71a0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
e71c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
e71e0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
e7200 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
e7220 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 | ),(4),(7);.UPDATE.t1.SET.a=52001 |
e7240 | 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | -01-01;.DELETE.FROM.t1.WHERE.a=7 |
e7260 | 3b 0a 85 34 8c 1c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..4.....mCREATE.TABLE.t1(a.INT) |
e7280 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
e72a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
e72c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
e72e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
e7300 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
e7320 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
e7340 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
e7360 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
e7380 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3b 0a 20 20 | ounts.WHERE.v=.json_quote(1);... |
e73a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e73c0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
e73e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
e7400 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
e7420 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
e7440 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
e7460 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
e7480 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e74a0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
e74c0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
e74e0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
e7500 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 1b 04 00 | DELETE.FROM.t1.WHERE.a=7;..4.... |
e7520 | 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .mCREATE.TABLE.t1(a.INT);.CREATE |
e7540 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
e7560 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
e7580 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
e75a0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
e75c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
e75e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
e7600 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
e7620 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
e7640 | 45 52 45 20 76 3d 20 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=.json_quote(1);...UPDATE.c |
e7660 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
e7680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e76a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e76c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e76e0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
e7700 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
e7720 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
e7740 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
e7760 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
e7780 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
e77a0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=1;.DELETE.F |
e77c0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 1a 04 00 8a 6d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..4.....mCREATE |
e77e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
e7800 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
e7820 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
e7840 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
e7860 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e7880 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e78a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e78c0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
e78e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a | ...DELETE.FROM.counts.WHERE.v=.j |
e7900 | 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | son_quote(1);...UPDATE.counts.SE |
e7920 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
e7940 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e7960 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e7980 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e79a0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
e79c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
e79e0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
e7a00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
e7a20 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
e7a40 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
e7a60 | 20 61 3d 20 6d 61 78 28 31 2c 31 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=.max(1,1)=4;.DELETE.FROM.t1.W |
e7a80 | 48 45 52 45 20 61 3d 37 3b 0a 00 00 00 0c 04 00 8a 6d 43 52 45 41 85 2e 8c 19 04 00 8a 61 43 52 | HERE.a=7;........mCREA.......aCR |
e7aa0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
e7ac0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
e7ae0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
e7b00 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
e7b20 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
e7b40 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
e7b60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
e7b80 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
e7ba0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
e7bc0 | 76 3d 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | v=.json(1);...UPDATE.counts.SET. |
e7be0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
e7c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
e7c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
e7c40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
e7c60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
e7c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
e7ca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
e7cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
e7ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
e7d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
e7d20 | 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=1;.DELETE.FROM.t1.WHE |
e7d40 | 52 45 20 61 3d 37 3b 0a 85 34 8c 18 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
e7d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
e7d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
e7da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
e7dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
e7de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
e7e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
e7e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
e7e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
e7e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 | FROM.counts.WHERE.v=.json(1);... |
e7e80 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e7ea0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
e7ec0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
e7ee0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
e7f00 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
e7f20 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
e7f40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
e7f60 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e7f80 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
e7fa0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
e7fc0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3c 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a<4;. |
e7fe0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a | DELETE.FROM.t1.WHERE.a=7;VACUUM. |
e8000 | 0d 00 00 00 0b 02 0c 00 1d 48 1a 90 17 d8 15 1a 12 62 0f aa 0c f2 0a 37 07 7f 04 c7 02 0c 00 00 | .........H.......b.....7........ |
e8020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e80a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e80c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e80e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e81a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e81c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e81e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
e8200 | 00 00 00 00 00 00 00 00 00 00 00 00 85 37 8c 2d 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 | .............7.-...sCREATE.TABLE |
e8220 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
e8240 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
e8260 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
e8280 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
e82a0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e82c0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e82e0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e8300 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
e8320 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f | ETE.FROM.counts.WHERE.v=CURRENT_ |
e8340 | 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 | TIME=1;...UPDATE.counts.SET.n=CU |
e8360 | 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | RRENT_TIMESTAMP;...INSERT.INTO.c |
e8380 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
e83a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
e83c0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
e83e0 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
e8400 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
e8420 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
e8440 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
e8460 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
e8480 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 2d 31 | (2),(4),(7);.UPDATE.t1.SET.a=.-1 |
e84a0 | 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 | 5.WHERE.a+4;.DELETE.FROM.t1.WHER |
e84c0 | 45 20 61 3d 37 3b 0a 85 34 8c 2c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | E.a=7;..4.,...mCREATE.TABLE.t1(a |
e84e0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
e8500 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
e8520 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
e8540 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
e8560 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
e8580 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
e85a0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
e85c0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
e85e0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d | ROM.counts.WHERE.v=CURRENT_TIME= |
e8600 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 | 1;...UPDATE.counts.SET.n=CURRENT |
e8620 | 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | _TIMESTAMP;...INSERT.INTO.counts |
e8640 | 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (n,n).VALUES(new.a,1).......ON.C |
e8660 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
e8680 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
e86a0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
e86c0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
e86e0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
e8700 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
e8720 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
e8740 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
e8760 | 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 | a+4;.DELETE.FROM.t1.WHERE.a=7;.. |
e8780 | 34 8c 2b 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | 4.+...mCREATE.TABLE.t1(a.INT);.C |
e87a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
e87c0 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
e87e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
e8800 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
e8820 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
e8840 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
e8860 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
e8880 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
e88a0 | 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 25 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=CURRENT_TIME%1;...UPD |
e88c0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 | ATE.counts.SET.n=CURRENT_TIMESTA |
e88e0 | 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | MP;...INSERT.INTO.counts(v,n).VA |
e8900 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
e8920 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
e8940 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
e8960 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
e8980 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
e89a0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
e89c0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
e89e0 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
e8a00 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a+4;.DEL |
e8a20 | 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 37 8c 2a 04 00 8a 73 43 | ETE.FROM.t1.WHERE.a=7;..7.*...sC |
e8a40 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
e8a60 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
e8a80 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
e8aa0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
e8ac0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
e8ae0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
e8b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
e8b20 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
e8b40 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
e8b60 | 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 20 2d 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | .v=CURRENT_TIME.-1=1;...UPDATE.c |
e8b80 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 | ounts.SET.n=CURRENT_TIMESTAMP;.. |
e8ba0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e8bc0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e8be0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e8c00 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
e8c20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
e8c40 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
e8c60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
e8c80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
e8ca0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
e8cc0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a+4;.DELETE.F |
e8ce0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 29 04 00 8a 6d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..4.)...mCREATE |
e8d00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
e8d20 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
e8d40 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
e8d60 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
e8d80 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e8da0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e8dc0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e8de0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
e8e00 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 74 | ...DELETE.FROM.counts.WHERE.v=.t |
e8e20 | 69 6d 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | ime(1,1,1)=1;...UPDATE.counts.SE |
e8e40 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
e8e60 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
e8e80 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
e8ea0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
e8ec0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
e8ee0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
e8f00 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
e8f20 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
e8f40 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
e8f60 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
e8f80 | 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=52001-01-01;.DELETE.FROM.t1.W |
e8fa0 | 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 28 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..4.(...mCREATE.TABLE.t |
e8fc0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
e8fe0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
e9000 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
e9020 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
e9040 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
e9060 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
e9080 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
e90a0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
e90c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 74 72 69 6d 28 31 2c 31 | E.FROM.counts.WHERE.v=.rtrim(1,1 |
e90e0 | 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | )==1;...UPDATE.counts.SET.n=n-1. |
e9100 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
e9120 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
e9140 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
e9160 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
e9180 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
e91a0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
e91c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
e91e0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
e9200 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
e9220 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
e9240 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
e9260 | 3b 0a 85 34 8c 27 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..4.'...mCREATE.TABLE.t1(a.INT) |
e9280 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
e92a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
e92c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
e92e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
e9300 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
e9320 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
e9340 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
e9360 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
e9380 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 4e 29 3b 0a 20 20 | ounts.WHERE.v=.randomblob(N);... |
e93a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e93c0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
e93e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
e9400 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
e9420 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
e9440 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
e9460 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
e9480 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
e94a0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
e94c0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
e94e0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 41 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=A;. |
e9500 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8c 26 04 00 | DELETE.FROM.t1.WHERE.a=7;..:.&.. |
e9520 | 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .yCREATE.TABLE.t1(a.INT);.CREATE |
e9540 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
e9560 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
e9580 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
e95a0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
e95c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
e95e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
e9600 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
e9620 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
e9640 | 45 52 45 20 76 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 4e 29 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=.randomblob(N);...UPDATE.c |
e9660 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
e9680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
e96a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
e96c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
e96e0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
e9700 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
e9720 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
e9740 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
e9760 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
e9780 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
e97a0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
e97c0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8c 25 04 00 8a 6d | ROM.t1.WHERE.a=7;VACUUM..4.%...m |
e97e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
e9800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
e9820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
e9840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
e9860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
e9880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
e98a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
e98c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
e98e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
e9900 | 45 20 76 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 4e 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=.randomblob(N);...UPDATE.cou |
e9920 | 6e 74 73 20 53 45 54 20 6e 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=.unicode(1)=old.a;...I |
e9940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
e9960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
e9980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
e99a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
e99c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
e99e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
e9a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
e9a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 34 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(4),(1), |
e9a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
e9a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
e9a80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 24 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.$...mCREATE.T |
e9aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
e9ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
e9ae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
e9b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
e9b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
e9b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
e9b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
e9b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
e9ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 61 6e | .DELETE.FROM.counts.WHERE.v=.ran |
e9bc0 | 64 6f 6d 62 6c 6f 62 28 4e 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | domblob(N);...UPDATE.counts.SET. |
e9be0 | 6e 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=.unicode(1)=old.a;...INSERT.IN |
e9c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
e9c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
e9c40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
e9c60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
e9c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
e9ca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
e9cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
e9ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
e9d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
e9d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
e9d40 | 52 45 20 61 3d 37 3b 0a 85 34 8c 23 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.#...mCREATE.TABLE.t1( |
e9d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
e9d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
e9da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
e9dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
e9de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
e9e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
e9e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
e9e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
e9e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 | FROM.counts.WHERE.v=.randomblob( |
e9e80 | 4e 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 75 6e 69 63 6f | N);...UPDATE.counts.SET.n=.unico |
e9ea0 | 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | de(1)=old.a;...INSERT.INTO.count |
e9ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
e9ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
e9f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
e9f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
e9f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
e9f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
e9f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
e9fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
e9fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
e9fe0 | 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=1;.DELETE.FROM.t1.WHERE.a=7;. |
ea000 | 0d 00 00 00 0b 02 1d 00 1d 48 1a 90 17 d2 15 1a 12 5c 0f a4 0c ec 0a 4c 07 8d 04 d5 02 1d 00 00 | .........H.......\.....L........ |
ea020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ea200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8c | ..............................4. |
ea220 | 38 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | 8...mCREATE.TABLE.t1(a.INT);.CRE |
ea240 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
ea260 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
ea280 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
ea2a0 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
ea2c0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
ea2e0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
ea300 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
ea320 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
ea340 | 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 59 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=CURRENT_TYME=1;...UPDAT |
ea360 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
ea380 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
ea3a0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
ea3c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
ea3e0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
ea400 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
ea420 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
ea440 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
ea460 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
ea480 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
ea4a0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
ea4c0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 37 04 00 8a 6d 43 52 45 | E.FROM.t1.WHERE.a=7;..4.7...mCRE |
ea4e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
ea500 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
ea520 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
ea540 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
ea560 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
ea580 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
ea5a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
ea5c0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
ea5e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
ea600 | 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =CURRENT_TIME=1;...UPDATE.counts |
ea620 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
ea640 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
ea660 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
ea680 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
ea6a0 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
ea6c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 | DELETE.FROM.counts.WHERE.v=CURRE |
ea6e0 | 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | NT_TIME=1;...UPDATE.counts.SET.n |
ea700 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
ea720 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
ea740 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
ea760 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=5.WHERE.a=4;.DELETE.FROM.t |
ea780 | 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8c 36 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c | 1.WHERE.a=7;..;.6...{CREATE.TABL |
ea7a0 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
ea7c0 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
ea7e0 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
ea800 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
ea820 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
ea840 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
ea860 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
ea880 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
ea8a0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 | LETE.FROM.counts.WHERE.v=CURRENT |
ea8c0 | 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | _TIME=1;...UPDATE.counts.SET.n=n |
ea8e0 | 2d 31 20 4d 41 54 43 48 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.MATCH.v=old.a;...INSERT.INTO. |
ea900 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
ea920 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
ea940 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
ea960 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
ea980 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
ea9a0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
ea9c0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
ea9e0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
eaa00 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 45 58 50 4c 41 49 4e 0a 55 50 44 41 54 45 20 74 31 20 53 | ,(2),(4),(7);EXPLAIN.UPDATE.t1.S |
eaa20 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
eaa40 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 1c 8c 35 04 00 8a 3d 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;....5...=CREATE.TABLE |
eaa60 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
eaa80 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
eaaa0 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
eaac0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
eaae0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
eab00 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
eab20 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
eab40 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
eab60 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f | ETE.FROM.counts.WHERE.v=CURRENT_ |
eab80 | 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | TIME=1;...UPDATE.counts.SET.n=n- |
eaba0 | 31 20 4d 41 54 43 48 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.MATCH.v=old.a;...INSERT.INTO.c |
eabc0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
eabe0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
eac00 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
eac20 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
eac40 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
eac60 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
eac80 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
eaca0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
eacc0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
eace0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 85 34 8c 34 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | HERE.a=4;.DE.4.4...mCREATE.TABLE |
ead00 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
ead20 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
ead40 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
ead60 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
ead80 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
eada0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
eadc0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
eade0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
eae00 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f | ETE.FROM.counts.WHERE.v=CURRENT_ |
eae20 | 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 | TIME=1;...UPDATE.counts.SET.n=CU |
eae40 | 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | RRENT_TIMESTAMP;...INSERT.INTO.c |
eae60 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
eae80 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
eaea0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
eaec0 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
eaee0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
eaf00 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
eaf20 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
eaf40 | 29 20 56 41 4c 55 45 53 28 39 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(9),(2),(1),(3),(1),(3), |
eaf60 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
eaf80 | 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a+4;.DELETE.FROM.t1.WHERE.a |
eafa0 | 3d 37 3b 0a 85 34 8c 33 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..4.3...mCREATE.TABLE.t1(a.IN |
eafc0 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
eafe0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
eb000 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
eb020 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
eb040 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
eb060 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
eb080 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
eb0a0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
eb0c0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a | .counts.WHERE.v=CURRENT_TIME=1;. |
eb0e0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 | ..UPDATE.counts.SET.n=CURRENT_TI |
eb100 | 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | MESTAMP;...INSERT.INTO.counts(v, |
eb120 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
eb140 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
eb160 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
eb180 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
eb1a0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
eb1c0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
eb1e0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
eb200 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
eb220 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 37 20 57 48 45 52 45 20 61 2b 34 | (7);.UPDATE.t1.SET.a=7.WHERE.a+4 |
eb240 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8c 32 | ;.DELETE.FROM.t1.WHERE.a=7;..:.2 |
eb260 | 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...yCREATE.TABLE.t1(a.INT);.CREA |
eb280 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
eb2a0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
eb2c0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
eb2e0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
eb300 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
eb320 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
eb340 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
eb360 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
eb380 | 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=CURRENT_TIME=1;...UPDATE |
eb3a0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b | .counts.SET.n=CURRENT_TIMESTAMP; |
eb3c0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
eb3e0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
eb400 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
eb420 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
eb440 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
eb460 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
eb480 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
eb4a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
eb4c0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
eb4e0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
eb500 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8c 31 04 00 | .FROM.t1.WHERE.a=7;VACUUM..4.1.. |
eb520 | 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .mCREATE.TABLE.t1(a.INT);.CREATE |
eb540 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
eb560 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
eb580 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
eb5a0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
eb5c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
eb5e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
eb600 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
eb620 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
eb640 | 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=CURRENT_TIME=1;...UPDATE.c |
eb660 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 | ounts.SET.n=CURRENT_TIMESTAMP;.. |
eb680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
eb6a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
eb6c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
eb6e0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
eb700 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
eb720 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
eb740 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
eb760 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
eb780 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
eb7a0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=1;.DELETE.F |
eb7c0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8c 30 04 00 8a 79 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..:.0...yCREATE |
eb7e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
eb800 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
eb820 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
eb840 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
eb860 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
eb880 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
eb8a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
eb8c0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
eb8e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 | ...DELETE.FROM.counts.WHERE.v=CU |
eb900 | 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | RRENT_TIME=1;...UPDATE.counts.SE |
eb920 | 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=CURRENT_TIMESTAMP;...INSERT. |
eb940 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
eb960 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
eb980 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
eb9a0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
eb9c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
eb9e0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
eba00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
eba20 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
eba40 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
eba60 | 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a+4;.DELETE.FROM.t1.W |
eba80 | 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8c 2f 04 00 8a 6d 43 52 45 41 54 45 20 54 | HERE.a=7;VACUUM..4./...mCREATE.T |
ebaa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
ebac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
ebae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
ebb00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
ebb20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
ebb40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
ebb60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
ebb80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
ebba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 | .DELETE.FROM.counts.WHERE.v=CURR |
ebbc0 | 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ENT_TIME=1;...UPDATE.counts.SET. |
ebbe0 | 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=CURRENT_TIMESTAMP;...INSERT.IN |
ebc00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
ebc20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
ebc40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
ebc60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
ebc80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
ebca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
ebcc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
ebce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
ebd00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
ebd20 | 3d 20 72 61 6e 64 6f 6d 28 29 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =.random()+4;.DELETE.FROM.t1.WHE |
ebd40 | 52 45 20 61 3d 37 3b 0a 85 34 8c 2e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
ebd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
ebd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
ebda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
ebdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
ebde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
ebe00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
ebe20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
ebe40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
ebe60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 | FROM.counts.WHERE.v=CURRENT_TIME |
ebe80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e | =1;...UPDATE.counts.SET.n=CURREN |
ebea0 | 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | T_TIMESTAMP;...INSERT.INTO.count |
ebec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
ebee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
ebf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
ebf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
ebf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
ebf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
ebf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
ebfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
ebfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 69 6e 73 74 72 28 | (4),(7);.UPDATE.t1.SET.a=.instr( |
ebfe0 | 31 2c 31 29 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | 1,1);.DELETE.FROM.t1.WHERE.a=7;. |
ec000 | 0d 00 00 00 0c 00 a9 00 1d 64 1a c8 18 2c 15 72 12 da 10 3e 0d 9f 0b 90 08 d8 06 20 03 61 00 a9 | .........d...,.r...>.........a.. |
ec020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ec040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ec060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ec080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ec0a0 | 00 00 00 00 00 00 00 00 00 85 34 8c 44 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ..........4.D...mCREATE.TABLE.t1 |
ec0c0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
ec0e0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
ec100 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
ec120 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
ec140 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
ec160 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
ec180 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
ec1a0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
ec1c0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
ec1e0 | 3c 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | <=N;...UPDATE.counts.SET.n=n-1.W |
ec200 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
ec220 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
ec240 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
ec260 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
ec280 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
ec2a0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3e 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n>=1;.. |
ec2c0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
ec2e0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
ec300 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
ec320 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
ec340 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
ec360 | 0a 85 3b 8c 43 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..;.C...{CREATE.TABLE.t1(a.INT); |
ec380 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
ec3a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
ec3c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
ec3e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
ec400 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
ec420 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
ec440 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
ec460 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
ec480 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3c 3d 4e 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n<=N;...U |
ec4a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
ec4c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
ec4e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
ec500 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
ec520 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
ec540 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
ec560 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
ec580 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
ec5a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
ec5c0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
ec5e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
ec600 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 41 4e 41 4c 59 5a 45 0a | ELETE.FROM.t1.WHERE.a=7;ANALYZE. |
ec620 | 85 34 8c 42 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.B...mCREATE.TABLE.t1(a.INT);. |
ec640 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
ec660 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
ec680 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
ec6a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
ec6c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
ec6e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
ec700 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
ec720 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
ec740 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3c 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n<=1;...UP |
ec760 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
ec780 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
ec7a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
ec7c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
ec7e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
ec800 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
ec820 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3c 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n<=1;...UPDATE.c |
ec840 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
ec860 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
ec880 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
ec8a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
ec8c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 41 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.A...m |
ec8e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
ec900 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
ec920 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
ec940 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
ec960 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
ec980 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
ec9a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
ec9c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
ec9e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
eca00 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 2d 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 | E.v=old.a.AND.n-.json_object(1,1 |
eca20 | 2c 31 2c 31 29 4f 52 20 74 72 75 65 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | ,1,1)OR.true=1;...UPDATE.counts. |
eca40 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
eca60 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
eca80 | 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 1)...ON.CONFLICT(v).DO.UPDATE.SE |
ecaa0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
ecac0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
ecae0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
ecb00 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
ecb20 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
ecb40 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
ecb60 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
ecb80 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a 84 0b 8c 40 04 00 88 1b 43 52 45 41 54 45 20 54 | =5.WHERE.a=4;.D....@....CREATE.T |
ecba0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
ecbc0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
ecbe0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
ecc00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
ecc20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
ecc40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
ecc60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
ecc80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
ecca0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
eccc0 | 61 20 41 4e 44 20 2d 30 20 6e 3d 3d 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | a.AND.-0.n==GIN...DELETE.FROM.co |
ecce0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
ecd00 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
ecd20 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
ecd40 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
ecd60 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
ecd80 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 | a=4;.DELETE.FROM.t1.WHERE.a=7;.. |
ecda0 | 1b 8c 3f 04 00 8a 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | ..?...;CREATE.TABLE.t1(a.INT);.C |
ecdc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
ecde0 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
ece00 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
ece20 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
ece40 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
ece60 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
ece80 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
ecea0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
ecec0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 20 73 71 6c 69 74 65 5f 63 6f 6d | ts.WHERE.v=old.a.AND..sqlite_com |
ecee0 | 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 4e 4f 54 20 67 6c 6f 62 28 31 2c 31 29 3d | pileoption_used(1)NOT.glob(1,1)= |
ecf00 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
ecf20 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
ecf40 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
ecf60 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
ecf80 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
ecfa0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
ecfc0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
ecfe0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
ed000 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
ed020 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 | );.UPDATE.t1.SET.a=5.WHERE.a=4.. |
ed040 | 8c 3e 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .>...5CREATE.TABLE.t1(a.INT);.CR |
ed060 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
ed080 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
ed0a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
ed0c0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
ed0e0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
ed100 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
ed120 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
ed140 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
ed160 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 20 73 71 6c 69 74 65 5f 63 6f 6d 70 | s.WHERE.v=old.a.AND..sqlite_comp |
ed180 | 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 20 6c 74 72 69 6d 28 31 2c 31 29 29 3d 6f 6c 64 2e | ileoption_used(.ltrim(1,1))=old. |
ed1a0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
ed1c0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
ed1e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
ed200 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
ed220 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
ed240 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
ed260 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
ed280 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
ed2a0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
ed2c0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 14 8c 3d 04 00 | PDATE.t1.SET.a=5.WHERE.a=4...=.. |
ed2e0 | 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .-CREATE.TABLE.t1(a.INT);.CREATE |
ed300 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
ed320 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
ed340 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
ed360 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
ed380 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
ed3a0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
ed3c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
ed3e0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
ed400 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 2f 2a 20 2a 2f 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a./*.*/==1;...UPDATE.c |
ed420 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
ed440 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
ed460 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
ed480 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
ed4a0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
ed4c0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
ed4e0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
ed500 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
ed520 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
ed540 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
ed560 | 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 36 8c 3c 04 00 8a 71 43 52 45 41 54 45 | E.t1.SET.a=0.AND.t.6.<...qCREATE |
ed580 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
ed5a0 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
ed5c0 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
ed5e0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
ed600 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
ed620 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
ed640 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
ed660 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
ed680 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
ed6a0 | 44 4f 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | DOd.a.AND.n==1;...UPDATE.counts. |
ed6c0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
ed6e0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
ed700 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
ed720 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
ed740 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
ed760 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
ed780 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
ed7a0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
ed7c0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
ed7e0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
ed800 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 3f 31 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.?14;.DELETE.FROM.t1 |
ed820 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8c 3b 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;....;...5CREATE.TABLE |
ed840 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
ed860 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
ed880 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
ed8a0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
ed8c0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
ed8e0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
ed900 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
ed920 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
ed940 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 49 4d 4d 45 44 49 41 | ETE.FROM.counts.WHERE.v=oIMMEDIA |
ed960 | 54 45 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | TEn==1;...UPDATE.counts.SET.n=n- |
ed980 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
ed9a0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
ed9c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
ed9e0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
eda00 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
eda20 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
eda40 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
eda60 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
eda80 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
edaa0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
edac0 | 48 45 52 45 20 61 3d 34 85 18 8c 3a 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | HERE.a=4...:...5CREATE.TABLE.t1( |
edae0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
edb00 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
edb20 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
edb40 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
edb60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
edb80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
edba0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
edbc0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
edbe0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 49 44 2d 4f 44 49 41 54 45 6e 3d | FROM.counts.WHERE.v=oID-ODIATEn= |
edc00 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
edc20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
edc40 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
edc60 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
edc80 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
edca0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
edcc0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
edce0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
edd00 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
edd20 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
edd40 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
edd60 | 20 61 3d 34 85 18 8c 39 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .a=4...9...5CREATE.TABLE.t1(a.IN |
edd80 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
edda0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
eddc0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
edde0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
ede00 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
ede20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
ede40 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
ede60 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
ede80 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 20 67 6c 6f 62 28 31 2c 31 29 3d 3d 31 3b 0a | .counts.WHERE.v=o.glob(1,1)==1;. |
edea0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 20 67 6c 6f 62 28 31 2c 31 | ..UPDATE.counts.SET.n=n.glob(1,1 |
edec0 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
edee0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
edf00 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
edf20 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
edf40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
edf60 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
edf80 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
edfa0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
edfc0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
edfe0 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
ee000 | 0d 00 00 00 0c 01 75 00 1d 33 1a 70 17 bf 15 07 12 4f 0f 85 0d 75 0b 35 08 f5 06 e5 04 2d 01 75 | ......u..3.p.....O...u.5.....-.u |
ee020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
ee160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8c 50 04 00 8a 6d 43 52 45 | ......................4.P...mCRE |
ee180 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
ee1a0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
ee1c0 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
ee1e0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
ee200 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
ee220 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
ee240 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
ee260 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
ee280 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
ee2a0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
ee2c0 | 20 53 45 54 20 6e 3d 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 3b 0a 20 20 49 4e 53 45 | .SET.n=.sqlite_version();...INSE |
ee2e0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
ee300 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
ee320 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
ee340 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
ee360 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
ee380 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
ee3a0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
ee3c0 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
ee3e0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
ee400 | 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=52001-01-01;.DELETE.FROM.t |
ee420 | 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 4f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c | 1.WHERE.a=7;..4.O...mCREATE.TABL |
ee440 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
ee460 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
ee480 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
ee4a0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
ee4c0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
ee4e0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
ee500 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
ee520 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
ee540 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
ee560 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 | ND.n==1;...UPDATE.counts.SET.n=. |
ee580 | 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | sqlite_version();...INSERT.INTO. |
ee5a0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
ee5c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
ee5e0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
ee600 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
ee620 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
ee640 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
ee660 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
ee680 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
ee6a0 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
ee6c0 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e | WHERE.a=4;.DELETE.FROM.t1.NOT.IN |
ee6e0 | 44 45 58 45 44 84 0c 8c 4e 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | DEXED...N....CREATE.TABLE.t1(a.I |
ee700 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
ee720 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
ee740 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
ee760 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
ee780 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
ee7a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
ee7c0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
ee7e0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
ee800 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 33 | M.counts.WHERE.v=old.a.AND.n==13 |
ee820 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | ...UPDATE.couE.FROM.counts.WHERE |
ee840 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
ee860 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
ee880 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
ee8a0 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
ee8c0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
ee8e0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 3c 8c 4d 04 00 88 7d 43 52 45 | E.FROM.t1.WHERE.a=7;..<.M...}CRE |
ee900 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
ee920 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
ee940 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
ee960 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
ee980 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
ee9a0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
ee9c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
ee9e0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
eea00 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
eea20 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 20 3b 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1.;..UPDATE.counts |
eea40 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 3b 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a.;..INSE |
eea60 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
eea80 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
eeaa0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
eeac0 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
eeae0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | DELETE.FROM.cs.WHERE.v=old.a.AND |
eeb00 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
eeb20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 0a 45 4e 44 3b 0a 84 3c 8c 4c 04 00 88 7d 43 52 45 | .WHERE.v=old.a..END;..<.L...}CRE |
eeb40 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
eeb60 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
eeb80 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
eeba0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
eebc0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
eebe0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
eec00 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
eec20 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
eec40 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
eec60 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 20 20 3b 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1..;.UPDATE.counts |
eec80 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
eeca0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
eecc0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
eece0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
eed00 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
eed20 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | DELETE.FROM.cs.WHERE.v=old.a.AND |
eed40 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
eed60 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 0a 45 4e 44 3b 0a 84 0c 8c 4b 04 00 88 1d 43 52 45 | .WHERE.v=old.a..END;....K....CRE |
eed80 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
eeda0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
eedc0 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
eede0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
eee00 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
eee20 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
eee40 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
eee60 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
eee80 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
eeea0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 23 31 3b 0a 20 20 55 50 0a 20 20 44 45 4c 45 54 45 20 46 | =old.a.AND.n=#1;...UP...DELETE.F |
eeec0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
eeee0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
eef00 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
eef20 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
eef40 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
eef60 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
eef80 | 61 3d 37 3b 0a 85 46 8c 4a 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..F.J....CREATE.TABLE.t1(a.I |
eefa0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
eefc0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
eefe0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
ef000 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
ef020 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
ef040 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
ef060 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
ef080 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
ef0a0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 74 | M.counts.WHERE.v=old.a.AND.n=.st |
ef0c0 | 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | rftime(1,1,1,1)=1;...UPDATE.coun |
ef0e0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
ef100 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
ef120 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
ef140 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
ef160 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
ef180 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
ef1a0 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
ef1c0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
ef1e0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
ef200 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
ef220 | 31 20 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=52001-01-01;.DELETE.FROM |
ef240 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 49 04 00 8a 6d 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a=7;..4.I...mCREATE.TA |
ef260 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
ef280 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
ef2a0 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
ef2c0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
ef2e0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
ef300 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
ef320 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
ef340 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
ef360 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
ef380 | 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 74 | .AND.n=.json_object(1,1,1,1)OR.t |
ef3a0 | 72 75 65 3d 56 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | rue=V;...UPDATE.counts.SET.n=n-1 |
ef3c0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | .WHERE.v=old.a;...INSERT.INTO.co |
ef3e0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 | unts(v,n).VALUES(new.a,1)...ON.C |
ef400 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
ef420 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
ef440 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
ef460 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
ef480 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
ef4a0 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
ef4c0 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
ef4e0 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
ef500 | 61 3d 34 3b 0a 44 0a 85 34 8c 48 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | a=4;.D..4.H...mCREATE.TABLE.t1(a |
ef520 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
ef540 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
ef560 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
ef580 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
ef5a0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
ef5c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
ef5e0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
ef600 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
ef620 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 | ROM.counts.WHERE.v=old.a.AND.n=. |
ef640 | 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 74 72 75 65 3c 4e 3b 0a 20 | json_object(1,1,1,1)OR.true<N;.. |
ef660 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
ef680 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
ef6a0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ).VALUES(new.a,1)...ON.CONFLICT( |
ef6c0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
ef6e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
ef700 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
ef720 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
ef740 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
ef760 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
ef780 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
ef7a0 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a 85 | UPDATE.t1.SET.a=5.WHERE.a=4;.D.. |
ef7c0 | 2d 8c 47 04 00 8a 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | -.G..._CREATE.TABLE.t1(a.INT);.C |
ef7e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
ef800 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
ef820 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
ef840 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
ef860 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
ef880 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
ef8a0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
ef8c0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
ef8e0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 6f 62 6a | ts.WHERE.v=old.a.AND.n=.json_obj |
ef900 | 65 63 74 28 31 2c 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | ect(1,1,1,1)=1;...UPDATE.counts. |
ef920 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
ef940 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
ef960 | 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 1)...ON.CONFLICT(v).DO.UPDATE.SE |
ef980 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
ef9a0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
ef9c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
ef9e0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
efa00 | 57 48 45 52 45 20 20 74 69 6d 65 28 31 2c 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE..time(1,1,1);.INSERT.INTO. |
efa20 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
efa40 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
efa60 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a 85 3f 8c 46 04 00 8b 03 43 52 45 41 54 45 20 54 | =5.WHERE.a=4;.D..?.F....CREATE.T |
efa80 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
efaa0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
efac0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
efae0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
efb00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
efb20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
efb40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
efb60 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
efb80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
efba0 | 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 3d 31 3b | a.AND.n=.json_object(1,1,1,1)=1; |
efbc0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
efbe0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
efc00 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ,n).VALUES(new.a,1)...ON.CONFLIC |
efc20 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
efc40 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
efc60 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
efc80 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 | HERE.v=old.a.AND.n=.strftime(1,1 |
efca0 | 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ,1,1)=1;...UPDATE.counts.SET.n=n |
efcc0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
efce0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
efd00 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
efd20 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a 85 49 8c 45 04 00 8b 17 43 52 45 41 54 | T.a=5.WHERE.a=4;.D..I.E....CREAT |
efd40 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
efd60 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
efd80 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
efda0 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
efdc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
efde0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
efe00 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
efe20 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
efe40 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
efe60 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 2c | ld.a.AND.n=.json_array_length(1, |
efe80 | 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | 1)=1;...UPDATE.counts.SET.n=n-1. |
efea0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
efec0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
efee0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
eff00 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
eff20 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
eff40 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
eff60 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
eff80 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
effa0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
effc0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
effe0 | 52 45 20 6a 73 6f 6e 5f 65 78 74 72 61 63 74 28 31 2c 31 29 20 61 3d 34 3b 0a 44 45 4c 37 3b 0a | RE.json_extract(1,1).a=4;.DEL7;. |
f0000 | 0d 00 00 00 0b 02 ce 00 1d 48 1a ac 18 10 15 74 12 ca 10 2e 0d 92 0a f6 08 3e 05 86 02 ce 00 00 | .........H.....t.........>...... |
f0020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f01a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f01c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f01e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f0280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f02a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f02c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8c 5b 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | ...............4.[...mCREATE.TAB |
f02e0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
f0300 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
f0320 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
f0340 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
f0360 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
f0380 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
f03a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
f03c0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
f03e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
f0400 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
f0420 | 6e 2d 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-.replace(1,1,1);...INSERT.INTO |
f0440 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f0460 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f0480 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
f04a0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
f04c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
f04e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
f0500 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
f0520 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
f0540 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
f0560 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
f0580 | 20 61 3d 37 3b 0a 85 34 8c 5a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.Z...mCREATE.TABLE.t1(a. |
f05a0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
f05c0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
f05e0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
f0600 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
f0620 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
f0640 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
f0660 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
f0680 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
f06a0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
f06c0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 71 75 6f 74 65 | ;...UPDATE.counts.SET.n=n-.quote |
f06e0 | 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | (1)=old.a;...INSERT.INTO.counts( |
f0700 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
f0720 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
f0740 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
f0760 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
f0780 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
f07a0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
f07c0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
f07e0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
f0800 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
f0820 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 | =4;.DELETE.FROM.t1.WHERE.a=7;..4 |
f0840 | 8c 59 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .Y...mCREATE.TABLE.t1(a.INT);.CR |
f0860 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
f0880 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
f08a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
f08c0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
f08e0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
f0900 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
f0920 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
f0940 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
f0960 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
f0980 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 6c 6f 77 65 72 28 31 29 3d 6f 6c 64 2e | TE.counts.SET.n=n-.lower(1)=old. |
f09a0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
f09c0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
f09e0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
f0a00 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
f0a20 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
f0a40 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
f0a60 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
f0a80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
f0aa0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
f0ac0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
f0ae0 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8c 58 04 00 8a 35 43 52 | TE.FROM.t1.WHERE.a=7;....X...5CR |
f0b00 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
f0b20 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
f0b40 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
f0b60 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
f0b80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
f0ba0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
f0bc0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
f0be0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
f0c00 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
f0c20 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
f0c40 | 73 20 53 45 54 20 6e 3d 6e 2d 20 20 22 61 22 2c 22 62 22 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-.."a","b"=old.a;...INS |
f0c60 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
f0c80 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
f0ca0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
f0cc0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
f0ce0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
f0d00 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
f0d20 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
f0d40 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
f0d60 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
f0d80 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8c 57 04 00 8a 35 43 52 45 41 54 45 | .SET.a=5.WHERE.a=4...W...5CREATE |
f0da0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
f0dc0 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
f0de0 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
f0e00 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
f0e20 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
f0e40 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
f0e60 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
f0e80 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
f0ea0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
f0ec0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
f0ee0 | 54 20 6e 3d 6e 2d 20 20 22 61 22 2c 22 62 22 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-.."a","b"=old.a;...INSERT. |
f0f00 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
f0f20 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
f0f40 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 2b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END+.CREATE.TRIGGER.r |
f0f60 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
f0f80 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
f0fa0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
f0fc0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
f0fe0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
f1000 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
f1020 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8c 56 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 | .a=5.WHERE.a=4...V...5CREATE.TAB |
f1040 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
f1060 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
f1080 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
f10a0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
f10c0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
f10e0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
f1100 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
f1120 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
f1140 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
f1160 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
f1180 | 6e 20 67 6c 6f 62 28 3f 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n.glob(?,1)=old.a;...INSERT.INTO |
f11a0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f11c0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f11e0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
f1200 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
f1220 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
f1240 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
f1260 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
f1280 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
f12a0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
f12c0 | 20 57 48 45 52 45 20 61 3d 34 85 26 8c 55 04 00 8a 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .WHERE.a=4.&.U...QCREATE.TABLE.t |
f12e0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
f1300 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
f1320 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
f1340 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
f1360 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
f1380 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
f13a0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
f13c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
f13e0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
f1400 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 20 67 6c | n==1;...UPDATE.counts.SET.n=n.gl |
f1420 | 6f 62 28 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | ob(1,1)COLLATE.nocase=old.a;...I |
f1440 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
f1460 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
f1480 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
f14a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
f14c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
f14e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
f1500 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
f1520 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
f1540 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
f1560 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8c 54 04 00 8a 35 43 52 45 41 | t1.SET.a=5.WHERE.a=4...T...5CREA |
f1580 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
f15a0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
f15c0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
f15e0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
f1600 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
f1620 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
f1640 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
f1660 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
f1680 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
f16a0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
f16c0 | 53 45 54 20 6e 3d 6e 20 67 6c 6f 62 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n.glob(1,1)=old.a;...INSER |
f16e0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
f1700 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
f1720 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
f1740 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
f1760 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
f1780 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
f17a0 | 6e 2d 31 20 57 48 45 52 45 40 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE@v=old.a;.END;.INSERT.I |
f17c0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
f17e0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
f1800 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8c 53 04 00 8a 35 43 52 45 41 54 45 20 54 | ET.a=5.WHERE.a=4...S...5CREATE.T |
f1820 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
f1840 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
f1860 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
f1880 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
f18a0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
f18c0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
f18e0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
f1900 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
f1920 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
f1940 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
f1960 | 6e 3d 6e 20 67 6c 6f 62 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n.glob(1,1)=old.a;...INSERT.IN |
f1980 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
f19a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
f19c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
f19e0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
f1a00 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
f1a20 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 0d 31 20 | n==1;...UPDATE.counts.SET.n=n.1. |
f1a40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
f1a60 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
f1a80 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
f1aa0 | 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8c 52 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 | =5.WHERE.a=4...R...5CREATE.TABLE |
f1ac0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
f1ae0 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
f1b00 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
f1b20 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
f1b40 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
f1b60 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
f1b80 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
f1ba0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
f1bc0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
f1be0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 20 | D.n==1;...UPDATE.counts.SET.n=n. |
f1c00 | 67 6c 6f 62 20 6c 74 72 69 6d 28 31 2c 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | glob.ltrim(1,1);...INSERT.INTO.c |
f1c20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
f1c40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
f1c60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
f1c80 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
f1ca0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
f1cc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
f1ce0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
f1d00 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
f1d20 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
f1d40 | 48 45 52 45 20 61 3d 34 85 34 8c 51 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | HERE.a=4.4.Q...mCREATE.TABLE.t1( |
f1d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
f1d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
f1da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
f1dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
f1de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f1e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f1e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
f1e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
f1e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
f1e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e | =1;...UPDATE.counts.SET.n=CURREN |
f1ea0 | 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | T_TIMESTAMP;...INSERT.INTO.count |
f1ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
f1ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
f1f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
f1f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
f1f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
f1f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f1f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
f1fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
f1fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
f1fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
f2000 | 0d 00 00 00 0b 02 a3 00 1d 45 1a 8d 17 d5 15 1d 12 65 0f a3 0c e1 0a 29 07 6b 05 5b 02 a3 00 00 | .........E.......e.....).k.[.... |
f2020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f21a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f21c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f21e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f2280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f22a0 | 00 00 00 85 34 8c 66 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ....4.f...mCREATE.TABLE.t1(a.INT |
f22c0 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
f22e0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
f2300 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
f2320 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
f2340 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
f2360 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
f2380 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
f23a0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
f23c0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
f23e0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f2400 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
f2420 | 29 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).SELECT(new.a,1).......ON.CONFL |
f2440 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
f2460 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r3.AFTER.UPDATE. |
f2480 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
f24a0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
f24c0 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
f24e0 | 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 | ;.END;.INSERT.INTO.t1(a).VALUES( |
f2500 | 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 | 1),(2),(1),(3),(1),(3),(2),(4),( |
f2520 | 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b | 7);.UPDATE.t1.SET.a=5.WHERE.a=4; |
f2540 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 84 0c 8c 65 04 | .DELETE.FROM.t1.NOT.INDEXED...e. |
f2560 | 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
f2580 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
f25a0 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
f25c0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
f25e0 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
f2600 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
f2620 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
f2640 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
f2660 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
f2680 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
f26a0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 0a | counts.SET.n=n-1.WHERE.v=old.a.. |
f26c0 | 20 20 49 4e 20 28 31 29 20 49 4e 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 54 20 6e 3d 6e | ..IN.(1).INs(v,n).VALUES(neT.n=n |
f26e0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
f2700 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
f2720 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
f2740 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
f2760 | 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8c 64 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;..:.d...yCREATE.TABLE. |
f2780 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
f27a0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
f27c0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
f27e0 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
f2800 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
f2820 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
f2840 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
f2860 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
f2880 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
f28a0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
f28c0 | 20 57 48 45 52 45 20 76 2d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | .WHERE.v-old.a;...INSERT.INTO.co |
f28e0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
f2900 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
f2920 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r3.AFTER |
f2940 | 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .DELETE.ON.t1.BEGIN...DELETE.FRO |
f2960 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
f2980 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
f29a0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
f29c0 | 20 56 41 4c 55 45 53 28 31 29 2c 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f | .VALUES(1),(.sqlite_compileoptio |
f29e0 | 6e 5f 75 73 65 64 28 31 29 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 | n_used(1));.UPDATE.t1.SET.a=5.WH |
f2a00 | 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | ERE.a=4;.DELETE.FROM.t1.WHERE.a= |
f2a20 | 37 3b 56 41 43 55 55 4d 0a 85 34 8c 63 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | 7;VACUUM..4.c...mCREATE.TABLE.t1 |
f2a40 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
f2a60 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
f2a80 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
f2aa0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
f2ac0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
f2ae0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
f2b00 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
f2b20 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
f2b40 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
f2b60 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 4f | ==1;...UPDATE.counts.SET.n=n-1.O |
f2b80 | 52 20 74 72 75 65 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | R.true=old.a;...INSERT.INTO.coun |
f2ba0 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
f2bc0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
f2be0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
f2c00 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
f2c20 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
f2c40 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f2c60 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
f2c80 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
f2ca0 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
f2cc0 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
f2ce0 | 0a 85 3e 8c 62 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..>.b....CREATE.TABLE.t1(a.INT); |
f2d00 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
f2d20 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
f2d40 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
f2d60 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
f2d80 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
f2da0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
f2dc0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
f2de0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
f2e00 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
f2e20 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 32 30 30 31 | PDATE.counts.SET.n=n-.upper(2001 |
f2e40 | 2d 30 31 2d 30 31 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | -01-011)=old.a;...INSERT.INTO.co |
f2e60 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
f2e80 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
f2ea0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r3.AFTER |
f2ec0 | 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .DELETE.ON.t1.BEGIN...DELETE.FRO |
f2ee0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
f2f00 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
f2f20 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
f2f40 | 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 | .VALUES(1),(2),(1),(3),(1),(3),( |
f2f60 | 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 | 2),(4),(7);.UPDATE.t1.SET.a=5.WH |
f2f80 | 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | ERE.a=4;.DELETE.FROM.t1.WHERE.a= |
f2fa0 | 37 3b 0a 85 3e 8c 61 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | 7;..>.a....CREATE.TABLE.t1(a.INT |
f2fc0 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
f2fe0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
f3000 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
f3020 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
f3040 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
f3060 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
f3080 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
f30a0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
f30c0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
f30e0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 31 32 | .UPDATE.counts.SET.n=n-.upper(12 |
f3100 | 30 30 31 2d 30 31 2d 30 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 001-01-01)=old.a;...INSERT.INTO. |
f3120 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
f3140 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
f3160 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
f3180 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
f31a0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
f31c0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
f31e0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
f3200 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
f3220 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
f3240 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
f3260 | 61 3d 37 3b 0a 85 34 8c 60 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..4.`...mCREATE.TABLE.t1(a.I |
f3280 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
f32a0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
f32c0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
f32e0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
f3300 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
f3320 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
f3340 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
f3360 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
f3380 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
f33a0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 | ...UPDATE.counts.SET.n=n-.upper( |
f33c0 | 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | 1)=old.a;...INSERT.INTO.counts(v |
f33e0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
f3400 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
f3420 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
f3440 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
f3460 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
f3480 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
f34a0 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
f34c0 | 53 28 31 29 2c 28 34 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(4),(1),(3),(1),(3),(2),(4) |
f34e0 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
f3500 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c | 4;.DELETE.FROM.t1.WHERE.a=7;..4. |
f3520 | 5f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | _...mCREATE.TABLE.t1(a.INT);.CRE |
f3540 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
f3560 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
f3580 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
f35a0 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
f35c0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
f35e0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
f3600 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
f3620 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
f3640 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
f3660 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-.upper(1)=old.a |
f3680 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
f36a0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
f36c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
f36e0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
f3700 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
f3720 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
f3740 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
f3760 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
f3780 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
f37a0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=1;.DELET |
f37c0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 5e 04 00 8a 6d 43 52 45 | E.FROM.t1.WHERE.a=7;..4.^...mCRE |
f37e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
f3800 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
f3820 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
f3840 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
f3860 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
f3880 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
f38a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
f38c0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
f38e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
f3900 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
f3920 | 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-.upper(1)=old.a;...INSE |
f3940 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
f3960 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
f3980 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
f39a0 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
f39c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
f39e0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
f3a00 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
f3a20 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
f3a40 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
f3a60 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 60 61 60 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=5.WHERE.`a`;.DELETE.FROM.t |
f3a80 | 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8c 5d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c | 1.WHERE.a=7;..4.]...mCREATE.TABL |
f3aa0 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
f3ac0 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
f3ae0 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
f3b00 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
f3b20 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
f3b40 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
f3b60 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
f3b80 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
f3ba0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
f3bc0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
f3be0 | 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -.upper(1)=old.a;...INSERT.INTO. |
f3c00 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
f3c20 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
f3c40 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
f3c60 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
f3c80 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
f3ca0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 43 55 52 52 45 4e 54 5f 44 | 1;...UPDATE.counts.SET.CURRENT_D |
f3cc0 | 41 54 45 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ATEv=old.a;.END;.INSERT.INTO.t1( |
f3ce0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
f3d00 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
f3d20 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
f3d40 | 61 3d 37 3b 0a 85 37 8c 5c 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..7.\...sCREATE.TABLE.t1(a.I |
f3d60 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
f3d80 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
f3da0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
f3dc0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
f3de0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
f3e00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
f3e20 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
f3e40 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
f3e60 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
f3e80 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 | ...UPDATE.counts.SET.n=n-.upper( |
f3ea0 | 20 2d 31 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .-11)=old.a;...INSERT.INTO.count |
f3ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
f3ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
f3f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
f3f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
f3f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
f3f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f3f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
f3fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
f3fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
f3fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
f4000 | 0d 00 00 00 0b 01 fc 00 1d 36 1a 7e 17 c6 15 0e 12 56 0f 9e 0c e6 0a 2e 07 76 04 be 01 fc 00 00 | .........6.~.....V.......v...... |
f4020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f40a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f40c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f40e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f4180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f41a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f41c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f41e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 3e 8c 71 | .............................>.q |
f4200 | 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
f4220 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
f4240 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
f4260 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
f4280 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
f42a0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
f42c0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
f42e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
f4300 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
f4320 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
f4340 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
f4360 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
f4380 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
f43a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
f43c0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
f43e0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
f4400 | 20 64 61 74 65 74 69 6d 65 28 31 2c 31 32 30 30 31 2d 30 31 2d 30 31 2c 31 29 3b 0a 20 20 55 50 | .datetime(1,12001-01-01,1);...UP |
f4420 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
f4440 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
f4460 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
f4480 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
f44a0 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 | =4;.DELETE.FROM.t1.NOT.INDEXED.4 |
f44c0 | 8c 70 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .p...mCREATE.TABLE.t1(a.INT);.CR |
f44e0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
f4500 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
f4520 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
f4540 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
f4560 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
f4580 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
f45a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
f45c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
f45e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
f4600 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
f4620 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
f4640 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
f4660 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
f4680 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
f46a0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
f46c0 | 45 20 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2e 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E..datetime(1,1.1);...UPDATE.cou |
f46e0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
f4700 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
f4720 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
f4740 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
f4760 | 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 6f 04 00 8a 6d 43 52 | TE.FROM.t1.NOT.INDEXED.4.o...mCR |
f4780 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
f47a0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
f47c0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
f47e0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
f4800 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
f4820 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
f4840 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
f4860 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
f4880 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
f48a0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
f48c0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
f48e0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
f4900 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
f4920 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
f4940 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
f4960 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 | .DELETE.FROM.counts.WHERE..datet |
f4980 | 69 6d 65 28 31 2c 31 2c 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ime(1,1,1);...UPDATE.counts.SET. |
f49a0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 63 68 61 72 28 31 29 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.char(1);.END;.INSERT |
f49c0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
f49e0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
f4a00 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
f4a20 | 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 6e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.NOT.INDEXED.4.n...mCREATE.TAB |
f4a40 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
f4a60 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
f4a80 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
f4aa0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
f4ac0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
f4ae0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
f4b00 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
f4b20 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
f4b40 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
f4b60 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
f4b80 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
f4ba0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f4bc0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f4be0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
f4c00 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
f4c20 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c | FROM.counts.WHERE..datetime(1,1, |
f4c40 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 65 70 | 1);...UPDATE.counts.SET.n=n-.rep |
f4c60 | 6c 61 63 65 28 31 2c 31 2c 31 29 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | lace(1,1,1);.END;.INSERT.INTO.t1 |
f4c80 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
f4ca0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
f4cc0 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 | .WHERE.a=4;.DELETE.FROM.t1.NOT.I |
f4ce0 | 4e 44 45 58 45 44 85 34 8c 6d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | NDEXED.4.m...mCREATE.TABLE.t1(a. |
f4d00 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
f4d20 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
f4d40 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
f4d60 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
f4d80 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
f4da0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
f4dc0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
f4de0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
f4e00 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
f4e20 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
f4e40 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
f4e60 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
f4e80 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
f4ea0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
f4ec0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
f4ee0 | 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 3b 0a 20 20 55 50 | nts.WHERE..datetime(1,1,1);...UP |
f4f00 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 6c 6f 77 65 72 28 31 29 3d 6f 6c | DATE.counts.SET.n=n-.lower(1)=ol |
f4f20 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
f4f40 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
f4f60 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
f4f80 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 | =4;.DELETE.FROM.t1.NOT.INDEXED.4 |
f4fa0 | 8c 6c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .l...mCREATE.TABLE.t1(a.INT);.CR |
f4fc0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
f4fe0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
f5000 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
f5020 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
f5040 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
f5060 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
f5080 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
f50a0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
f50c0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
f50e0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
f5100 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
f5120 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
f5140 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
f5160 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
f5180 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
f51a0 | 45 20 20 64 61 74 65 74 69 6d 65 28 31 2c 20 2d 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E..datetime(1,.-1);...UPDATE.cou |
f51c0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
f51e0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
f5200 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
f5220 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
f5240 | 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 6b 04 00 8a 6d 43 52 | TE.FROM.t1.NOT.INDEXED.4.k...mCR |
f5260 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
f5280 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
f52a0 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
f52c0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
f52e0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
f5300 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
f5320 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
f5340 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
f5360 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
f5380 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
f53a0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
f53c0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
f53e0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
f5400 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
f5420 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
f5440 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 | .DELETE.FROM.counts.WHERE..datet |
f5460 | 69 6d 65 28 31 20 2d 31 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ime(1.-11);...UPDATE.counts.SET. |
f5480 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
f54a0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
f54c0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
f54e0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
f5500 | 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 6a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.NOT.INDEXED.4.j...mCREATE.TAB |
f5520 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
f5540 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
f5560 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
f5580 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
f55a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
f55c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
f55e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
f5600 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
f5620 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
f5640 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
f5660 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
f5680 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f56a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f56c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
f56e0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
f5700 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 69 6d 65 28 20 31 3d 31 | FROM.counts.WHERE..datetime(.1=1 |
f5720 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | 1);...UPDATE.counts.SET.n=n-1.WH |
f5740 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
f5760 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
f5780 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
f57a0 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 | .WHERE.a=4;.DELETE.FROM.t1.NOT.I |
f57c0 | 4e 44 45 58 45 44 85 34 8c 69 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | NDEXED.4.i...mCREATE.TABLE.t1(a. |
f57e0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
f5800 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
f5820 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
f5840 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
f5860 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
f5880 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
f58a0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
f58c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
f58e0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
f5900 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
f5920 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
f5940 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
f5960 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
f5980 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
f59a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
f59c0 | 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 69 6d 65 28 20 2d 31 2c 31 29 3b 0a 20 20 55 50 | nts.WHERE..datetime(.-1,1);...UP |
f59e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
f5a00 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
f5a20 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
f5a40 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
f5a60 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 | =4;.DELETE.FROM.t1.NOT.INDEXED.4 |
f5a80 | 8c 68 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .h...mCREATE.TABLE.t1(a.INT);.CR |
f5aa0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
f5ac0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
f5ae0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
f5b00 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
f5b20 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
f5b40 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
f5b60 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
f5b80 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
f5ba0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
f5bc0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
f5be0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
f5c00 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
f5c20 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
f5c40 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
f5c60 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
f5c80 | 45 20 20 61 62 73 28 31 29 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E..abs(1).AND.n==1;...UPDATE.cou |
f5ca0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
f5cc0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
f5ce0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
f5d00 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
f5d20 | 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 46 8c 67 04 00 8b 11 43 52 | TE.FROM.t1.NOT.INDEXED.F.g....CR |
f5d40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
f5d60 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
f5d80 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
f5da0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
f5dc0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
f5de0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
f5e00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
f5e20 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
f5e40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
f5e60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
f5e80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
f5ea0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 2b 2b | ERT.INTO.counts(v,n).VALUES(ne++ |
f5ec0 | 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | ++++++++++++++++w.a,1).......ON. |
f5ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
f5f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r3.AFTER.UP |
f5f20 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
f5f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
f5f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f5f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
f5fa0 | 4c 68 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LhES(1),(2),(1),(3),(1),(3),(2), |
f5fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
f5fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
f6000 | 0d 00 00 00 0b 02 00 00 1d 48 1a 90 17 d8 15 20 12 61 0f a2 0c e3 0a 28 07 70 04 b8 02 00 00 00 | .........H.......a.....(.p...... |
f6020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f60a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f60c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f60e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f61a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f61c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f61e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f6200 | 85 34 8c 7c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.|...mCREATE.TABLE.t1(a.INT);. |
f6220 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
f6240 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
f6260 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
f6280 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
f62a0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
f62c0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
f62e0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
f6300 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
f6320 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
f6340 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
f6360 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
f6380 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
f63a0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
f63c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
f63e0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
f6400 | 45 52 45 20 6c 6f 77 65 72 28 31 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.lower(1)AND.n==1;...UPDATE.c |
f6420 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
f6440 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
f6460 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
f6480 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
f64a0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 7b 04 00 8a 6d | LETE.FROM.t1.NOT.INDEXED.4.{...m |
f64c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
f64e0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
f6500 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
f6520 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
f6540 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
f6560 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
f6580 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
f65a0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
f65c0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
f65e0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
f6600 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
f6620 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
f6640 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
f6660 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
f6680 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
f66a0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6a 73 6f 6e | ...DELETE.FROM.counts.WHERE.json |
f66c0 | 5f 74 65 73 74 31 28 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | _test1(1)==1;...UPDATE.counts.SE |
f66e0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
f6700 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
f6720 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
f6740 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
f6760 | 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 7a 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.NOT.INDEXED.4.z...mCREATE.T |
f6780 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
f67a0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
f67c0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
f67e0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
f6800 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
f6820 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
f6840 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
f6860 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
f6880 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
f68a0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
f68c0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
f68e0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
f6900 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
f6920 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
f6940 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
f6960 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 63 6f 61 6c 65 73 63 65 28 31 2c 31 | E.FROM.counts.WHERE.coalesce(1,1 |
f6980 | 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 | )==1;...UPDATE.counts.SET.n=n-.r |
f69a0 | 61 6e 64 6f 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | andom()=old.a;.END;.INSERT.INTO. |
f69c0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
f69e0 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
f6a00 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 | =5.WHERE.a=4;.DELETE.FROM.t1.NOT |
f6a20 | 20 49 4e 44 45 58 45 44 85 37 8c 79 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .INDEXED.7.y...sCREATE.TABLE.t1( |
f6a40 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
f6a60 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
f6a80 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
f6aa0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
f6ac0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f6ae0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f6b00 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
f6b20 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
f6b40 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
f6b60 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
f6b80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
f6ba0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
f6bc0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
f6be0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
f6c00 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
f6c20 | 6f 75 6e 74 73 20 57 48 45 52 45 20 4e 4f 54 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 3b | ounts.WHERE.NOT.datetime(1,1,1); |
f6c40 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
f6c60 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
f6c80 | 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 | .VALUES(1),(2),(1),(3),(1),(3),( |
f6ca0 | 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 | 2),(4),(7);.UPDATE.t1.SET.a=5.WH |
f6cc0 | 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 | ERE.a=4;.DELETE.FROM.t1.NOT.INDE |
f6ce0 | 58 45 44 85 3b 8c 78 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | XED.;.x...{CREATE.TABLE.t1(a.INT |
f6d00 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
f6d20 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
f6d40 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
f6d60 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
f6d80 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
f6da0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
f6dc0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
f6de0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
f6e00 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
f6e20 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f6e40 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
f6e60 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
f6e80 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
f6ea0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
f6ec0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
f6ee0 | 20 57 48 45 52 45 20 36 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d 31 3b 0a | .WHERE.6=.nullif(1,1)OR.true=1;. |
f6f00 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
f6f20 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
f6f40 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
f6f60 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
f6f80 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
f6fa0 | 3b 0a 85 3b 8c 77 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..;.w...{CREATE.TABLE.t1(a.INT) |
f6fc0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
f6fe0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
f7000 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
f7020 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
f7040 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
f7060 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
f7080 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
f70a0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
f70c0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
f70e0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f7100 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
f7120 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
f7140 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
f7160 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
f7180 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
f71a0 | 57 48 45 52 45 20 36 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 3b 0a 20 | WHERE.6=.nullif(1,1)IS.true=1;.. |
f71c0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f71e0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
f7200 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
f7220 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
f7240 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
f7260 | 0a 85 3b 8c 76 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..;.v...{CREATE.TABLE.t1(a.INT); |
f7280 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
f72a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
f72c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
f72e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
f7300 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
f7320 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
f7340 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
f7360 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
f7380 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
f73a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
f73c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
f73e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
f7400 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
f7420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
f7440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
f7460 | 48 45 52 45 20 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 49 53 20 74 72 75 65 3d 31 3b 0a 20 20 | HERE..randomblob(1)IS.true=1;... |
f7480 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f74a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
f74c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
f74e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
f7500 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
f7520 | 85 34 8c 75 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.u...mCREATE.TABLE.t1(a.INT);. |
f7540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
f7560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
f7580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
f75a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
f75c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
f75e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
f7600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
f7620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
f7640 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
f7660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
f7680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
f76a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
f76c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
f76e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
f7700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
f7720 | 45 52 45 20 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE..json_valid(1)=1;...UPDATE.c |
f7740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
f7760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
f7780 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
f77a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
f77c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 74 04 00 8a 6d | LETE.FROM.t1.NOT.INDEXED.4.t...m |
f77e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
f7800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
f7820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
f7840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
f7860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
f7880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
f78a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
f78c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
f78e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
f7900 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
f7920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
f7940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
f7960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
f7980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
f79a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
f79c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 | ...DELETE.FROM.counts.WHERE..dat |
f79e0 | 65 74 69 6d 65 28 4e 2c 31 2c 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | etime(N,1,1);...UPDATE.counts.SE |
f7a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
f7a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
f7a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
f7a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
f7a80 | 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8c 73 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.NOT.INDEXED.4.s...mCREATE.T |
f7aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
f7ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
f7ae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
f7b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
f7b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
f7b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
f7b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
f7b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
f7ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
f7bc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
f7be0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
f7c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
f7c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
f7c40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
f7c60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
f7c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 69 6d 65 28 31 2e | E.FROM.counts.WHERE..datetime(1. |
f7ca0 | 31 2c 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | 1,1);...UPDATE.counts.SET.n=n-1. |
f7cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
f7ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
f7d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
f7d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 | =5.WHERE.a=4;.DELETE.FROM.t1.NOT |
f7d40 | 20 49 4e 44 45 58 45 44 85 34 8c 72 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .INDEXED.4.r...mCREATE.TABLE.t1( |
f7d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
f7d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
f7da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
f7dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
f7de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
f7e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
f7e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
f7e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
f7e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
f7e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
f7ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
f7ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
f7ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
f7f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
f7f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
f7f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 20 64 61 74 65 74 69 6d 65 28 31 2c 31 45 31 29 3b 0a 20 20 | ounts.WHERE..datetime(1,1E1);... |
f7f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f7f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
f7fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
f7fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
f7fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
f8000 | 0d 0f a9 00 0b 02 11 00 1d 41 1a 89 17 d1 15 19 12 61 0f af 0c f1 0a 39 07 81 04 c9 02 11 00 00 | .........A.......a.....9........ |
f8020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f80a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f80c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f80e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f81a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f81c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f81e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
f8200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8d 07 04 00 8a 6d 43 52 45 41 54 45 20 | ..................4.....mCREATE. |
f8220 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
f8240 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
f8260 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
f8280 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
f82a0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
f82c0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
f82e0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
f8300 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
f8320 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
f8340 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
f8360 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
f8380 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
f83a0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
f83c0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
f83e0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
f8400 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 | TE.FROM.counts.WHERE.v=.nullif(1 |
f8420 | 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | ,1)=1;...UPDATE.counts.SET.n=n-1 |
f8440 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
f8460 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
f8480 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
f84a0 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
f84c0 | 45 52 45 20 61 20 2d 31 0a 85 34 8d 06 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a.-1..4.....mCREATE.TABLE.t1 |
f84e0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
f8500 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
f8520 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
f8540 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
f8560 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
f8580 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
f85a0 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
f85c0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
f85e0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
f8600 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
f8620 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
f8640 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
f8660 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
f8680 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
f86a0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
f86c0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3d 31 3b 0a 20 | counts.WHERE.v=.nullif(1,1)=1;.. |
f86e0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f8700 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
f8720 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
f8740 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
f8760 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 00 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
f8780 | 0a 85 34 8d 05 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..4.....mCREATE.TABLE.t1(a.INT); |
f87a0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
f87c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
f87e0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
f8800 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
f8820 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
f8840 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
f8860 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
f8880 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
f88a0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
f88c0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
f88e0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
f8900 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
f8920 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
f8940 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
f8960 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
f8980 | 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=.nullif(1,1)=1;...UPDATE. |
f89a0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.6=old.a;. |
f89c0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
f89e0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
f8a00 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
f8a20 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 04 04 00 8a | ELETE.FROM.t1.WHERE.a=7;..4..... |
f8a40 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
f8a60 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
f8a80 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
f8aa0 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
f8ac0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
f8ae0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
f8b00 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
f8b20 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
f8b40 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
f8b60 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
f8b80 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
f8ba0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
f8bc0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
f8be0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
f8c00 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
f8c20 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 | N...DELETE.FROM.counts.WHERE.v=. |
f8c40 | 6c 74 72 69 6d 28 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ltrim(1,1)==1;...UPDATE.counts.S |
f8c60 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
f8c80 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
f8ca0 | 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(7),(1),(3),(2),(4),(7);.UPDATE |
f8cc0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
f8ce0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 03 04 00 8a 6d 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..4.....mCREATE. |
f8d00 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
f8d20 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
f8d40 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
f8d60 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
f8d80 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
f8da0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
f8dc0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
f8de0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
f8e00 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
f8e20 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
f8e40 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
f8e60 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
f8e80 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
f8ea0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
f8ec0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
f8ee0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 5f 71 75 6f | TE.FROM.counts.WHERE.v=.json_quo |
f8f00 | 74 65 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | te(1);...UPDATE.counts.SET.n=n-1 |
f8f20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
f8f40 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(7),(1) |
f8f60 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
f8f80 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
f8fa0 | 45 52 45 20 61 3d 37 3b 0a 00 00 00 06 04 00 85 2e 8d 02 04 00 8a 61 43 52 45 41 54 45 20 54 41 | ERE.a=7;..............aCREATE.TA |
f8fc0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
f8fe0 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
f9000 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
f9020 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
f9040 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
f9060 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
f9080 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
f90a0 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
f90c0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
f90e0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
f9100 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | =n-1.WHERE.v=old.a;...INSERT.INT |
f9120 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
f9140 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
f9160 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
f9180 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
f91a0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6a 73 6f 6e 28 31 29 3b 0a 20 | .FROM.counts.WHERE.v=.json(1);.. |
f91c0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f91e0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
f9200 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(7),(1),(3),(2) |
f9220 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
f9240 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
f9260 | 0a 85 34 8d 01 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..4.....mCREATE.TABLE.t1(a.INT); |
f9280 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
f92a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
f92c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
f92e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
f9300 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
f9320 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
f9340 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
f9360 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
f9380 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
f93a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
f93c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
f93e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
f9400 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
f9420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
f9440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
f9460 | 48 45 52 45 20 76 3d 20 69 66 6e 75 6c 6c 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=.ifnull(1,1)=1;...UPDATE. |
f9480 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
f94a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
f94c0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
f94e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
f9500 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 00 04 00 8a | ELETE.FROM.t1.NOT.INDEXED.4..... |
f9520 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
f9540 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
f9560 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
f9580 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
f95a0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
f95c0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
f95e0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
f9600 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
f9620 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
f9640 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
f9660 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
f9680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
f96a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
f96c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
f96e0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
f9700 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 | N...DELETE.FROM.counts.WHERE.v=. |
f9720 | 64 61 74 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | date(1,1,1)=1;...UPDATE.counts.S |
f9740 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
f9760 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
f9780 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
f97a0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
f97c0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 34 8c 7f 04 00 8a 6d 43 52 45 41 54 45 20 | OM.t1.WHERE.a.-1..4.....mCREATE. |
f97e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
f9800 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
f9820 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
f9840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
f9860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
f9880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
f98a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
f98c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
f98e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
f9900 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
f9920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
f9940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
f9960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
f9980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
f99a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
f99c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 61 66 66 69 6e 69 74 79 | TE.FROM.counts.WHERE.v=.affinity |
f99e0 | 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | (1)=1;...UPDATE.counts.SET.n=n-1 |
f9a00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
f9a20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
f9a40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
f9a60 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
f9a80 | 45 52 45 20 61 20 2d 31 0a 85 34 8c 7e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a.-1..4.~...mCREATE.TABLE.t1 |
f9aa0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
f9ac0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
f9ae0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
f9b00 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
f9b20 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
f9b40 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
f9b60 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
f9b80 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
f9ba0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
f9bc0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
f9be0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
f9c00 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
f9c20 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
f9c40 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
f9c60 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
f9c80 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 61 66 66 69 6e 69 74 79 28 31 29 3d 31 3b 0a 20 | counts.WHERE.v=.affinity(1)=1;.. |
f9ca0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
f9cc0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
f9ce0 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
f9d00 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
f9d20 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 | E.a=4;.DELETE.FROM.t1.NOT.INDEXE |
f9d40 | 44 85 3b 8c 7d 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | D.;.}...{CREATE.TABLE.t1(a.INT); |
f9d60 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
f9d80 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
f9da0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
f9dc0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
f9de0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
f9e00 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
f9e20 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
f9e40 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
f9e60 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
f9e80 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
f9ea0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
f9ec0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
f9ee0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
f9f00 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
f9f20 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
f9f40 | 48 45 52 45 20 6e 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a 20 20 | HERE.n=.nullif(1,1)OR.true=N;... |
f9f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
f9f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
f9fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
f9fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
f9fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
fa000 | 0d 00 00 00 0b 01 bf 00 1d 41 1a 82 17 c3 15 04 12 45 0f 86 0c c1 0a 02 07 43 04 84 01 bf 00 00 | .........A.......E.......C...... |
fa020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fa1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 | ................................ |
fa1c0 | 41 8d 12 04 00 8b 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | A......CREATE.TABLE.t1(a.INT);.C |
fa1e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
fa200 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
fa220 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
fa240 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
fa260 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
fa280 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
fa2a0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
fa2c0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
fa2e0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
fa300 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
fa320 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
fa340 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
fa360 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
fa380 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
fa3a0 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
fa3c0 | 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 4e 2c 31 29 4f 52 20 74 72 75 65 3d 31 3b 0a 20 20 55 50 | RE.v=.nullif(N,1)OR.true=1;...UP |
fa3e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
fa400 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
fa420 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
fa440 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
fa460 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 | =4;.DELETE.FROM.t1.WHERE.a=7;VAC |
fa480 | 55 55 4d 0a 85 3b 8d 11 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | UUM..;.....{CREATE.TABLE.t1(a.IN |
fa4a0 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
fa4c0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
fa4e0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
fa500 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
fa520 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
fa540 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
fa560 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
fa580 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
fa5a0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
fa5c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
fa5e0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
fa600 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
fa620 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
fa640 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
fa660 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
fa680 | 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 4e 2c 31 29 49 53 20 74 72 75 65 3d 31 3b | s.WHERE.v=.nullif(N,1)IS.true=1; |
fa6a0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
fa6c0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
fa6e0 | 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 | .VALUES(1),(2),(1),(3),(1),(3),( |
fa700 | 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 | 2),(4),(7);.UPDATE.t1.SET.a=5.WH |
fa720 | 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | ERE.a=4;.DELETE.FROM.t1.WHERE.a= |
fa740 | 37 3b 0a 85 3b 8d 10 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | 7;..;.....{CREATE.TABLE.t1(a.INT |
fa760 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
fa780 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
fa7a0 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
fa7c0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
fa7e0 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
fa800 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
fa820 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
fa840 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
fa860 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
fa880 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
fa8a0 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
fa8c0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
fa8e0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
fa900 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
fa920 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
fa940 | 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 39 2c 31 29 49 53 20 74 72 75 65 3d 31 3b 0a | .WHERE.v=.nullif(9,1)IS.true=1;. |
fa960 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
fa980 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
fa9a0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
fa9c0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
fa9e0 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
faa00 | 3b 0a 85 3b 8d 0f 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..;.....{CREATE.TABLE.t1(a.INT) |
faa20 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
faa40 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
faa60 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
faa80 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
faaa0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
faac0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
faae0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
fab00 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
fab20 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
fab40 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
fab60 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
fab80 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
faba0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
fabc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
fabe0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
fac00 | 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d 56 3b 0a 20 | WHERE.v=.nullif(1,1)OR.true=V;.. |
fac20 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
fac40 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
fac60 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
fac80 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
faca0 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
facc0 | 0a 85 41 8d 0e 04 00 8b 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..A......CREATE.TABLE.t1(a.INT); |
face0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
fad00 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
fad20 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
fad40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
fad60 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
fad80 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
fada0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
fadc0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
fade0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
fae00 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
fae20 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
fae40 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
fae60 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
fae80 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
faea0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
faec0 | 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a 20 20 | HERE.v=.nullif(1,1)OR.true=N;... |
faee0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
faf00 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
faf20 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
faf40 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
faf60 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 | .a=4;.DELETE.FROM.t1.WHERE.a=7;V |
faf80 | 41 43 55 55 4d 0a 85 3b 8d 0d 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | ACUUM..;.....{CREATE.TABLE.t1(a. |
fafa0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
fafc0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
fafe0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
fb000 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
fb020 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
fb040 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
fb060 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
fb080 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
fb0a0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
fb0c0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
fb0e0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
fb100 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
fb120 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
fb140 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
fb160 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
fb180 | 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d | nts.WHERE.v=.nullif(1,1)OR.true= |
fb1a0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
fb1c0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
fb1e0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
fb200 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
fb220 | 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a<4;.DELETE.FROM.t1.WHERE. |
fb240 | 61 3d 37 3b 0a 85 3b 8d 0c 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..;.....{CREATE.TABLE.t1(a.I |
fb260 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
fb280 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
fb2a0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
fb2c0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
fb2e0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
fb300 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
fb320 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
fb340 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
fb360 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
fb380 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
fb3a0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
fb3c0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
fb3e0 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
fb400 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
fb420 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
fb440 | 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 | ts.WHERE.v=.nullif(1,1)IS.true=1 |
fb460 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
fb480 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
fb4a0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
fb4c0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
fb4e0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
fb500 | 3d 37 3b 0a 85 3b 8d 0b 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..;.....{CREATE.TABLE.t1(a.IN |
fb520 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
fb540 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
fb560 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
fb580 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
fb5a0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
fb5c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
fb5e0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
fb600 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
fb620 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
fb640 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
fb660 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
fb680 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
fb6a0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
fb6c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
fb6e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
fb700 | 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 3b | s.WHERE.v=.nullif(1,1)IS.true=1; |
fb720 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
fb740 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
fb760 | 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 | .VALUES(1),(2),(1),(3),(1),(3),( |
fb780 | 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 | 2),(4),(7);.UPDATE.t1.SET.a=5.WH |
fb7a0 | 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | ERE.a=4;.DELETE.FROM.t1.WHERE.a= |
fb7c0 | 31 3b 0a 85 3b 8d 0a 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | 1;..;.....{CREATE.TABLE.t1(a.INT |
fb7e0 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
fb800 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
fb820 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
fb840 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
fb860 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
fb880 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
fb8a0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
fb8c0 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
fb8e0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
fb900 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
fb920 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
fb940 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
fb960 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
fb980 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
fb9a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
fb9c0 | 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 3b 0a | .WHERE.v=.nullif(1,1)IS.true=1;. |
fb9e0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
fba00 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
fba20 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
fba40 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
fba60 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 20 2d | RE.a=4;.DELETE.FROM.t1.WHERE.a.- |
fba80 | 31 0a 85 3b 8d 09 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | 1..;.....{CREATE.TABLE.t1(a.INT) |
fbaa0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
fbac0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
fbae0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
fbb00 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
fbb20 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
fbb40 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
fbb60 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
fbb80 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
fbba0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
fbbc0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
fbbe0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
fbc00 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
fbc20 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
fbc40 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
fbc60 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
fbc80 | 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 3b 0a 20 | WHERE.v=.nullif(1,1)IS.true=1;.. |
fbca0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
fbcc0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
fbce0 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
fbd00 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
fbd20 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 00 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
fbd40 | 0a 85 3b 8d 08 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..;.....{CREATE.TABLE.t1(a.INT); |
fbd60 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
fbd80 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
fbda0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
fbdc0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
fbde0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
fbe00 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
fbe20 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
fbe40 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
fbe60 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
fbe80 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
fbea0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
fbec0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
fbee0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
fbf00 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
fbf20 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
fbf40 | 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 3b 0a 20 20 | HERE.v=.nullif(1,1)IS.true=1;... |
fbf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
fbf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
fbfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
fbfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
fbfe0 | 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a<4;.DELETE.FROM.t1.WHERE.a=7;. |
fc000 | 0d 00 00 00 0b 02 04 00 1d 41 1a 89 17 d1 15 19 12 5e 0f a6 0c ee 0a 36 07 74 04 bc 02 04 00 00 | .........A.......^.....6.t...... |
fc020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fc200 | 00 00 00 00 85 34 8d 1d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .....4.....mCREATE.TABLE.t1(a.IN |
fc220 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
fc240 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
fc260 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
fc280 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
fc2a0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
fc2c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
fc2e0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
fc300 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
fc320 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
fc340 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
fc360 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
fc380 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
fc3a0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
fc3c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
fc3e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
fc400 | 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 34 29 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=.round(1,4)==1;...UPDA |
fc420 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
fc440 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
fc460 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(7),(1),(3),(2),(4), |
fc480 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
fc4a0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 1c | ;.DELETE.FROM.t1.WHERE.a=7;..4.. |
fc4c0 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
fc4e0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
fc500 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
fc520 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
fc540 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
fc560 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
fc580 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
fc5a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
fc5c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
fc5e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
fc600 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
fc620 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
fc640 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
fc660 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
fc680 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
fc6a0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
fc6c0 | 76 3d 20 72 6f 75 6e 64 28 31 2c 33 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=.round(1,3)==1;...UPDATE.count |
fc6e0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
fc700 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
fc720 | 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(7),(1),(3),(2),(4),(7);.UPD |
fc740 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
fc760 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8d 1b 04 00 8b 01 43 52 45 41 | .FROM.t1.WHERE.a=7;..>......CREA |
fc780 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
fc7a0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
fc7c0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
fc7e0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
fc800 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
fc820 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
fc840 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
fc860 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
fc880 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
fc8a0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
fc8c0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
fc8e0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
fc900 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
fc920 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
fc940 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
fc960 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 | ELETE.FROM.counts.WHERE.v=.round |
fc980 | 28 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | (1,2001-01-011)==1;...UPDATE.cou |
fc9a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
fc9c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
fc9e0 | 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(7),(1),(3),(2),(4),(7);.U |
fca00 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
fca20 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 1a 04 00 8a 6d 43 52 | TE.FROM.t1.WHERE.a=7;..4.....mCR |
fca40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
fca60 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
fca80 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
fcaa0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
fcac0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
fcae0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
fcb00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
fcb20 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
fcb40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
fcb60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
fcb80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
fcba0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
fcbc0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
fcbe0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
fcc00 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
fcc20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 | .DELETE.FROM.counts.WHERE.v=.rou |
fcc40 | 6e 64 28 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | nd(1,1)==1;...UPDATE.counts.SET. |
fcc60 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
fcc80 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
fcca0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
fccc0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
fcce0 | 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 34 8d 19 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a.-1..4.....mCREATE.TAB |
fcd00 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
fcd20 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
fcd40 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
fcd60 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
fcd80 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
fcda0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
fcdc0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
fcde0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
fce00 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
fce20 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
fce40 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
fce60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
fce80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
fcea0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
fcec0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
fcee0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 31 29 20 | FROM.counts.WHERE.v=.round(1,1). |
fcf00 | 2a 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | *1;...UPDATE.counts.SET.n=n-1.WH |
fcf20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
fcf40 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(7),(1),(3 |
fcf60 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
fcf80 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
fcfa0 | 20 61 3d 37 3b 0a 85 34 8d 18 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.....mCREATE.TABLE.t1(a. |
fcfc0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
fcfe0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
fd000 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
fd020 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
fd040 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
fd060 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
fd080 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
fd0a0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
fd0c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
fd0e0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
fd100 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
fd120 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
fd140 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
fd160 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
fd180 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
fd1a0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 30 29 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=.round(1,0)==1;...UP |
fd1c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
fd1e0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
fd200 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(7),(1),(3),(2),(4 |
fd220 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
fd240 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 37 | =4;.DELETE.FROM.t1.WHERE.a=7;..7 |
fd260 | 8d 17 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .....sCREATE.TABLE.t1(a.INT);.CR |
fd280 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
fd2a0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
fd2c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
fd2e0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
fd300 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
fd320 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
fd340 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
fd360 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
fd380 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
fd3a0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
fd3c0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
fd3e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
fd400 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
fd420 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
fd440 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
fd460 | 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 20 2d 31 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | E.v=.round(1,.-11)==1;...UPDATE. |
fd480 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
fd4a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
fd4c0 | 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(7),(1),(3),(2),(4),(7) |
fd4e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
fd500 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 16 04 00 8a | ELETE.FROM.t1.WHERE.a=7;..4..... |
fd520 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
fd540 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
fd560 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
fd580 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
fd5a0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
fd5c0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
fd5e0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
fd600 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
fd620 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
fd640 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
fd660 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
fd680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
fd6a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
fd6c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
fd6e0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
fd700 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 | N...DELETE.FROM.counts.WHERE.v=. |
fd720 | 72 6f 75 6e 64 28 30 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | round(0,1)==1;...UPDATE.counts.S |
fd740 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
fd760 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
fd780 | 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(7),(1),(3),(2),(4),(7);.UPDATE |
fd7a0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
fd7c0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 15 04 00 8a 6d 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..4.....mCREATE. |
fd7e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
fd800 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
fd820 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
fd840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
fd860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
fd880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
fd8a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
fd8c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
fd8e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
fd900 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
fd920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
fd940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
fd960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
fd980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
fd9a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
fd9c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 20 2d | TE.FROM.counts.WHERE.v=.round(.- |
fd9e0 | 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | 1)==1;...UPDATE.counts.SET.n=n-1 |
fda00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
fda20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(7),(1) |
fda40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
fda60 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
fda80 | 45 52 45 20 61 3d 37 3b 0a 85 34 8d 14 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..4.....mCREATE.TABLE.t1 |
fdaa0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
fdac0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
fdae0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
fdb00 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
fdb20 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
fdb40 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
fdb60 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
fdb80 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
fdba0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
fdbc0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
fdbe0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
fdc00 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
fdc20 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
fdc40 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
fdc60 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
fdc80 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 70 72 69 6e 74 66 28 31 2c 31 29 3d 31 3b 0a 20 | counts.WHERE.v=.printf(1,1)=1;.. |
fdca0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
fdcc0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
fdce0 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(7),(1),(3),(2) |
fdd00 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
fdd20 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
fdd40 | 0a 85 3b 8d 13 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..;.....{CREATE.TABLE.t1(a.INT); |
fdd60 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
fdd80 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
fdda0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
fddc0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
fdde0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
fde00 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
fde20 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
fde40 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
fde60 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
fde80 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
fdea0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
fdec0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
fdee0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
fdf00 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
fdf20 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
fdf40 | 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 4e 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a 20 20 | HERE.v=.nullif(N,1)OR.true=N;... |
fdf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
fdf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
fdfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
fdfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
fdfe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
fe000 | 0d 00 00 00 0b 02 15 00 1d 48 1a 90 17 d8 15 20 12 68 0f b0 0c f8 0a 40 07 88 04 d0 02 15 00 00 | .........H.......h.....@........ |
fe020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
fe200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 37 8d 28 04 00 8a 73 43 52 45 | ......................7.(...sCRE |
fe220 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
fe240 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
fe260 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
fe280 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
fe2a0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
fe2c0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
fe2e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
fe300 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
fe320 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
fe340 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
fe360 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
fe380 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
fe3a0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
fe3c0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
fe3e0 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
fe400 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 | DELETE.FROM.counts.WHERE.v=.unic |
fe420 | 6f 64 65 28 20 2d 31 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | ode(.-11)==1;...UPDATE.counts.SE |
fe440 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
fe460 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
fe480 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
fe4a0 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
fe4c0 | 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 27 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.NOT.INDEXED.4.'...mCREATE.T |
fe4e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
fe500 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
fe520 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
fe540 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
fe560 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
fe580 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
fe5a0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
fe5c0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
fe5e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
fe600 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
fe620 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
fe640 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
fe660 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
fe680 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
fe6a0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
fe6c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 74 69 6d 65 28 31 2c 31 2c | E.FROM.counts.WHERE.v=.time(1,1, |
fe6e0 | 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | 1)=1;...UPDATE.counts.SET.n=n-1. |
fe700 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
fe720 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(7),(1), |
fe740 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
fe760 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
fe780 | 52 45 20 61 3d 37 3b 0a 85 34 8d 26 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.&...mCREATE.TABLE.t1( |
fe7a0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
fe7c0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
fe7e0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
fe800 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
fe820 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
fe840 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
fe860 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
fe880 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
fe8a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
fe8c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
fe8e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
fe900 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
fe920 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
fe940 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
fe960 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
fe980 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 74 69 6d 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 | ounts.WHERE.v=.time(1,1,1)=1;... |
fe9a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
fe9c0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
fe9e0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
fea00 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
fea20 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
fea40 | 85 34 8d 25 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.%...mCREATE.TABLE.t1(a.INT);. |
fea60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
fea80 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
feaa0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
feac0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
feae0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
feb00 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
feb20 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
feb40 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
feb60 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
feb80 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
feba0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
febc0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
febe0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
fec00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
fec20 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
fec40 | 45 52 45 20 76 3d 20 74 69 6d 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=.time(1,1,1)=1;...UPDATE.c |
fec60 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
fec80 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
feca0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
fecc0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
fece0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 34 8d 24 04 00 8a 6d | LETE.FROM.t1.WHERE.a.-1..4.$...m |
fed00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
fed20 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
fed40 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
fed60 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
fed80 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
feda0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
fedc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
fede0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
fee00 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
fee20 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
fee40 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
fee60 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
fee80 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
feea0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
feec0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
feee0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 | ...DELETE.FROM.counts.WHERE.v=.r |
fef00 | 74 72 69 6d 28 31 2c 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | trim(1,1)==1;...UPDATE.counts.SE |
fef20 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
fef40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
fef60 | 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (7),(1),(3),(2),(4),(7);.UPDATE. |
fef80 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
fefa0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 23 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.#...mCREATE.T |
fefc0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
fefe0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
ff000 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
ff020 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
ff040 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
ff060 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
ff080 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
ff0a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
ff0c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
ff0e0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
ff100 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
ff120 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
ff140 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
ff160 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
ff180 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
ff1a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 74 72 69 6d 28 31 2c 31 | E.FROM.counts.WHERE.v=.rtrim(1,1 |
ff1c0 | 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | )==1;...UPDATE.counts.SET.n=n-1. |
ff1e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
ff200 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
ff220 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
ff240 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 | =5.WHERE.a=4;.DELETE.FROM.t1.NOT |
ff260 | 20 49 4e 44 45 58 45 44 85 34 8d 22 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .INDEXED.4."...mCREATE.TABLE.t1( |
ff280 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
ff2a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
ff2c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
ff2e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
ff300 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
ff320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
ff340 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
ff360 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
ff380 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
ff3a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
ff3c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
ff3e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
ff400 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
ff420 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
ff440 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
ff460 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2e 31 29 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=.round(1.1)==1;... |
ff480 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
ff4a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
ff4c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(7),(1),(3),(2), |
ff4e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
ff500 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
ff520 | 85 34 8d 21 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.!...mCREATE.TABLE.t1(a.INT);. |
ff540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
ff560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
ff580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
ff5a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
ff5c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
ff5e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
ff600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
ff620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
ff640 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
ff660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
ff680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
ff6a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
ff6c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
ff6e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
ff700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
ff720 | 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 39 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=.round(1,9)==1;...UPDATE.c |
ff740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
ff760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
ff780 | 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(7),(1),(3),(2),(4),(7); |
ff7a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
ff7c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 20 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.....m |
ff7e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
ff800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
ff820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
ff840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
ff860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
ff880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
ff8a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
ff8c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
ff8e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
ff900 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
ff920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
ff940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
ff960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
ff980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
ff9a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
ff9c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 | ...DELETE.FROM.counts.WHERE.v=.r |
ff9e0 | 6f 75 6e 64 28 31 2c 38 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | ound(1,8)==1;...UPDATE.counts.SE |
ffa00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
ffa20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
ffa40 | 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (7),(1),(3),(2),(4),(7);.UPDATE. |
ffa60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
ffa80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 1f 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.....mCREATE.T |
ffaa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
ffac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
ffae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
ffb00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
ffb20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
ffb40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
ffb60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
ffb80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
ffba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
ffbc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
ffbe0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
ffc00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
ffc20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
ffc40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
ffc60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
ffc80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 37 | E.FROM.counts.WHERE.v=.round(1,7 |
ffca0 | 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | )==1;...UPDATE.counts.SET.n=n-1. |
ffcc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
ffce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(7),(1), |
ffd00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
ffd20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
ffd40 | 52 45 20 61 3d 37 3b 0a 85 34 8d 1e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
ffd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
ffd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
ffda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
ffdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
ffde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
ffe00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
ffe20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
ffe40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
ffe60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
ffe80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
ffea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
ffec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
ffee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
fff00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
fff20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
fff40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 72 6f 75 6e 64 28 31 2c 35 29 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=.round(1,5)==1;... |
fff60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
fff80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
fffa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(7),(1),(3),(2), |
fffc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
fffe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
100000 | 0d 00 00 00 0b 01 bb 00 1d 44 1a 85 17 bd 14 f7 12 31 0f 6d 0c a7 09 ef 07 37 04 7f 01 bb 00 00 | .........D.......1.m.....7...... |
100020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1000a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1000c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1000e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
100180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1001a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 40 8d 33 04 | ............................@.3. |
1001c0 | 00 8b 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ...CREATE.TABLE.t1(a.INT);.CREAT |
1001e0 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
100200 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
100220 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
100240 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
100260 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
100280 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
1002a0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
1002c0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
1002e0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
100300 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
100320 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
100340 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
100360 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
100380 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
1003a0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
1003c0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 64 61 74 65 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 | =old.a.AND.n=.date(1,1,1)=1;...U |
1003e0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
100400 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
100420 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
100440 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
100460 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 | a=4;.DELETE.FROM.t1.NOT.INDEXED. |
100480 | 34 8d 32 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | 4.2...mCREATE.TABLE.t1(a.INT);.C |
1004a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
1004c0 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
1004e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
100500 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
100520 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
100540 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
100560 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
100580 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
1005a0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
1005c0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
1005e0 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
100600 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
100620 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
100640 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
100660 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
100680 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 | RE.v=old.a.AND..sqlite_compileop |
1006a0 | 74 69 6f 6e 5f 75 73 65 64 28 31 29 2d 20 72 61 6e 64 6f 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 45 4e | tion_used(1)-.random()=old.a;.EN |
1006c0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
1006e0 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
100700 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
100720 | 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 31 04 00 8a 6d 43 | ETE.FROM.t1.NOT.INDEXED.4.1...mC |
100740 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
100760 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
100780 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
1007a0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
1007c0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
1007e0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
100800 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
100820 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
100840 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
100860 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
100880 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
1008a0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
1008c0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
1008e0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
100900 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
100920 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 | ..DELETE.FROM.counts.WHERE.v=CUR |
100940 | 52 45 4e 54 5f 44 41 54 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | RENT_DATE=1;...UPDATE.counts.SET |
100960 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
100980 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
1009a0 | 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 7),(1),(3),(2),(4),(7);.UPDATE.t |
1009c0 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
1009e0 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8d 30 04 00 8a 6d 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a=7;..4.0...mCREATE.TA |
100a00 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
100a20 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
100a40 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
100a60 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
100a80 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
100aa0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
100ac0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
100ae0 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
100b00 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
100b20 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
100b40 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | =n-1.WHERE.v=old.a;...INSERT.INT |
100b60 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
100b80 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
100ba0 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
100bc0 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
100be0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 6f 64 65 28 31 29 | .FROM.counts.WHERE.v=.unicode(1) |
100c00 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 75 6e 69 63 | ==1;...UPDATE.counts.SET.n=.unic |
100c20 | 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ode(1)=old.a;.END;.INSERT.INTO.t |
100c40 | 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 | 1(a).VALUES(1),(2),(1),(3),(1),( |
100c60 | 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 3),(2),(4),(7);.UPDATE.t1.SET.a= |
100c80 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 | 5.WHERE.a=4;.DELETE.FROM.t1.NOT. |
100ca0 | 49 4e 44 45 58 45 44 85 42 8d 2f 04 00 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | INDEXED.B./....CREATE.TABLE.t1(a |
100cc0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
100ce0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
100d00 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
100d20 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
100d40 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
100d60 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
100d80 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
100da0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
100dc0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
100de0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
100e00 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
100e20 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
100e40 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
100e60 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
100e80 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
100ea0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 20 73 75 62 73 74 72 | unts.WHERE.v=.unicode(1)=.substr |
100ec0 | 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | (1,1,1)=1;...UPDATE.counts.SET.n |
100ee0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
100f00 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
100f20 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
100f40 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=5.WHERE.a=4;.DELETE.FROM.t |
100f60 | 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 40 8d 2e 04 00 8b 05 43 52 45 41 54 45 20 54 41 42 4c | 1.NOT.INDEXED.@......CREATE.TABL |
100f80 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
100fa0 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
100fc0 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
100fe0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
101000 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
101020 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
101040 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
101060 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
101080 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
1010a0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
1010c0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
1010e0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
101100 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
101120 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
101140 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
101160 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 20 | ROM.counts.WHERE.v=.unicode(1)=. |
101180 | 6e 75 6c 6c 69 66 28 31 2c 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | nullif(1,1)=1;...UPDATE.counts.S |
1011a0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
1011c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
1011e0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
101200 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
101220 | 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 42 8d 2d 04 00 8b 09 43 52 45 41 54 45 20 | OM.t1.NOT.INDEXED.B.-....CREATE. |
101240 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
101260 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
101280 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
1012a0 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
1012c0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
1012e0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
101300 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
101320 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
101340 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
101360 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
101380 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
1013a0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
1013c0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
1013e0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
101400 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
101420 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 6f 64 65 28 | TE.FROM.counts.WHERE.v=.unicode( |
101440 | 31 29 3d 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | 1)=.json_valid(1)=1;...UPDATE.co |
101460 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
101480 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
1014a0 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
1014c0 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
1014e0 | 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 42 8d 2c 04 00 8b 09 43 | ETE.FROM.t1.NOT.INDEXED.B.,....C |
101500 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
101520 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
101540 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
101560 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
101580 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
1015a0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
1015c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
1015e0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
101600 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
101620 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
101640 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
101660 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
101680 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
1016a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
1016c0 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
1016e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e | ..DELETE.FROM.counts.WHERE.v=.un |
101700 | 69 63 6f 64 65 28 31 29 3d 20 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3d 31 3b 0a 20 20 55 50 44 | icode(1)=.json_quote(1)=1;...UPD |
101720 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
101740 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
101760 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
101780 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
1017a0 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 44 8d | 4;.DELETE.FROM.t1.NOT.INDEXED.D. |
1017c0 | 2b 04 00 8b 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | +....CREATE.TABLE.t1(a.INT);.CRE |
1017e0 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
101800 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
101820 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
101840 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
101860 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
101880 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
1018a0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
1018c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
1018e0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
101900 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
101920 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
101940 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
101960 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
101980 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
1019a0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
1019c0 | 20 76 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 20 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 3d | .v=.unicode(1)=.json_patch(1,1)= |
1019e0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
101a00 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
101a20 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
101a40 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
101a60 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e | WHERE.a=4;.DELETE.FROM.t1.NOT.IN |
101a80 | 44 45 58 45 44 85 3b 8d 2a 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | DEXED.;.*...{CREATE.TABLE.t1(a.I |
101aa0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
101ac0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
101ae0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
101b00 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
101b20 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
101b40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
101b60 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
101b80 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
101ba0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
101bc0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
101be0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
101c00 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
101c20 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
101c40 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
101c60 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
101c80 | 74 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 20 61 62 73 28 31 29 3d 31 | ts.WHERE.v=.unicode(1)=.abs(1)=1 |
101ca0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
101cc0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
101ce0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
101d00 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
101d20 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 | HERE.a=4;.DELETE.FROM.t1.NOT.IND |
101d40 | 45 58 45 44 85 38 8d 29 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | EXED.8.)...uCREATE.TABLE.t1(a.IN |
101d60 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
101d80 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
101da0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
101dc0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
101de0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
101e00 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
101e20 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
101e40 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
101e60 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
101e80 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
101ea0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
101ec0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
101ee0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
101f00 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
101f20 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
101f40 | 73 20 57 48 45 52 45 20 76 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 20 31 3d 31 3d 31 3b 0a 20 20 | s.WHERE.v=.unicode(1)=.1=1=1;... |
101f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
101f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
101fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
101fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
101fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
102000 | 0d 00 00 00 0b 01 88 00 1d 36 1a 62 17 8e 14 b9 11 ee 0f 2c 0c 68 09 b0 06 f8 04 40 01 88 00 00 | .........6.b.......,.h.....@.... |
102020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1020a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1020c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1020e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
102180 | 00 00 00 00 00 00 00 00 85 34 8d 3e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .........4.>...mCREATE.TABLE.t1( |
1021a0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
1021c0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
1021e0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
102200 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
102220 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
102240 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
102260 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
102280 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
1022a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1022c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
1022e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
102300 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
102320 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
102340 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
102360 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
102380 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
1023a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 73 71 6c 69 74 65 5f 76 65 72 73 | UPDATE.counts.SET.n=.sqlite_vers |
1023c0 | 69 6f 6e 28 29 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | ion();.END;.INSERT.INTO.t1(a).VA |
1023e0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(7),(1),(3),(2), |
102400 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
102420 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
102440 | 85 34 8d 3d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.=...mCREATE.TABLE.t1(a.INT);. |
102460 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
102480 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
1024a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
1024c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
1024e0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
102500 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
102520 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
102540 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
102560 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
102580 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
1025a0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
1025c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
1025e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
102600 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
102620 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
102640 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
102660 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 3b 0a 45 | ounts.SET.n=.sqlite_version();.E |
102680 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
1026a0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
1026c0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
1026e0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 34 8d 3c 04 00 8a 6d | LETE.FROM.t1.WHERE.a.-1..4.<...m |
102700 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
102720 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
102740 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
102760 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
102780 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
1027a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
1027c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1027e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
102800 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
102820 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
102840 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
102860 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
102880 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
1028a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1028c0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1028e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
102900 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
102920 | 54 20 6e 3d 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=.julianday(1,1,1);.END;.INSE |
102940 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
102960 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
102980 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
1029a0 | 4d 20 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 34 8d 3b 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a.-1..4.;...mCREATE.T |
1029c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
1029e0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
102a00 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
102a20 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
102a40 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
102a60 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
102a80 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
102aa0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
102ac0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
102ae0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
102b00 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
102b20 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
102b40 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
102b60 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
102b80 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
102ba0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
102bc0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 69 6e 73 | n==1;...UPDATE.counts.SET.n=.ins |
102be0 | 74 72 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | tr(1,1)=old.a;.END;.INSERT.INTO. |
102c00 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
102c20 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
102c40 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
102c60 | 52 45 20 61 20 2d 31 0a 85 40 8d 3a 04 00 8b 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a.-1..@.:....CREATE.TABLE.t1( |
102c80 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
102ca0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
102cc0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
102ce0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
102d00 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
102d20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
102d40 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
102d60 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
102d80 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
102da0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
102dc0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
102de0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
102e00 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
102e20 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
102e40 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
102e60 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 7a 65 72 6f 62 | ounts.WHERE.v=old.a.AND.n=.zerob |
102e80 | 6c 6f 62 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | lob(1)=1;...UPDATE.counts.SET.n= |
102ea0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
102ec0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
102ee0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
102f00 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
102f20 | 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 3e 8d 39 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 | .NOT.INDEXED.>.9....CREATE.TABLE |
102f40 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
102f60 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
102f80 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
102fa0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
102fc0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
102fe0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
103000 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
103020 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
103040 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
103060 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
103080 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
1030a0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
1030c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
1030e0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
103100 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
103120 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 74 | OM.counts.WHERE.v=old.a.AND.n=.t |
103140 | 79 70 65 6f 66 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | ypeof(1)=1;...UPDATE.counts.SET. |
103160 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
103180 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
1031a0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
1031c0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
1031e0 | 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 47 8d 38 04 00 8b 13 43 52 45 41 54 45 20 54 41 42 | t1.NOT.INDEXED.G.8....CREATE.TAB |
103200 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
103220 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
103240 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
103260 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
103280 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
1032a0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
1032c0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
1032e0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
103300 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
103320 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
103340 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
103360 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
103380 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
1033a0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
1033c0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
1033e0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
103400 | 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | .sqlite_source_id()=1;...UPDATE. |
103420 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
103440 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
103460 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
103480 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
1034a0 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 51 8d 37 04 00 8b | ELETE.FROM.t1.NOT.INDEXED.Q.7... |
1034c0 | 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | 'CREATE.TABLE.t1(a.INT);.CREATE. |
1034e0 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
103500 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
103520 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
103540 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
103560 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
103580 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
1035a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
1035c0 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
1035e0 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
103600 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
103620 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
103640 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
103660 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
103680 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
1036a0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
1036c0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e | ld.a.AND.n=.sqlite_compileoption |
1036e0 | 5f 75 73 65 64 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | _used(1)=1;...UPDATE.counts.SET. |
103700 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
103720 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 | .INTO.t1(a).VALUES(1),(2),(1),(7 |
103740 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
103760 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
103780 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 50 8d 36 04 00 8b 25 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..P.6...%CREATE.TAB |
1037a0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
1037c0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
1037e0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
103800 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
103820 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
103840 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
103860 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
103880 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
1038a0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
1038c0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
1038e0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
103900 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
103920 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
103940 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
103960 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
103980 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1039a0 | 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 3d 31 3b 0a | .sqlite_compileoption_get(1)=1;. |
1039c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
1039e0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
103a00 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(7),(1),(3),(2 |
103a20 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
103a40 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
103a60 | 3b 0a 85 50 8d 35 04 00 8b 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..P.5...%CREATE.TABLE.t1(a.INT) |
103a80 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
103aa0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
103ac0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
103ae0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
103b00 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
103b20 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
103b40 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
103b60 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
103b80 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
103ba0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
103bc0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
103be0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
103c00 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
103c20 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
103c40 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
103c60 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 | WHERE.v=old.a.AND.n=.sqlite_comp |
103c80 | 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | ileoption_get(1)=1;...UPDATE.cou |
103ca0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
103cc0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
103ce0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
103d00 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
103d20 | 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 46 8d 34 04 00 8b 11 43 52 | TE.FROM.t1.NOT.INDEXED.F.4....CR |
103d40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
103d60 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
103d80 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
103da0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
103dc0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
103de0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
103e00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
103e20 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
103e40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
103e60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
103e80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
103ea0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
103ec0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
103ee0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
103f00 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
103f20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
103f40 | 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 3d 31 3b 0a 20 20 | a.AND.n=.json_array(1,1,1)=1;... |
103f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
103f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
103fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
103fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
103fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
104000 | 0d 00 00 00 0b 02 0e 00 1d 48 1a 90 17 d8 15 20 12 68 0f b0 0c f8 0a 40 07 88 04 c6 02 0e 00 00 | .........H.......h.....@........ |
104020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1040a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1040c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1040e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1041a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1041c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1041e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
104200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8d 49 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | ...............4.I...mCREATE.TAB |
104220 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
104240 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
104260 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
104280 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
1042a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
1042c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
1042e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
104300 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
104320 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
104340 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
104360 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
104380 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
1043a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
1043c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
1043e0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
104400 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
104420 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e | =1;...UPDATE.counts.SET.n=n-.ran |
104440 | 64 6f 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | dom()=old.a;.END;.INSERT.INTO.t1 |
104460 | 28 61 29 20 56 41 4c 55 45 53 28 3f 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(?),(2),(1),(3),(1),(3 |
104480 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
1044a0 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 | .WHERE.a=4;.DELETE.FROM.t1.NOT.I |
1044c0 | 4e 44 45 58 45 44 85 3e 8d 48 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | NDEXED.>.H....CREATE.TABLE.t1(a. |
1044e0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
104500 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
104520 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
104540 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
104560 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
104580 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
1045a0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
1045c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1045e0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
104600 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
104620 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
104640 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
104660 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
104680 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
1046a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
1046c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
1046e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 3d 6f 6c | DATE.counts.SET.n=n-.random()=ol |
104700 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
104720 | 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | ES(2001-01-011),(2),(1),(3),(1), |
104740 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
104760 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 | =5.WHERE.a=4;.DELETE.FROM.t1.NOT |
104780 | 20 49 4e 44 45 58 45 44 85 34 8d 47 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .INDEXED.4.G...mCREATE.TABLE.t1( |
1047a0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
1047c0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
1047e0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
104800 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
104820 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
104840 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
104860 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
104880 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
1048a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1048c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
1048e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
104900 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
104920 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
104940 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
104960 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
104980 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
1049a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 3d | UPDATE.counts.SET.n=n-.random()= |
1049c0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
1049e0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 3f 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(?),(1),(3),(2), |
104a00 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
104a20 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
104a40 | 85 34 8d 46 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.F...mCREATE.TABLE.t1(a.INT);. |
104a60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
104a80 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
104aa0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
104ac0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
104ae0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
104b00 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
104b20 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
104b40 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
104b60 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
104b80 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
104ba0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
104bc0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
104be0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
104c00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
104c20 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
104c40 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
104c60 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 2f 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-.random()/old.a;.E |
104c80 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
104ca0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
104cc0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
104ce0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 45 04 00 8a 6d | LETE.FROM.t1.NOT.INDEXED.4.E...m |
104d00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
104d20 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
104d40 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
104d60 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
104d80 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
104da0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
104dc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
104de0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
104e00 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
104e20 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
104e40 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
104e60 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
104e80 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
104ea0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
104ec0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
104ee0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
104f00 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
104f20 | 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 2b 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-.random()+old.a;.END;.INSE |
104f40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
104f60 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
104f80 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
104fa0 | 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 44 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.NOT.INDEXED.4.D...mCREATE.T |
104fc0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
104fe0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
105000 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
105020 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
105040 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
105060 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
105080 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
1050a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
1050c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
1050e0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
105100 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
105120 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
105140 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
105160 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
105180 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
1051a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
1051c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 | n==1;...UPDATE.counts.SET.n=n-.r |
1051e0 | 61 6e 64 6f 6d 28 29 2a 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | andom()*old.a;.END;.INSERT.INTO. |
105200 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
105220 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
105240 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 | =5.WHERE.a=4;.DELETE.FROM.t1.NOT |
105260 | 20 49 4e 44 45 58 45 44 85 34 8d 43 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .INDEXED.4.C...mCREATE.TABLE.t1( |
105280 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
1052a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
1052c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
1052e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
105300 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
105320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
105340 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
105360 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
105380 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1053a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
1053c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
1053e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
105400 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
105420 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
105440 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
105460 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
105480 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 71 75 6f 74 65 28 31 29 3d | UPDATE.counts.SET.n=n-.quote(1)= |
1054a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
1054c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(7),(1),(3),(2), |
1054e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
105500 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
105520 | 85 34 8d 42 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.B...mCREATE.TABLE.t1(a.INT);. |
105540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
105560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
105580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
1055a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
1055c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
1055e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
105600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
105620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
105640 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
105660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
105680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
1056a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
1056c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
1056e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
105700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
105720 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
105740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 71 75 6f 74 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-.quote(1)=old.a;.E |
105760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
105780 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
1057a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
1057c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 41 04 00 8a 6d | LETE.FROM.t1.NOT.INDEXED.4.A...m |
1057e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
105800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
105820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
105840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
105860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
105880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
1058a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1058c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
1058e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
105900 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
105920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
105940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
105960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
105980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1059a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1059c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
1059e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
105a00 | 54 20 6e 3d 6e 2d 20 20 6a 73 6f 6e 28 31 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-..json(1)=old.a;.END;.INSE |
105a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
105a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
105a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
105a80 | 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 40 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.NOT.INDEXED.4.@...mCREATE.T |
105aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
105ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
105ae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
105b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
105b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
105b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
105b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
105b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
105ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
105bc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
105be0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
105c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
105c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
105c40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
105c60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
105c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
105ca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 20 | n==1;...UPDATE.counts.SET.n=n-.. |
105cc0 | 63 68 61 72 28 31 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | char(1)=old.a;.END;.INSERT.INTO. |
105ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
105d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
105d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 | =5.WHERE.a=4;.DELETE.FROM.t1.NOT |
105d40 | 20 49 4e 44 45 58 45 44 85 34 8d 3f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .INDEXED.4.?...mCREATE.TABLE.t1( |
105d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
105d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
105da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
105dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
105de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
105e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
105e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
105e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
105e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
105e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
105ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
105ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
105ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
105f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
105f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
105f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
105f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 | UPDATE.counts.SET.n=CURRENT_TIME |
105f80 | 53 54 41 4d 50 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | STAMP;.END;.INSERT.INTO.t1(a).VA |
105fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
105fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
105fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
106000 | 0d 00 00 00 0b 02 63 00 1d 3f 1a 7f 17 c7 15 0f 12 57 0f 9f 0c e7 0a 2f 07 b7 05 1b 02 63 00 00 | ......c..?.......W...../.....c.. |
106020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1060a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1060c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1060e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1061a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1061c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1061e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
106260 | 00 00 00 85 34 8d 54 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ....4.T...mCREATE.TABLE.t1(a.INT |
106280 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
1062a0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
1062c0 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
1062e0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
106300 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
106320 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
106340 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
106360 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
106380 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
1063a0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
1063c0 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
1063e0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
106400 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
106420 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
106440 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
106460 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
106480 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
1064a0 | 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 53 45 4c 45 43 54 28 | ;.END;.INSERT.INTO.t1(a).SELECT( |
1064c0 | 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 | 1),(2),(1),(3),(1),(3),(2),(4),( |
1064e0 | 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b | 7);.UPDATE.t1.SET.a=5.WHERE.a=4; |
106500 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8d 53 04 | .DELETE.FROM.t1.WHERE.a=7;....S. |
106520 | 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..5CREATE.TABLE.t1(a.INT);.CREAT |
106540 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
106560 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
106580 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
1065a0 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
1065c0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
1065e0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
106600 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
106620 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
106640 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
106660 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
106680 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
1066a0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
1066c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
1066e0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
106700 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
106720 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
106740 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 2b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a+.END;.I |
106760 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
106780 | 31 29 2c 28 33 29 3b 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 1),(3);(4),(7);.UPDATE.t1.SET.a= |
1067a0 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 84 74 8d 52 04 00 89 6d 43 | 5.WHERE.a=4;.DELETE.FRO.t.R...mC |
1067c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
1067e0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
106800 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
106820 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
106840 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
106860 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
106880 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
1068a0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
1068c0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
1068e0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
106900 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
106920 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
106940 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
106960 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
106980 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
1069a0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
1069c0 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
1069e0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 2b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a+.END;.INSER |
106a00 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
106a20 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 ac 85 34 8d 51 04 00 8a 6d 43 52 45 41 54 45 20 54 41 | 3),(1),(3),(2)..4.Q...mCREATE.TA |
106a40 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
106a60 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
106a80 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
106aa0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
106ac0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
106ae0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
106b00 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
106b20 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
106b40 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
106b60 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
106b80 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | =n-1.WHERE.v=old.a;...INSERT.INT |
106ba0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
106bc0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
106be0 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
106c00 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
106c20 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
106c40 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
106c60 | 48 45 52 45 20 76 3d 6f 20 67 6c 6f 62 28 31 2c 31 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | HERE.v=o.glob(1,1).INSERT.INTO.t |
106c80 | 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 | 1(a).VALUES(1),(2),(1),(3),(1),( |
106ca0 | 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 3),(2),(4),(7);.UPDATE.t1.SET.a= |
106cc0 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 | 5.WHERE.a=4;.DELETE.FROM.t1.WHER |
106ce0 | 45 20 61 3d 37 3b 0a 85 34 8d 50 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | E.a=7;..4.P...mCREATE.TABLE.t1(a |
106d00 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
106d20 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
106d40 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
106d60 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
106d80 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
106da0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
106dc0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
106de0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
106e00 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
106e20 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
106e40 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
106e60 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
106e80 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
106ea0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
106ec0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
106ee0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
106f00 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 2a 6f | PDATE.counts.SET.n=n-1.WHERE.v*o |
106f20 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
106f40 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
106f60 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
106f80 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 | a=4;.DELETE.FROM.t1.NOT.INDEXED. |
106fa0 | 34 8d 4f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | 4.O...mCREATE.TABLE.t1(a.INT);.C |
106fc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
106fe0 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
107000 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
107020 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
107040 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
107060 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
107080 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
1070a0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
1070c0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
1070e0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
107100 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
107120 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
107140 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
107160 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
107180 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
1071a0 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
1071c0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 25 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v%old.a;.EN |
1071e0 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
107200 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
107220 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
107240 | 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 4e 04 00 8a 6d 43 | ETE.FROM.t1.NOT.INDEXED.4.N...mC |
107260 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
107280 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
1072a0 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
1072c0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
1072e0 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
107300 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
107320 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
107340 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
107360 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
107380 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
1073a0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
1073c0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
1073e0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
107400 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
107420 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
107440 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
107460 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
107480 | 20 6e 3d 6e 2d 31 20 4f 52 20 74 72 75 65 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.OR.true=old.a;.END;.INSER |
1074a0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
1074c0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
1074e0 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
107500 | 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8d 4d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 | .t1.NOT.INDEXED.4.M...mCREATE.TA |
107520 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
107540 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
107560 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
107580 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
1075a0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
1075c0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
1075e0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
107600 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
107620 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
107640 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
107660 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | =n-1.WHERE.v=old.a;...INSERT.INT |
107680 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
1076a0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
1076c0 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
1076e0 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
107700 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
107720 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 65 | ==1;...UPDATE.counts.SET.n=n-.re |
107740 | 70 6c 61 63 65 28 31 2c 31 2c 31 29 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | place(1,1,1);.END;.INSERT.INTO.t |
107760 | 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 | 1(a).VALUES(1),(2),(1),(7),(1),( |
107780 | 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 3),(2),(4),(7);.UPDATE.t1.SET.a= |
1077a0 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 | 5.WHERE.a=4;.DELETE.FROM.t1.WHER |
1077c0 | 45 20 61 3d 37 3b 0a 85 34 8d 4c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | E.a=7;..4.L...mCREATE.TABLE.t1(a |
1077e0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
107800 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
107820 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
107840 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
107860 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
107880 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
1078a0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
1078c0 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
1078e0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
107900 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
107920 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
107940 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
107960 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
107980 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
1079a0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
1079c0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
1079e0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 65 70 6c 61 63 65 28 31 2c | PDATE.counts.SET.n=n-.replace(1, |
107a00 | 31 2c 31 29 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | 1,1);.END;.INSERT.INTO.t1(a).VAL |
107a20 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
107a40 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
107a60 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 | a=4;.DELETE.FROM.t1.WHERE.a.-1.. |
107a80 | 3c 8d 4b 04 00 8a 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | <.K...}CREATE.TABLE.t1(a.INT);.C |
107aa0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
107ac0 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
107ae0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
107b00 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
107b20 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
107b40 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
107b60 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
107b80 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
107ba0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
107bc0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
107be0 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
107c00 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
107c20 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
107c40 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
107c60 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
107c80 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
107ca0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 74 72 75 65 3d 6f | unts.SET.n=n-.random()AND.true=o |
107cc0 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
107ce0 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
107d00 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
107d20 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 | a=4;.DELETE.FROM.t1.NOT.INDEXED. |
107d40 | 3d 8d 4a 04 00 8a 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | =.J....CREATE.TABLE.t1(a.INT);.C |
107d60 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
107d80 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | MARY.KEY,.n.INT)/*WUT.ROWID*/;.C |
107da0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e | REATE.TRIGGER.r1.AFTER.INSERT.ON |
107dc0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .t1.BEGIN...INSERT.INTO.counts(v |
107de0 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
107e00 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
107e20 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 | D;.CREATE.TRIGGER.r2.AFTER.UPDAT |
107e40 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
107e60 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
107e80 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
107ea0 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
107ec0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
107ee0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
107f00 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
107f20 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
107f40 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
107f60 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 66 61 6c 73 65 3d | unts.SET.n=n-.random()AND.false= |
107f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
107fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
107fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
107fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
108000 | 0d 00 00 00 0b 02 31 00 1d 5c 1a a4 17 e2 15 20 12 61 0f 9c 0c fd 0a 59 07 b5 04 e9 02 31 00 00 | ......1..\.......a.....Y.....1.. |
108020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1080a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1080c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1080e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1081a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1081c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1081e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
108220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8d 5f 04 00 8a 6d 43 52 45 41 54 45 20 | ..................4._...mCREATE. |
108240 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
108260 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
108280 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
1082a0 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
1082c0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
1082e0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
108300 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
108320 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
108340 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
108360 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
108380 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
1083a0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
1083c0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
1083e0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
108400 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
108420 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
108440 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
108460 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
108480 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
1084a0 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
1084c0 | 61 3d 20 72 61 6e 64 6f 6d 28 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=.random()=4;.DELETE.FROM.t1.WH |
1084e0 | 45 52 45 20 61 3d 37 3b 0a 85 48 8d 5e 04 00 8b 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..H.^....CREATE.TABLE.t1 |
108500 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
108520 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
108540 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
108560 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
108580 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
1085a0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
1085c0 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
1085e0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
108600 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
108620 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
108640 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
108660 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
108680 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
1086a0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
1086c0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
1086e0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
108700 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
108720 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
108740 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
108760 | 2c 28 34 29 2c 28 32 30 30 31 2d 30 31 2d 30 31 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | ,(4),(2001-01-017);.UPDATE.t1.SE |
108780 | 54 20 61 3d 35 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 | T.a=520012001-01-01-01-01;.DELET |
1087a0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 20 8d 5d 04 00 8a 45 43 52 45 | E.FROM.t1.WHERE.a=7;....]...ECRE |
1087c0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
1087e0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
108800 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
108820 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
108840 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
108860 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
108880 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
1088a0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
1088c0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
1088e0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
108900 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
108920 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
108940 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
108960 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
108980 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
1089a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
1089c0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
1089e0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
108a00 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
108a20 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c | ,(1),(3),(2),(4),(.sqlite_compil |
108a40 | 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 20 67 6c 6f 62 20 27 5b 27 29 85 20 8d 5c 04 00 8a | eoption_used(1).glob.'[')...\... |
108a60 | 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | ECREATE.TABLE.t1(a.INT);.CREATE. |
108a80 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
108aa0 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
108ac0 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
108ae0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
108b00 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
108b20 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
108b40 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
108b60 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
108b80 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
108ba0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
108bc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
108be0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
108c00 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
108c20 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
108c40 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
108c60 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
108c80 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
108ca0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
108cc0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 20 73 71 6c 69 74 65 5f 63 6f | ,(3),(1),(3),(2),(4),(.sqlite_co |
108ce0 | 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 20 67 6c 6f 62 20 27 3f 27 29 85 1b 8d | mpileoption_used(1).glob.'?')... |
108d00 | 5b 04 00 8a 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | [...;CREATE.TABLE.t1(a.INT);.CRE |
108d20 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
108d40 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
108d60 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
108d80 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
108da0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
108dc0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
108de0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
108e00 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
108e20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
108e40 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
108e60 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
108e80 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
108ea0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
108ec0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
108ee0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
108f00 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
108f20 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
108f40 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
108f60 | 2c 28 31 29 2c 28 20 3f 31 33 29 3b 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | ,(1),(.?13);(4),(7);.UPDATE.t1.S |
108f80 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 85 41 8d 5a | ET.a=5.WHERE.a=4;.DELETE.FRO.A.Z |
108fa0 | 04 00 8b 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
108fc0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
108fe0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
109000 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
109020 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
109040 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
109060 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
109080 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
1090a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
1090c0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
1090e0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
109100 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
109120 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
109140 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
109160 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
109180 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
1091a0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
1091c0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
1091e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 20 73 71 | INSERT.INTO.t1(a).VALUES(1),(.sq |
109200 | 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 3b 45 58 50 4c | lite_compileoption_used(1));EXPL |
109220 | 41 49 4e 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b | AIN.UPDATE.t1.SET.a=5.WHERE.a=4; |
109240 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d | .DELETE.FROM.t1.WHERE.a=7;VACUUM |
109260 | 0a 85 3b 8d 59 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..;.Y...{CREATE.TABLE.t1(a.INT); |
109280 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
1092a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
1092c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
1092e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
109300 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
109320 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
109340 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
109360 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
109380 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
1093a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
1093c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
1093e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
109400 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
109420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
109440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
109460 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
109480 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
1094a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
1094c0 | 2c 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 | ,(.sqlite_compileoption_used(1)) |
1094e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
109500 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 41 4e 41 4c 59 5a 45 0a | ELETE.FROM.t1.WHERE.a=7;ANALYZE. |
109520 | 85 3e 8d 58 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .>.X....CREATE.TABLE.t1(a.INT);. |
109540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
109560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
109580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
1095a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
1095c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
1095e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
109600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
109620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
109640 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
109660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
109680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
1096a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
1096c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
1096e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
109700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
109720 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
109740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
109760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
109780 | 28 20 72 61 6e 64 6f 6d 28 29 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (.random()),(1),(3),(2),(4),(7); |
1097a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 | .UPDATE.t1.SET.a=520012001-01-01 |
1097c0 | 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | -01-01;.DELETE.FROM.t1.WHERE.a=7 |
1097e0 | 3b 0a 85 3e 8d 57 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..>.W....CREATE.TABLE.t1(a.INT) |
109800 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
109820 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
109840 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
109860 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
109880 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
1098a0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
1098c0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
1098e0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
109900 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
109920 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
109940 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
109960 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
109980 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
1099a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
1099c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
1099e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
109a00 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
109a20 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
109a40 | 20 67 6c 6f 62 28 31 2c 31 29 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | .glob(1,1)),(2),(1),(3),(1),(3), |
109a60 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
109a80 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
109aa0 | 3d 37 3b 0a 85 34 8d 56 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..4.V...mCREATE.TABLE.t1(a.IN |
109ac0 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
109ae0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
109b00 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
109b20 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
109b40 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
109b60 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
109b80 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
109ba0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
109bc0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
109be0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
109c00 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
109c20 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
109c40 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
109c60 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
109c80 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
109ca0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
109cc0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
109ce0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
109d00 | 28 31 20 2d 31 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1.-12),(1),(3),(1),(3),(2),(4), |
109d20 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
109d40 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 20 8d 55 | ;.DELETE.FROM.t1.WHERE.a=7;....U |
109d60 | 04 00 8a 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...ECREATE.TABLE.t1(a.INT);.CREA |
109d80 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
109da0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
109dc0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
109de0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
109e00 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
109e20 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
109e40 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
109e60 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
109e80 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
109ea0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
109ec0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
109ee0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
109f00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
109f20 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
109f40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
109f60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
109f80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
109fa0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 20 74 6f 74 61 6c 28 | INSERT.INTO.t1(a).VALUES(.total( |
109fc0 | 31 29 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | 1)),(3),(1),(3),(2),(4),(7);.UPD |
109fe0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 27 a7 61 27 29 | ATE.t1.SET.a=5.WHERE.a.glob'.a') |
10a000 | 0d 00 00 00 0b 02 9b 00 1d 48 1a ac 18 10 15 58 12 b2 10 0e 0d 63 0a b7 08 04 05 41 02 9b 00 00 | .........H.....X.....c.....A.... |
10a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10a280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 22 8d 6a 04 | ............................".j. |
10a2a0 | 00 8a 49 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..ICREATE.TABLE.t1(a.INT);.CREAT |
10a2c0 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
10a2e0 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
10a300 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
10a320 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
10a340 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
10a360 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
10a380 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
10a3a0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
10a3c0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
10a3e0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
10a400 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
10a420 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
10a440 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
10a460 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
10a480 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
10a4a0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
10a4c0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
10a4e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
10a500 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
10a520 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 20 27 32 30 30 27 | TE.t1.SET.a=5.WHERE.a.glob.'200' |
10a540 | 29 85 3f 8d 69 04 00 8b 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ).?.i....CREATE.TABLE.t1(a.INT); |
10a560 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
10a580 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
10a5a0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
10a5c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
10a5e0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
10a600 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
10a620 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
10a640 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
10a660 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
10a680 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
10a6a0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
10a6c0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
10a6e0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
10a700 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
10a720 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
10a740 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
10a760 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
10a780 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
10a7a0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
10a7c0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 | ;.UPDATE.t1.SET.a=5.WHERE.a.glob |
10a7e0 | 20 27 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 32 | .'.sqlite_compileoption_used(1)2 |
10a800 | 30 30 27 29 85 2f 8d 68 04 00 8a 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | 00')./.h...cCREATE.TABLE.t1(a.IN |
10a820 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
10a840 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
10a860 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
10a880 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
10a8a0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
10a8c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
10a8e0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
10a900 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
10a920 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
10a940 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
10a960 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
10a980 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
10a9a0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
10a9c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
10a9e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
10aa00 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
10aa20 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
10aa40 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
10aa60 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
10aa80 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 | (7);.UPDATE.t1.SET.a=5.WHERE.a.g |
10aaa0 | 6c 6f 62 20 27 20 6a 73 6f 6e 5f 74 79 70 65 28 31 2c 31 29 61 27 29 85 28 8d 67 04 00 8a 55 43 | lob.'.json_type(1,1)a').(.g...UC |
10aac0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
10aae0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
10ab00 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
10ab20 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
10ab40 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
10ab60 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
10ab80 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
10aba0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
10abc0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
10abe0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
10ac00 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
10ac20 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
10ac40 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
10ac60 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
10ac80 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
10aca0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
10acc0 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
10ace0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
10ad00 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
10ad20 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
10ad40 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 20 27 20 62 6d 32 35 28 31 29 | 1.SET.a=5.WHERE.a.glob.'.bm25(1) |
10ad60 | 61 27 29 85 27 8d 66 04 00 8a 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | a').'.f...SCREATE.TABLE.t1(a.INT |
10ad80 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
10ada0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
10adc0 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
10ade0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
10ae00 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
10ae20 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
10ae40 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
10ae60 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
10ae80 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
10aea0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
10aec0 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
10aee0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
10af00 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
10af20 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
10af40 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
10af60 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
10af80 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
10afa0 | 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 | ;.END;.INSERT.INTO.t1(a).VALUES( |
10afc0 | 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 | 1),(2),(1),(3),(1),(3),(2),(4),( |
10afe0 | 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c | 7);.UPDATE.t1.SET.a=5.WHERE.a.gl |
10b000 | 6f 62 20 27 20 61 62 73 28 31 29 61 27 29 85 20 8d 65 04 00 8a 45 43 52 45 41 54 45 20 54 41 42 | ob.'.abs(1)a')...e...ECREATE.TAB |
10b020 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
10b040 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
10b060 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
10b080 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
10b0a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
10b0c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
10b0e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
10b100 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
10b120 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
10b140 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
10b160 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
10b180 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
10b1a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
10b1c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
10b1e0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
10b200 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
10b220 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
10b240 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
10b260 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
10b280 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
10b2a0 | 20 57 48 45 52 45 20 61 20 4c 49 4b 45 27 a7 61 27 29 85 22 8d 64 04 00 8a 49 43 52 45 41 54 45 | .WHERE.a.LIKE'.a').".d...ICREATE |
10b2c0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
10b2e0 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
10b300 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
10b320 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
10b340 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
10b360 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
10b380 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
10b3a0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
10b3c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
10b3e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
10b400 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
10b420 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
10b440 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
10b460 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
10b480 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
10b4a0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
10b4c0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
10b4e0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
10b500 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
10b520 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
10b540 | 20 61 3d 35 20 57 48 45 52 45 20 61 20 4c 49 4b 45 20 27 61 20 2a 27 29 85 34 8d 63 04 00 8a 6d | .a=5.WHERE.a.LIKE.'a.*').4.c...m |
10b560 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
10b580 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
10b5a0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
10b5c0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
10b5e0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
10b600 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
10b620 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
10b640 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
10b660 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
10b680 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
10b6a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
10b6c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
10b6e0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
10b700 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
10b720 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
10b740 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
10b760 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
10b780 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
10b7a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
10b7c0 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
10b7e0 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 3f 31 24 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.?1$;.DELETE.FRO |
10b800 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8d 62 04 00 8a 35 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;....b...5CREATE.T |
10b820 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
10b840 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
10b860 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
10b880 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
10b8a0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
10b8c0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
10b8e0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
10b900 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
10b920 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
10b940 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
10b960 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
10b980 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
10b9a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
10b9c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
10b9e0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
10ba00 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
10ba20 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
10ba40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
10ba60 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
10ba80 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
10baa0 | 3d 35 20 41 4e 44 40 74 72 75 65 34 85 18 8d 61 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 | =5.AND@true4...a...5CREATE.TABLE |
10bac0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
10bae0 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
10bb00 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
10bb20 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
10bb40 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
10bb60 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
10bb80 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
10bba0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
10bbc0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
10bbe0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
10bc00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
10bc20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
10bc40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
10bc60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
10bc80 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
10bca0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
10bcc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
10bce0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
10bd00 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
10bd20 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 41 | (2),(4),(7);.UPDATE.t1.SET.a=5.A |
10bd40 | 4e 44 20 20 2d 31 65 34 85 34 8d 60 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ND..-1e4.4.`...mCREATE.TABLE.t1( |
10bd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
10bd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
10bda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
10bdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
10bde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
10be00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
10be20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
10be40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
10be60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
10be80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
10bea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
10bec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
10bee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
10bf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
10bf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
10bf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
10bf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
10bf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
10bfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
10bfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 32 30 30 31 2d 30 31 | (4),(7);.UPDATE.t1.SET.a=2001-01 |
10bfe0 | 2d 30 31 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | -014;.DELETE.FROM.t1.NOT.INDEXED |
10c000 | 0d 00 00 00 0b 02 be 00 1d 59 1a b3 18 07 15 5c 12 ae 10 0a 0d 52 0a aa 08 06 05 62 02 be 00 00 | .........Y.....\.....R.....b.... |
10c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10c2a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 20 | ................................ |
10c2c0 | 8d 75 04 00 8a 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .u...ECREATE.TABLE.t1(a.INT);.CR |
10c2e0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
10c300 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
10c320 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
10c340 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
10c360 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
10c380 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
10c3a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
10c3c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
10c3e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
10c400 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
10c420 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
10c440 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
10c460 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
10c480 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
10c4a0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
10c4c0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
10c4e0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
10c500 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
10c520 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
10c540 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 28 61 20 67 6c 6f 62 27 a7 61 | PDATE.t1.SET.a=5.WHERE(a.glob'.a |
10c560 | 27 29 85 20 8d 74 04 00 8a 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ')...t...ECREATE.TABLE.t1(a.INT) |
10c580 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
10c5a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
10c5c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
10c5e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
10c600 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
10c620 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
10c640 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
10c660 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
10c680 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
10c6a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
10c6c0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
10c6e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
10c700 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
10c720 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
10c740 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
10c760 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
10c780 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
10c7a0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
10c7c0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
10c7e0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 28 61 20 67 6c 6f | );.UPDATE.t1.SET.a=5.WHERE(a.glo |
10c800 | 62 20 27 5b 27 29 85 20 8d 73 04 00 8a 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | b.'[')...s...ECREATE.TABLE.t1(a. |
10c820 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
10c840 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
10c860 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
10c880 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
10c8a0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
10c8c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
10c8e0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
10c900 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
10c920 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
10c940 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
10c960 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
10c980 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
10c9a0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
10c9c0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
10c9e0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
10ca00 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
10ca20 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
10ca40 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
10ca60 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
10ca80 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 28 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE(a |
10caa0 | 20 67 6c 6f 62 20 27 3f 27 29 85 24 8d 72 04 00 8a 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .glob.'?').$.r...MCREATE.TABLE.t |
10cac0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
10cae0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
10cb00 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
10cb20 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
10cb40 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
10cb60 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
10cb80 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
10cba0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
10cbc0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
10cbe0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
10cc00 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
10cc20 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
10cc40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
10cc60 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
10cc80 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
10cca0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
10ccc0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
10cce0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
10cd00 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
10cd20 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
10cd40 | 52 45 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 85 34 8d 71 04 00 8a 6d 43 52 45 41 54 45 | RE.total_changes().4.q...mCREATE |
10cd60 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
10cd80 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
10cda0 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
10cdc0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
10cde0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
10ce00 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
10ce20 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
10ce40 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
10ce60 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
10ce80 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
10cea0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
10cec0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
10cee0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
10cf00 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
10cf20 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
10cf40 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
10cf60 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
10cf80 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
10cfa0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
10cfc0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
10cfe0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
10d000 | 48 45 52 45 20 61 2f 2d 31 0a 85 20 8d 70 04 00 8a 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a/-1....p...ECREATE.TABLE.t |
10d020 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
10d040 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
10d060 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
10d080 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
10d0a0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
10d0c0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
10d0e0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
10d100 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
10d120 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
10d140 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
10d160 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
10d180 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
10d1a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
10d1c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
10d1e0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
10d200 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
10d220 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
10d240 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
10d260 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
10d280 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
10d2a0 | 52 45 20 61 20 67 6c 6f 62 3a 31 3b 31 29 85 2a 8d 6f 04 00 8a 59 43 52 45 41 54 45 20 54 41 42 | RE.a.glob:1;1).*.o...YCREATE.TAB |
10d2c0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
10d2e0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
10d300 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
10d320 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
10d340 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
10d360 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
10d380 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
10d3a0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
10d3c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
10d3e0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
10d400 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
10d420 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
10d440 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
10d460 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
10d480 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
10d4a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
10d4c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
10d4e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
10d500 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
10d520 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
10d540 | 20 57 48 45 52 45 20 61 20 67 6c 6f 62 28 31 2c 31 29 45 53 43 41 50 45 20 46 52 4f 85 27 8d 6e | .WHERE.a.glob(1,1)ESCAPE.FRO.'.n |
10d560 | 04 00 8a 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...SCREATE.TABLE.t1(a.INT);.CREA |
10d580 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
10d5a0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
10d5c0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
10d5e0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
10d600 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
10d620 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
10d640 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
10d660 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
10d680 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
10d6a0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
10d6c0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
10d6e0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
10d700 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
10d720 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
10d740 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
10d760 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
10d780 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
10d7a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
10d7c0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
10d7e0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 20 27 61 27 4f | ATE.t1.SET.a=5.WHERE.a.glob.'a'O |
10d800 | 52 20 74 72 75 65 29 85 28 8d 6d 04 00 8a 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | R.true).(.m...UCREATE.TABLE.t1(a |
10d820 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
10d840 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
10d860 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
10d880 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
10d8a0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
10d8c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
10d8e0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
10d900 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
10d920 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
10d940 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
10d960 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
10d980 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
10d9a0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
10d9c0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
10d9e0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
10da00 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
10da20 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
10da40 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
10da60 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
10da80 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
10daa0 | 61 20 67 6c 6f 62 20 27 61 27 41 4e 44 20 74 72 75 65 29 85 22 8d 6c 04 00 8a 49 43 52 45 41 54 | a.glob.'a'AND.true).".l...ICREAT |
10dac0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
10dae0 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
10db00 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
10db20 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
10db40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
10db60 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
10db80 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
10dba0 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
10dbc0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
10dbe0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
10dc00 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
10dc20 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
10dc40 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
10dc60 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
10dc80 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
10dca0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
10dcc0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
10dce0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
10dd00 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
10dd20 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
10dd40 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 20 27 61 20 2a 27 29 85 23 8d 6b 04 00 8a | T.a=5.WHERE.a.glob.'a.*').#.k... |
10dd60 | 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | KCREATE.TABLE.t1(a.INT);.CREATE. |
10dd80 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
10dda0 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
10ddc0 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
10dde0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
10de00 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
10de20 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
10de40 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
10de60 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
10de80 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
10dea0 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
10dec0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
10dee0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
10df00 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
10df20 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
10df40 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
10df60 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
10df80 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
10dfa0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
10dfc0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
10dfe0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 20 67 6c 6f 62 20 27 41 44 44 61 27 29 | .t1.SET.a=5.WHERE.a.glob.'ADDa') |
10e000 | 0d 00 00 00 0b 02 a0 00 1d 5a 1a 98 17 cc 15 0a 12 52 0f c6 0d 3a 0a 97 07 fb 05 58 02 a0 00 00 | .........Z.......R...:.....X.... |
10e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
10e2a0 | 85 34 8e 00 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.....mCREATE.TABLE.t1(a.INT);. |
10e2c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
10e2e0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
10e300 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
10e320 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
10e340 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
10e360 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
10e380 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
10e3a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
10e3c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
10e3e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
10e400 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
10e420 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
10e440 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
10e460 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
10e480 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
10e4a0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
10e4c0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
10e4e0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
10e500 | 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(7),(1),(3),(2),(4),(7); |
10e520 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=1;.DE |
10e540 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 1f 8d 7f 04 00 8a 43 | LETE.FROM.t1.WHERE.a=7;........C |
10e560 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
10e580 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
10e5a0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
10e5c0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
10e5e0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
10e600 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
10e620 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
10e640 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
10e660 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
10e680 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
10e6a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
10e6c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
10e6e0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
10e700 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
10e720 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
10e740 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
10e760 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
10e780 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
10e7a0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
10e7c0 | 28 33 29 3b 41 4e 41 4c 59 5a 45 3b 52 45 49 4e 44 45 58 0a 55 50 44 41 54 45 20 74 31 20 53 45 | (3);ANALYZE;REINDEX.UPDATE.t1.SE |
10e7e0 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 85 18 8d 7e 04 | T.a=5.WHERE.a=4;.DELETE.FRO...~. |
10e800 | 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..5CREATE.TABLE.t1(a.INT);.CREAT |
10e820 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
10e840 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
10e860 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
10e880 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
10e8a0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
10e8c0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
10e8e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
10e900 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
10e920 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
10e940 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
10e960 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
10e980 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
10e9a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
10e9c0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
10e9e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
10ea00 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
10ea20 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
10ea40 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
10ea60 | 31 29 2c 28 33 29 3b 41 4e 41 4c 59 5a 45 3b 41 4e 41 4c 59 5a 45 20 74 31 20 53 45 54 20 61 3d | 1),(3);ANALYZE;ANALYZE.t1.SET.a= |
10ea80 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 85 1f 8d 7d 04 00 8a 43 43 | 5.WHERE.a=4;.DELETE.FRO...}...CC |
10eaa0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
10eac0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
10eae0 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
10eb00 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
10eb20 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
10eb40 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
10eb60 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
10eb80 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
10eba0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
10ebc0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
10ebe0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
10ec00 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
10ec20 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
10ec40 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
10ec60 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
10ec80 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
10eca0 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
10ecc0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
10ece0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
10ed00 | 33 29 3b 41 4e 41 4c 59 5a 45 3b 41 4e 41 4c 59 5a 45 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | 3);ANALYZE;ANALYZE.UPDATE.t1.SET |
10ed20 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 85 08 8d 7c 04 00 | .a=5.WHERE.a=4;.DELETE.FRO...|.. |
10ed40 | 8a 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
10ed60 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
10ed80 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
10eda0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
10edc0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
10ede0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
10ee00 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
10ee20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
10ee40 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
10ee60 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
10ee80 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
10eea0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
10eec0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
10eee0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
10ef00 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
10ef20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
10ef40 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
10ef60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
10ef80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
10efa0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 41 4e 41 4c 59 5a | ),(3),(1),(3),(2),(4),(7);ANALYZ |
10efc0 | 45 20 74 31 20 53 85 08 8d 7b 04 00 8a 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | E.t1.S...{....CREATE.TABLE.t1(a. |
10efe0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
10f000 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
10f020 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
10f040 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
10f060 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
10f080 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
10f0a0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
10f0c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
10f0e0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
10f100 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
10f120 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
10f140 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
10f160 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
10f180 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
10f1a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
10f1c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
10f1e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
10f200 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
10f220 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
10f240 | 29 2c 28 37 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 85 34 8d 7a 04 00 8a 6d 43 52 45 41 54 45 | ),(7);ANALYZE.TEMP.4.z...mCREATE |
10f260 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
10f280 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
10f2a0 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
10f2c0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
10f2e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
10f300 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
10f320 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
10f340 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
10f360 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
10f380 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
10f3a0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
10f3c0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
10f3e0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
10f400 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
10f420 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
10f440 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
10f460 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
10f480 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
10f4a0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
10f4c0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
10f4e0 | 20 61 3d 35 32 30 30 31 35 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=52001501-01;.DELETE.FROM.t1.W |
10f500 | 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8d 79 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..>.y....CREATE.TABLE.t |
10f520 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
10f540 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
10f560 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
10f580 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
10f5a0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
10f5c0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
10f5e0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
10f600 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
10f620 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
10f640 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
10f660 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
10f680 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
10f6a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
10f6c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
10f6e0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
10f700 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
10f720 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
10f740 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
10f760 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
10f780 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 | ),(4),(7);.UPDATE.t1.SET.a=52001 |
10f7a0 | 32 30 30 31 35 30 31 2d 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | 2001501-01-01-01;.DELETE.FROM.t1 |
10f7c0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 48 8d 78 04 00 8b 15 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..H.x....CREATE.TABLE |
10f7e0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
10f800 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
10f820 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
10f840 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
10f860 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
10f880 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
10f8a0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
10f8c0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
10f8e0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
10f900 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
10f920 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
10f940 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
10f960 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
10f980 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
10f9a0 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
10f9c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
10f9e0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
10fa00 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
10fa20 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
10fa40 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 | (2),(4),(7);.UPDATE.t1.SET.a=520 |
10fa60 | 30 31 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 3b 0a 44 45 | 0120012001-01-01-01-01-01-01;.DE |
10fa80 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8d 77 04 00 8b 01 | LETE.FROM.t1.WHERE.a=7;..>.w.... |
10faa0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
10fac0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
10fae0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
10fb00 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
10fb20 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
10fb40 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
10fb60 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
10fb80 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
10fba0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
10fbc0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
10fbe0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
10fc00 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
10fc20 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
10fc40 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
10fc60 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
10fc80 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
10fca0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
10fcc0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
10fce0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
10fd00 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
10fd20 | 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 45 2d 30 31 3b 0a | t1.SET.a=520012001-01-01-0E-01;. |
10fd40 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 22 8d 76 04 00 | DELETE.FROM.t1.WHERE.a=7;..".v.. |
10fd60 | 8a 49 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .ICREATE.TABLE.t1(a.INT);.CREATE |
10fd80 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
10fda0 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
10fdc0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
10fde0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
10fe00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
10fe20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
10fe40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
10fe60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
10fe80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
10fea0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
10fec0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
10fee0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
10ff00 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
10ff20 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
10ff40 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
10ff60 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
10ff80 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
10ffa0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
10ffc0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
10ffe0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 40 61 20 67 6c 6f 62 20 27 32 30 30 27 29 | E.t1.SET.a=5.WHERE@a.glob.'200') |
110000 | 0d 00 00 00 0c 00 51 00 1d 48 1a 86 17 ce 15 27 12 6f 0f b4 0c fc 0a 38 07 6f 04 b7 02 93 00 51 | ......Q..H.....'.o.....8.o.....Q |
110020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
110040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 3e 8e 0c 04 00 89 01 43 52 45 41 54 45 20 | ..................>......CREATE. |
110060 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
110080 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
1100a0 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
1100c0 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
1100e0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
110100 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
110120 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
110140 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
110160 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
110180 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
1101a0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
1101c0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
1101e0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
110200 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
110220 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
110240 | 54 45 20 46 52 4f 4d 20 63 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | TE.FROM.cs.WHERE.v=old.a.AND.n== |
110260 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
110280 | 52 45 20 76 3d 6f 6c 64 2e 61 20 0a 20 3b 45 4e 44 3b 0a 84 20 8e 0b 04 00 88 45 43 52 45 41 54 | RE.v=old.a...;END;........ECREAT |
1102a0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
1102c0 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
1102e0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
110300 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
110320 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
110340 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
110360 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
110380 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
1103a0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
1103c0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
1103e0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
110400 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
110420 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
110440 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
110460 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
110480 | 4c 45 54 45 20 46 52 4f 4d 20 63 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | LETE.FROM.cs.WHERE.v=old.a.AND.n |
1104a0 | 3d 3d 31 3b 0a 20 20 53 45 4c 45 43 54 20 63 73 20 53 45 54 20 6e 3d 85 34 8e 0a 04 00 8a 6d 43 | ==1;...SELECT.cs.SET.n=.4.....mC |
1104c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
1104e0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
110500 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
110520 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
110540 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
110560 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
110580 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
1105a0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
1105c0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
1105e0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
110600 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
110620 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
110640 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
110660 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
110680 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
1106a0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
1106c0 | 2e 61 20 7c 7c 20 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.||..n==1;...UPDATE.counts.SET |
1106e0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
110700 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
110720 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
110740 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
110760 | 20 74 31 20 57 48 45 52 45 20 61 20 2d 31 0a 85 45 8e 09 04 00 8b 0f 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a.-1..E......CREATE.TA |
110780 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
1107a0 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
1107c0 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
1107e0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
110800 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
110820 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
110840 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
110860 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
110880 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
1108a0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
1108c0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | =n-1.WHERE.v=old.a;...INSERT.INT |
1108e0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
110900 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
110920 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
110940 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
110960 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
110980 | 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | =CURRENT_TIMESTAMP=1;...UPDATE.c |
1109a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
1109c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
1109e0 | 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(7),(1),(3),(2),(4),(7); |
110a00 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
110a20 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 40 8e 08 04 00 8b 05 | LETE.FROM.t1.WHERE.a=7;..@...... |
110a40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
110a60 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
110a80 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
110aa0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
110ac0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
110ae0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
110b00 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
110b20 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
110b40 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
110b60 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
110b80 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
110ba0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
110bc0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
110be0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
110c00 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
110c20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
110c40 | 64 2e 61 20 41 4e 44 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 | d.a.AND.n=CURRENT_TIME=1;...UPDA |
110c60 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
110c80 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
110ca0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(7),(1),(3),(2),(4), |
110cc0 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
110ce0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 07 | ;.DELETE.FROM.t1.WHERE.a=7;..4.. |
110d00 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
110d20 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
110d40 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
110d60 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
110d80 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
110da0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
110dc0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
110de0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
110e00 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
110e20 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
110e40 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
110e60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
110e80 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
110ea0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
110ec0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
110ee0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
110f00 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
110f20 | 73 20 53 45 54 20 6e 3d 7e 2d 20 72 61 6e 64 6f 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=~-.random()=old.a;.END;. |
110f40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
110f60 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
110f80 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
110fa0 | 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 37 8e 06 04 00 8a 73 43 52 45 41 | .FROM.t1.NOT.INDEXED.7.....sCREA |
110fc0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
110fe0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
111000 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
111020 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
111040 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
111060 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
111080 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
1110a0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
1110c0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
1110e0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
111100 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
111120 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
111140 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
111160 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
111180 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
1111a0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
1111c0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
1111e0 | 6e 2d 4e 4f 54 20 72 61 6e 64 6f 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | n-NOT.random()=old.a;.END;.INSER |
111200 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
111220 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
111240 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
111260 | 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8e 05 04 00 8a 6d 43 52 45 41 54 45 20 54 41 | .t1.NOT.INDEXED.4.....mCREATE.TA |
111280 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
1112a0 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
1112c0 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
1112e0 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
111300 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
111320 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
111340 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
111360 | 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r2.AFTER.UPDATE.ON.t1.BEGIN... |
111380 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
1113a0 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
1113c0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | =n-1.WHERE.v=old.a;...INSERT.INT |
1113e0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
111400 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
111420 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
111440 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
111460 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
111480 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
1114a0 | 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | HERE.v>old.a;.END;.INSERT.INTO.t |
1114c0 | 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 | 1(a).VALUES(1),(2),(1),(3),(1),( |
1114e0 | 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 3),(2),(4),(7);.UPDATE.t1.SET.a= |
111500 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 | 5.WHERE.a=4;.DELETE.FROM.t1.NOT. |
111520 | 49 4e 44 45 58 45 44 85 23 8e 04 04 00 8a 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | INDEXED.#.....KCREATE.TABLE.t1(a |
111540 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
111560 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
111580 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
1115a0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
1115c0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
1115e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
111600 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
111620 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
111640 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
111660 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
111680 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
1116a0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
1116c0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
1116e0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
111700 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
111720 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
111740 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
111760 | 6c 64 2e 61 3b 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ld.a;.END;EXPLAIN.INSERT.INTO.t1 |
111780 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
1117a0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
1117c0 | 20 4d 41 54 43 48 20 61 3d 34 3b 0a 44 45 85 34 8e 03 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | .MATCH.a=4;.DE.4.....mCREATE.TAB |
1117e0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
111800 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
111820 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
111840 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
111860 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
111880 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
1118a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
1118c0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
1118e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
111900 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
111920 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
111940 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
111960 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
111980 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
1119a0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
1119c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1119e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
111a00 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
111a20 | 28 61 29 20 56 41 4c 55 45 53 28 39 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(9),(2),(1),(3),(1),(3 |
111a40 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
111a60 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 | .WHERE.a=4;.DELETE.FROM.t1.NOT.I |
111a80 | 4e 44 45 58 45 44 85 3e 8e 02 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | NDEXED.>......CREATE.TABLE.t1(a. |
111aa0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
111ac0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
111ae0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
111b00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
111b20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
111b40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
111b60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
111b80 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
111ba0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
111bc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
111be0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
111c00 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
111c20 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
111c40 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
111c60 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
111c80 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
111ca0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
111cc0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
111ce0 | 45 53 28 31 29 2c 28 32 32 30 30 31 2d 30 31 2d 30 31 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | ES(1),(22001-01-01),(1),(3),(1), |
111d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
111d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
111d40 | 52 45 20 61 3d 37 3b 0a 85 34 8e 01 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
111d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
111d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
111da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
111dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
111de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
111e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
111e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
111e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
111e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
111e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
111ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
111ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
111ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
111f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
111f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
111f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
111f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
111f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
111fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 3b 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1);(3),(1),(3),(2), |
111fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
111fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
112000 | 0d 00 00 00 0c 00 52 00 1d 48 1a 90 17 d8 15 3c 12 9c 0f e4 0d 26 0a 6e 07 b6 05 a6 03 0a 00 52 | ......R..H.....<.....&.n.......R |
112020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
112040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8e 18 04 00 8a 6d 43 52 45 41 54 45 | ...................4.....mCREATE |
112060 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
112080 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
1120a0 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
1120c0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
1120e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
112100 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
112120 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
112140 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
112160 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
112180 | 64 2e 61 20 41 4e 44 20 76 3d 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f | d.a.AND.v=.json_object(1,1,1,1)O |
1121a0 | 52 20 74 72 75 65 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | R.true=N;...UPDATE.counts.SET.n= |
1121c0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
1121e0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f | .counts(v,n).VALUES(new.a,1)...O |
112200 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
112220 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
112240 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
112260 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
112280 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
1122a0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
1122c0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
1122e0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
112300 | 52 45 20 61 3d 34 3b 0a 44 0a 85 18 8e 17 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | RE.a=4;.D........5CREATE.TABLE.t |
112320 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
112340 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
112360 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
112380 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
1123a0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
1123c0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
1123e0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
112400 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
112420 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
112440 | 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 3d 6e 20 43 4f | sqlite_compileoption_get(1)=n.CO |
112460 | 4c 4c 41 54 45 20 6e 6f 63 61 73 65 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | LLATE.nocasea;...INSERT.INTO.cou |
112480 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
1124a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
1124c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
1124e0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
112500 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
112520 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
112540 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
112560 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
112580 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
1125a0 | 52 45 20 61 3d 34 84 0c 8e 16 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | RE.a=4........CREATE.TABLE.t1(a. |
1125c0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
1125e0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
112600 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
112620 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
112640 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
112660 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
112680 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
1126a0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1126c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3f 31 | OM.counts.WHERE.v=old.a.AND.n=?1 |
1126e0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 20 22 61 22 2c | ;...UPDATE.counts.SET.n=n-.."a", |
112700 | 22 62 22 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | "b"=old.a;...INSERT.INTO.counts( |
112720 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
112740 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
112760 | 4e 44 3b 0a 43 52 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ND;.CRRT.INTO.t1(a).VALUES(1),(2 |
112780 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
1127a0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 85 34 8e 15 04 00 8a 6d 43 52 | PDATE.t1.SET.a=5.WHERE.4.....mCR |
1127c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
1127e0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
112800 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
112820 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
112840 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
112860 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
112880 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
1128a0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
1128c0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
1128e0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==N;...UPDATE.count |
112900 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
112920 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
112940 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
112960 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
112980 | 45 52 20 72 33 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.UPDATE.ON.t1.BEGIN.. |
1129a0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
1129c0 | 61 20 41 4e 44 20 6e 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==N;...UPDATE.counts.SET. |
1129e0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
112a00 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
112a20 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
112a40 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 41 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=A;.DELETE.FROM. |
112a60 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 14 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..4.....mCREATE.TAB |
112a80 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
112aa0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
112ac0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
112ae0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
112b00 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
112b20 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
112b40 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
112b60 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
112b80 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
112ba0 | 41 4e 44 20 6e 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==N;...UPDATE.counts.SET.n= |
112bc0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
112be0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
112c00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
112c20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
112c40 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
112c60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
112c80 | 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =N;...UPDATE.counts.SET.n=n-1.WH |
112ca0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
112cc0 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
112ce0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
112d00 | 20 57 48 45 52 45 20 61 3d 41 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=A;.DELETE.FROM.t1.WHERE |
112d20 | 20 61 3d 41 3b 0a 85 3a 8e 13 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=A;..:.....yCREATE.TABLE.t1(a. |
112d40 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
112d60 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
112d80 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
112da0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
112dc0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
112de0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
112e00 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
112e20 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
112e40 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 4e | OM.counts.WHERE.v=old.a.AND.n==N |
112e60 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
112e80 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
112ea0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
112ec0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
112ee0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
112f00 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
112f20 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 4e 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==N;...UP |
112f40 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
112f60 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
112f80 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
112fa0 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
112fc0 | 3d 41 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 | =A;.DELETE.FROM.t1.WHERE.a=7;VAC |
112fe0 | 55 55 4d 0a 85 34 8e 12 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | UUM..4.....mCREATE.TABLE.t1(a.IN |
113000 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
113020 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
113040 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
113060 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
113080 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
1130a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
1130c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
1130e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
113100 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 4e 3b 0a | .counts.WHERE.v=old.a.AND.n==N;. |
113120 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 6c 74 72 69 6d 28 31 2c 31 | ..UPDATE.counts.SET.n=.ltrim(1,1 |
113140 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
113160 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
113180 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
1131a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
1131c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1131e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 4e 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==N;...UPDA |
113200 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
113220 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
113240 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
113260 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 41 | (7);.UPDATE.t1.SET.a=5.WHERE.a=A |
113280 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 1c 8e 11 | ;.DELETE.FROM.t1.WHERE.a=7;..... |
1132a0 | 04 00 8a 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...=CREATE.TABLE.t1(a.INT);.CREA |
1132c0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
1132e0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
113300 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
113320 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
113340 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
113360 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
113380 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
1133a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
1133c0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
1133e0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c 64 2e 61 3b | .counts.SET.v=n-.upper(1)=old.a; |
113400 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
113420 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
113440 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
113460 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
113480 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
1134a0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
1134c0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
1134e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
113500 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
113520 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 3f 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 85 18 8e 10 | ATE.t1.SET.a=?.WHERE.a=4;.DE.... |
113540 | 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...5CREATE.TABLE.t1(a.INT);.CREA |
113560 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
113580 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
1135a0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
1135c0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
1135e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
113600 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
113620 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
113640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
113660 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
113680 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
1136a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 f3 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.count.(v,n).VALUE |
1136c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
1136e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
113700 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
113720 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
113740 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
113760 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
113780 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
1137a0 | 28 31 29 2c 28 33 29 3b 41 4e 41 4c 59 5a 45 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (1),(3);ANALYZE;.UPDATE.t1.SET.a |
1137c0 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 85 34 8e 0f 04 00 8a 6d | =5.WHERE.a=4;.DELETE.FRO.4.....m |
1137e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
113800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
113820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
113840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
113860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
113880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
1138a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1138c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
1138e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
113900 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
113920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
113940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
113960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
113980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1139a0 | 47 47 45 52 20 72 33 a0 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1139c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
1139e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
113a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
113a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
113a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
113a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
113a80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 0e 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.....mCREATE.T |
113aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
113ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
113ae0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
113b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
113b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
113b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
113b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
113b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
113ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
113bc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
113be0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
113c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
113c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
113c40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
113c60 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
113c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
113ca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
113cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
113ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 37 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(7),(1), |
113d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
113d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
113d40 | 52 45 20 61 3b 37 3b 0a 85 34 8e 0d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a;7;..4.....mCREATE.TABLE.t1( |
113d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
113d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
113da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
113dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
113de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
113e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
113e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
113e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
113e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
113e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
113ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
113ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
113ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
113f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r3.AFTER.UP |
113f20 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
113f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
113f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
113f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
113fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
113fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
113fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
114000 | 0d 00 00 00 0c 00 6c 00 1d 64 1a c8 18 21 15 85 12 c6 10 0e 0d 50 0a 98 08 88 05 d0 03 1e 00 6c | ......l..d...!.......P.........l |
114020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
114040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
114060 | 85 34 8e 24 04 00 8a 6d 43 52 45 41 85 2e 8e 24 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 | .4.$...mCREA...$...aCREATE.TABLE |
114080 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
1140a0 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
1140c0 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
1140e0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
114100 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
114120 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
114140 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
114160 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
114180 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 | ETE.FROM.counts.WHERE.v>.json(1) |
1141a0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 20 20 72 61 6e 64 6f | ;...UPDATE.counts.SET.n=...rando |
1141c0 | 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | m()=old.a;...INSERT.INTO.counts( |
1141e0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
114200 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
114220 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
114240 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
114260 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
114280 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
1142a0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
1142c0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
1142e0 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
114300 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e | =4;.DELETE.FROM.t1.WHERE.a=7;... |
114320 | 8e 23 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .#...aCREATE.TABLE.t1(a.INT);.CR |
114340 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
114360 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
114380 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
1143a0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
1143c0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
1143e0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
114400 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
114420 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
114440 | 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | s.WHERE.v>.json(1);...UPDATE.cou |
114460 | 6e 74 73 20 53 45 54 20 6e 3d 20 20 20 6d 61 78 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=...max(1,1)=old.a;...I |
114480 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
1144a0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
1144c0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1144e0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
114500 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
114520 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
114540 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
114560 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
114580 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
1145a0 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
1145c0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 22 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4."...mCREATE.T |
1145e0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
114600 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
114620 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
114640 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
114660 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
114680 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
1146a0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
1146c0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
1146e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
114700 | 61 20 7c 7c 20 20 6e 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.||..n==N;...UPDATE.counts.SET. |
114720 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
114740 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
114760 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
114780 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
1147a0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
1147c0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
1147e0 | 6e 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==N;...UPDATE.counts.SET.n=n-1. |
114800 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
114820 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
114840 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
114860 | 3d 35 20 57 48 45 52 45 20 61 3d 41 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=A;.DELETE.FROM.t1.WHE |
114880 | 52 45 20 61 3d 37 3b 0a 84 0c 8e 21 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;....!....CREATE.TABLE.t1( |
1148a0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
1148c0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
1148e0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
114900 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
114920 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
114940 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
114960 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
114980 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
1149a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 52 45 47 45 58 50 | FROM.counts.WHERE.v=old.a.REGEXP |
1149c0 | 23 31 3b 0a 20 20 55 50 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | #1;...UP...DELETE.FROM.counts.WH |
1149e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
114a00 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
114a20 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
114a40 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
114a60 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
114a80 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 20 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.....m |
114aa0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
114ac0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
114ae0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
114b00 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
114b20 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
114b40 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
114b60 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
114b80 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
114ba0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
114bc0 | 45 20 76 3d 6f 6c 64 2e 61 20 4f 52 20 66 61 6c 73 e5 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.OR.fals.;...UPDATE.cou |
114be0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
114c00 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
114c20 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
114c40 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
114c60 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
114c80 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
114ca0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
114cc0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
114ce0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
114d00 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
114d20 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
114d40 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8e 1f 04 00 8a 79 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..:.....yCREATE.T |
114d60 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
114d80 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
114da0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
114dc0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
114de0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
114e00 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
114e20 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
114e40 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
114e60 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
114e80 | 61 20 4f 52 20 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.OR.false;...UPDATE.counts.SET. |
114ea0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
114ec0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
114ee0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
114f00 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
114f20 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
114f40 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 4f 52 20 66 | E.FROM.counts.WHERE.v=old.a.OR.f |
114f60 | 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | alse;...UPDATE.counts.SET.n=n-1. |
114f80 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
114fa0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
114fc0 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
114fe0 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
115000 | 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8e 1e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | RE.a=7;VACUUM..4.....mCREATE.TAB |
115020 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
115040 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
115060 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
115080 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
1150a0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
1150c0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
1150e0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
115100 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
115120 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
115140 | 4f 52 20 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | OR.false;...UPDATE.counts.SET.n= |
115160 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
115180 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
1151a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
1151c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
1151e0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
115200 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 49 4e 20 66 61 6c | FROM.counts.WHERE.v=old.a.IN.fal |
115220 | 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | se;...UPDATE.counts.SET.n=n-1.WH |
115240 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
115260 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
115280 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
1152a0 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
1152c0 | 20 61 3d 37 3b 0a 85 3b 8e 1d 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..;.....{CREATE.TABLE.t1(a. |
1152e0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
115300 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
115320 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
115340 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
115360 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
115380 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
1153a0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
1153c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1153e0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 4f 52 20 66 61 6c 73 65 | OM.counts.WHERE.v=old.a.OR.false |
115400 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
115420 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
115440 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
115460 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
115480 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
1154a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
1154c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d | nts.WHERE.v=.nullif(1,1)OR.true= |
1154e0 | 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | N;...UPDATE.counts.SET.n=n-1.WHE |
115500 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
115520 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
115540 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
115560 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
115580 | 61 3d 37 3b 0a 85 18 8e 1c 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;........5CREATE.TABLE.t1(a.I |
1155a0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
1155c0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
1155e0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
115600 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
115620 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
115640 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
115660 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
115680 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
1156a0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 49 53 20 66 61 6c 73 65 3b | M.counts.WHERE.v=old.a.IS.false; |
1156c0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
1156e0 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
115700 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
115720 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
115740 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
115760 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
115780 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
1157a0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
1157c0 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
1157e0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
115800 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
115820 | 34 85 23 8e 1b 04 00 8a 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | 4.#.....KCREATE.TABLE.t1(a.INT); |
115840 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
115860 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
115880 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
1158a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
1158c0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
1158e0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
115900 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
115920 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
115940 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 49 53 20 4e 4f 54 20 49 4e 44 45 58 45 | unts.WHERE.v=old.a.IS.NOT.INDEXE |
115960 | 44 66 61 6c 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | Dfalse;...UPDATE.counts.SET.n=n- |
115980 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
1159a0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
1159c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
1159e0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
115a00 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
115a20 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
115a40 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
115a60 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
115a80 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
115aa0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
115ac0 | 48 45 52 45 20 61 3d 34 85 18 8e 1a 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | HERE.a=4.......5CREATE.TABLE.t1( |
115ae0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
115b00 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
115b20 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
115b40 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
115b60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
115b80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
115ba0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
115bc0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
115be0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 49 4e 20 66 61 6c | FROM.counts.WHERE.v=old.a.IN.fal |
115c00 | 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | se;...UPDATE.counts.SET.n=n-1.WH |
115c20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
115c40 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
115c60 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
115c80 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
115ca0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
115cc0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
115ce0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
115d00 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
115d20 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 29 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),()),(3),(1),(3),(2), |
115d40 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
115d60 | 20 61 3d 34 85 18 8e 19 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .a=4.......5CREATE.TABLE.t1(a.IN |
115d80 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
115da0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
115dc0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
115de0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
115e00 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
115e20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
115e40 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
115e60 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
115e80 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 49 4e 20 66 20 28 31 29 3b 0a | .counts.WHERE.v=old.a.IN.f.(1);. |
115ea0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
115ec0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
115ee0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
115f00 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
115f20 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
115f40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
115f60 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
115f80 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
115fa0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
115fc0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
115fe0 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
116000 | 0d 00 00 00 0b 02 54 00 1d 4e 1a 9c 17 ea 15 38 12 86 0f d4 0d 22 0a 70 07 be 05 09 02 54 00 00 | ......T..N.....8.....".p.....T.. |
116020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1160a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1160c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1160e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1161a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1161c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1161e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
116200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 37 8e 2f 04 00 8a 73 43 52 45 41 54 45 | ...................7./...sCREATE |
116220 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
116240 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 85 31 8e 2f 04 00 8a 67 43 52 45 41 | ounts(v.INTEGER.PRIM.1./...gCREA |
116260 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
116280 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
1162a0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
1162c0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
1162e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
116300 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
116320 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
116340 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
116360 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e | IN...DELETE.FROM.counts.WHERE.v> |
116380 | 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | .json(1);...UPDATE.counts.SET.n= |
1163a0 | 20 69 6e 73 74 72 28 31 2c 20 2d 31 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .instr(1,.-11)=old.a;...INSERT.I |
1163c0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
1163e0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
116400 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
116420 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
116440 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
116460 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
116480 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
1164a0 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
1164c0 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
1164e0 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
116500 | 45 52 45 20 61 3d 37 3b 0a 85 31 8e 2e 04 00 8a 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..1.....gCREATE.TABLE.t1 |
116520 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
116540 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
116560 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
116580 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
1165a0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
1165c0 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
1165e0 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
116600 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
116620 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 | .FROM.counts.WHERE.v>.json(1);.. |
116640 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 69 6e 73 74 72 28 20 2d 31 31 | .UPDATE.counts.SET.n=.instr(.-11 |
116660 | 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | ,1)=old.a;...INSERT.INTO.counts( |
116680 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
1166a0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
1166c0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
1166e0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
116700 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
116720 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
116740 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
116760 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
116780 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
1167a0 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e | =4;.DELETE.FROM.t1.WHERE.a=7;... |
1167c0 | 8e 2d 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .-...aCREATE.TABLE.t1(a.INT);.CR |
1167e0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
116800 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
116820 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
116840 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
116860 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
116880 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
1168a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
1168c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1168e0 | 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | s.WHERE.v>.json(1);...UPDATE.cou |
116900 | 6e 74 73 20 53 45 54 20 6e 3d 20 20 6c 65 6e 67 74 68 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=..length(1)=old.a;...I |
116920 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
116940 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
116960 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
116980 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1169a0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
1169c0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
1169e0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
116a00 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 34 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(4),(1), |
116a20 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
116a40 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
116a60 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 2c 04 00 8a 61 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;....,...aCREATE.T |
116a80 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
116aa0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
116ac0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
116ae0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
116b00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
116b20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
116b40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
116b60 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
116b80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f | .DELETE.FROM.counts.WHERE.v>.jso |
116ba0 | 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 20 6c 65 | n(1);...UPDATE.counts.SET.n=..le |
116bc0 | 6e 67 74 68 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | ngth(1)=old.a;...INSERT.INTO.cou |
116be0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
116c00 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
116c20 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
116c40 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
116c60 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
116c80 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
116ca0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
116cc0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
116ce0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
116d00 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
116d20 | 3b 0a 85 2e 8e 2b 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;....+...aCREATE.TABLE.t1(a.INT) |
116d40 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
116d60 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
116d80 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
116da0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
116dc0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
116de0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
116e00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
116e20 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
116e40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 | ounts.WHERE.v>.json(1);...UPDATE |
116e60 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 20 6c 65 6e 67 74 68 28 31 29 3d 6f 6c 64 2e 61 3b | .counts.SET.n=..length(1)=old.a; |
116e80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
116ea0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
116ec0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
116ee0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
116f00 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
116f20 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
116f40 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
116f60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
116f80 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
116fa0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=1;.DELETE |
116fc0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 2a 04 00 8a 61 43 52 45 41 | .FROM.t1.WHERE.a=7;....*...aCREA |
116fe0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
117000 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
117020 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
117040 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
117060 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
117080 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
1170a0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
1170c0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
1170e0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e | IN...DELETE.FROM.counts.WHERE.v> |
117100 | 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | .json(1);...UPDATE.counts.SET.n= |
117120 | 20 20 6c 65 6e 67 74 68 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | ..length(1)=old.a;...INSERT.INTO |
117140 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
117160 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
117180 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
1171a0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
1171c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1171e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
117200 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
117220 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
117240 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
117260 | 20 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a<4;.DELETE.FROM.t1.WHERE |
117280 | 20 61 3d 37 3b 0a 85 2e 8e 29 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;....)...aCREATE.TABLE.t1(a. |
1172a0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
1172c0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
1172e0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
117300 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
117320 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
117340 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
117360 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
117380 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1173a0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 | OM.counts.WHERE.v>.json(1);...UP |
1173c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 20 6c 65 6e 67 74 68 28 31 29 3d 6f 6c | DATE.counts.SET.n=..length(1)=ol |
1173e0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
117400 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
117420 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
117440 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
117460 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
117480 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
1174a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
1174c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
1174e0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
117500 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
117520 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 28 04 00 8a 61 | LETE.FROM.t1.WHERE.a=7;....(...a |
117540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
117560 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
117580 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
1175a0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
1175c0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
1175e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
117600 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
117620 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
117640 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
117660 | 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | E.v>.json(1);...UPDATE.counts.SE |
117680 | 54 20 6e 3d 20 20 67 6c 6f 62 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=..glob(1,1)=old.a;...INSERT. |
1176a0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
1176c0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
1176e0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
117700 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
117720 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
117740 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
117760 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
117780 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 34 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(4),(1),(3),(1 |
1177a0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
1177c0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
1177e0 | 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 27 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;....'...aCREATE.TABLE.t |
117800 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
117820 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
117840 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
117860 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
117880 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
1178a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
1178c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
1178e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
117900 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a | E.FROM.counts.WHERE.v>.json(1);. |
117920 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 20 67 6c 6f 62 28 31 2c 31 | ..UPDATE.counts.SET.n=..glob(1,1 |
117940 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
117960 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
117980 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
1179a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
1179c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1179e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
117a00 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
117a20 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
117a40 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
117a60 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 | (7);.UPDATE.t1.SET.a=5.WHERE.a=1 |
117a80 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 26 | ;.DELETE.FROM.t1.WHERE.a=7;....& |
117aa0 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
117ac0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
117ae0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
117b00 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
117b20 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
117b40 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
117b60 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
117b80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
117ba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
117bc0 | 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | WHERE.v>.json(1);...UPDATE.count |
117be0 | 73 20 53 45 54 20 6e 3d 20 20 67 6c 6f 62 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=..glob(1,1)=old.a;...INS |
117c00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
117c20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
117c40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
117c60 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
117c80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
117ca0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
117cc0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
117ce0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
117d00 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
117d20 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a<4;.DELETE.FROM. |
117d40 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 25 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....%...aCREATE.TAB |
117d60 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
117d80 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
117da0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
117dc0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
117de0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
117e00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
117e20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
117e40 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
117e60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 | ELETE.FROM.counts.WHERE.v>.json( |
117e80 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 20 67 6c 6f 62 | 1);...UPDATE.counts.SET.n=..glob |
117ea0 | 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | (1,1)=old.a;...INSERT.INTO.count |
117ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
117ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
117f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
117f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
117f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
117f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
117f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
117fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
117fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
117fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
118000 | 0d 00 00 00 0b 02 53 00 1d 4e 1a 9c 17 ea 15 38 12 86 0f d4 0d 22 0a 6c 07 b7 05 05 02 53 00 00 | ......S..N.....8.....".l.....S.. |
118020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1180a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1180c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1180e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1181a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1181c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1181e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
118200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8e 3a 04 00 8a 6d 43 52 45 41 54 45 20 | ..................4.:...mCREATE. |
118220 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
118240 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 85 2e 8e 3a 04 00 8a 61 43 52 45 41 54 | unts(v.INTEGER.PRIM...:...aCREAT |
118260 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
118280 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
1182a0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
1182c0 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
1182e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
118300 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
118320 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
118340 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
118360 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 | N...DELETE.FROM.counts.WHERE.v>. |
118380 | 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 | json(1);...UPDATE.counts.SET.n=. |
1183a0 | 72 6f 75 6e 64 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | round(1,1)=old.a;...INSERT.INTO. |
1183c0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
1183e0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
118400 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
118420 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
118440 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
118460 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
118480 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
1184a0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
1184c0 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
1184e0 | 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a<4;.DELETE.FROM.t1.WHERE. |
118500 | 61 3d 37 3b 0a 85 2e 8e 39 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;....9...aCREATE.TABLE.t1(a.I |
118520 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
118540 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
118560 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
118580 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
1185a0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
1185c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
1185e0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
118600 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
118620 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 | M.counts.WHERE.v>.json(1);...UPD |
118640 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 30 29 3d 6f 6c 64 | ATE.counts.SET.n=.round(1,0)=old |
118660 | 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | .a;...INSERT.INTO.counts(v,n).VA |
118680 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
1186a0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
1186c0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
1186e0 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
118700 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
118720 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
118740 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
118760 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
118780 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c | UPDATE.t1.SET.a=5.WHERE.a=4;.DEL |
1187a0 | 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 31 8e 38 04 00 8a 67 43 | ETE.FROM.t1.WHERE.a=7;..1.8...gC |
1187c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
1187e0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
118800 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
118820 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
118840 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
118860 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
118880 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
1188a0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
1188c0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
1188e0 | 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .v>.json(1);...UPDATE.counts.SET |
118900 | 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 20 2d 31 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | .n=.round(1,.-11)=old.a;...INSER |
118920 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
118940 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
118960 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
118980 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
1189a0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
1189c0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
1189e0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
118a00 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
118a20 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
118a40 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
118a60 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 32 8e 37 04 00 8a 69 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..2.7...iCREATE.TABLE |
118a80 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
118aa0 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.INTEGER.PRIMARY.KEY,.n.INT)/*W |
118ac0 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
118ae0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
118b00 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
118b20 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
118b40 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
118b60 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
118b80 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 | ETE.FROM.counts.WHERE.v>.json(1) |
118ba0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 | ;...UPDATE.counts.SET.n=.round(1 |
118bc0 | 20 7c 7c 20 2e 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | .||..1)=old.a;...INSERT.INTO.cou |
118be0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
118c00 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
118c20 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
118c40 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
118c60 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
118c80 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
118ca0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
118cc0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
118ce0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
118d00 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
118d20 | 3b 0a 85 2e 8e 36 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;....6...aCREATE.TABLE.t1(a.INT) |
118d40 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
118d60 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
118d80 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
118da0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
118dc0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
118de0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
118e00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
118e20 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
118e40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 | ounts.WHERE.v>.json(1);...UPDATE |
118e60 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 20 2d 31 29 3d 6f 6c 64 2e 61 3b | .counts.SET.n=.round(.-1)=old.a; |
118e80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
118ea0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
118ec0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
118ee0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
118f00 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
118f20 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
118f40 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
118f60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
118f80 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
118fa0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
118fc0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 35 04 00 8a 61 43 52 45 41 | .FROM.t1.WHERE.a=7;....5...aCREA |
118fe0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
119000 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
119020 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
119040 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
119060 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
119080 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
1190a0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
1190c0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
1190e0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e | IN...DELETE.FROM.counts.WHERE.v> |
119100 | 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | .json(1);...UPDATE.counts.SET.n= |
119120 | 20 69 6e 73 74 72 28 4e 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .instr(N,1)=old.a;...INSERT.INTO |
119140 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
119160 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
119180 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
1191a0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
1191c0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1191e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
119200 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
119220 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
119240 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
119260 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
119280 | 20 61 3d 37 3b 0a 85 2e 8e 34 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;....4...aCREATE.TABLE.t1(a. |
1192a0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
1192c0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
1192e0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
119300 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
119320 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
119340 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
119360 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
119380 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1193a0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 | OM.counts.WHERE.v>.json(1);...UP |
1193c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 69 6e 73 74 72 28 39 2c 31 29 3d 6f 6c | DATE.counts.SET.n=.instr(9,1)=ol |
1193e0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
119400 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
119420 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
119440 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
119460 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
119480 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
1194a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
1194c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
1194e0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
119500 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
119520 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 33 04 00 8a 61 | LETE.FROM.t1.WHERE.a=7;....3...a |
119540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
119560 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
119580 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
1195a0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
1195c0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
1195e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
119600 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
119620 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
119640 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
119660 | 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | E.v>.json(1);...UPDATE.counts.SE |
119680 | 54 20 6e 3d 20 69 6e 73 74 72 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=.instr(1,1)=old.a;...INSERT. |
1196a0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
1196c0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
1196e0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
119700 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
119720 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
119740 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
119760 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
119780 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 34 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(4),(1),(3),(1 |
1197a0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
1197c0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
1197e0 | 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 32 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;....2...aCREATE.TABLE.t |
119800 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
119820 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
119840 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
119860 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
119880 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
1198a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
1198c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
1198e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
119900 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a | E.FROM.counts.WHERE.v>.json(1);. |
119920 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 69 6e 73 74 72 28 31 2c 31 | ..UPDATE.counts.SET.n=.instr(1,1 |
119940 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
119960 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
119980 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
1199a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
1199c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1199e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
119a00 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
119a20 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
119a40 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
119a60 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 | (7);.UPDATE.t1.SET.a=5.WHERE.a=1 |
119a80 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 31 | ;.DELETE.FROM.t1.WHERE.a=7;....1 |
119aa0 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
119ac0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
119ae0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
119b00 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
119b20 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
119b40 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
119b60 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
119b80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
119ba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
119bc0 | 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | WHERE.v>.json(1);...UPDATE.count |
119be0 | 73 20 53 45 54 20 6e 3d 20 69 6e 73 74 72 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=.instr(1,1)=old.a;...INS |
119c00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
119c20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
119c40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
119c60 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
119c80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
119ca0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
119cc0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
119ce0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
119d00 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
119d20 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a<4;.DELETE.FROM. |
119d40 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 30 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....0...aCREATE.TAB |
119d60 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
119d80 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
119da0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
119dc0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
119de0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
119e00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
119e20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
119e40 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
119e60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 | ELETE.FROM.counts.WHERE.v>.json( |
119e80 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 69 6e 73 74 72 | 1);...UPDATE.counts.SET.n=.instr |
119ea0 | 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | (1,1)=old.a;...INSERT.INTO.count |
119ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
119ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
119f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
119f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
119f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
119f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
119f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
119fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
119fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
119fe0 | 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a+4;.DELETE.FROM.t1.WHERE.a=7;. |
11a000 | 0d 00 00 00 0b 02 50 00 1d 4e 1a 9c 17 e0 15 2e 12 7c 0f ca 0d 18 0a 66 07 b4 05 02 02 50 00 00 | ......P..N.......|.....f.....P.. |
11a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11a200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8e 45 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | ...............4.E...mCREATE.TAB |
11a220 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
11a240 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 85 2e 8e 45 04 00 8a 61 43 52 45 41 54 45 20 54 | s(v.INTEGER.PRIM...E...aCREATE.T |
11a260 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
11a280 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
11a2a0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
11a2c0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
11a2e0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
11a300 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
11a320 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
11a340 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
11a360 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f | .DELETE.FROM.counts.WHERE.v>.jso |
11a380 | 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 | n(1);...UPDATE.counts.SET.n=.rou |
11a3a0 | 6e 64 28 31 2e 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | nd(1.1)=old.a;...INSERT.INTO.cou |
11a3c0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
11a3e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
11a400 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
11a420 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
11a440 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
11a460 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
11a480 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
11a4a0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
11a4c0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
11a4e0 | 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=1;.DELETE.FROM.t1.WHERE.a=7 |
11a500 | 3b 0a 85 2e 8e 44 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;....D...aCREATE.TABLE.t1(a.INT) |
11a520 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
11a540 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
11a560 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
11a580 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
11a5a0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11a5c0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11a5e0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
11a600 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
11a620 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 | ounts.WHERE.v>.json(1);...UPDATE |
11a640 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2e 31 29 3d 6f 6c 64 2e 61 3b | .counts.SET.n=.round(1.1)=old.a; |
11a660 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
11a680 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
11a6a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
11a6c0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
11a6e0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
11a700 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
11a720 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
11a740 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
11a760 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
11a780 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
11a7a0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 43 04 00 8a 61 43 52 45 41 | .FROM.t1.WHERE.a=7;....C...aCREA |
11a7c0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
11a7e0 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
11a800 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
11a820 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
11a840 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
11a860 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
11a880 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
11a8a0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
11a8c0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e | IN...DELETE.FROM.counts.WHERE.v> |
11a8e0 | 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | .json(1);...UPDATE.counts.SET.n= |
11a900 | 20 72 6f 75 6e 64 28 31 2c 39 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | .round(1,9)=old.a;...INSERT.INTO |
11a920 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
11a940 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
11a960 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
11a980 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
11a9a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
11a9c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
11a9e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
11aa00 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
11aa20 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
11aa40 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
11aa60 | 20 61 3d 37 3b 0a 85 2e 8e 42 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;....B...aCREATE.TABLE.t1(a. |
11aa80 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
11aaa0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
11aac0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
11aae0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
11ab00 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
11ab20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
11ab40 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
11ab60 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
11ab80 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 | OM.counts.WHERE.v>.json(1);...UP |
11aba0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 38 29 3d 6f 6c | DATE.counts.SET.n=.round(1,8)=ol |
11abc0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
11abe0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
11ac00 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
11ac20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
11ac40 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
11ac60 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
11ac80 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
11aca0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
11acc0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
11ace0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
11ad00 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 41 04 00 8a 61 | LETE.FROM.t1.WHERE.a=7;....A...a |
11ad20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
11ad40 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
11ad60 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
11ad80 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
11ada0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
11adc0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
11ade0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
11ae00 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
11ae20 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
11ae40 | 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | E.v>.json(1);...UPDATE.counts.SE |
11ae60 | 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 37 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=.round(1,7)=old.a;...INSERT. |
11ae80 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
11aea0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
11aec0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
11aee0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
11af00 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
11af20 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
11af40 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
11af60 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
11af80 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
11afa0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
11afc0 | 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 40 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;....@...aCREATE.TABLE.t |
11afe0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
11b000 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
11b020 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
11b040 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
11b060 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
11b080 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
11b0a0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
11b0c0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
11b0e0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a | E.FROM.counts.WHERE.v>.json(1);. |
11b100 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 34 | ..UPDATE.counts.SET.n=.round(1,4 |
11b120 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
11b140 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
11b160 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
11b180 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
11b1a0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
11b1c0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
11b1e0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
11b200 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
11b220 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
11b240 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
11b260 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 3f | ;.DELETE.FROM.t1.WHERE.a=7;....? |
11b280 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
11b2a0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
11b2c0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
11b2e0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
11b300 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
11b320 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
11b340 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
11b360 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
11b380 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
11b3a0 | 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | WHERE.v>.json(1);...UPDATE.count |
11b3c0 | 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 33 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=.round(1,3)=old.a;...INS |
11b3e0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
11b400 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
11b420 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
11b440 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
11b460 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
11b480 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
11b4a0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
11b4c0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
11b4e0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
11b500 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
11b520 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 3e 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....>...aCREATE.TAB |
11b540 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
11b560 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
11b580 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
11b5a0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
11b5c0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
11b5e0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
11b600 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
11b620 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
11b640 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 | ELETE.FROM.counts.WHERE.v>.json( |
11b660 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 | 1);...UPDATE.counts.SET.n=.round |
11b680 | 28 31 2c 33 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | (1,3)=old.a;...INSERT.INTO.count |
11b6a0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11b6c0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11b6e0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
11b700 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
11b720 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
11b740 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
11b760 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
11b780 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
11b7a0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
11b7c0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
11b7e0 | 85 38 8e 3d 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .8.=...uCREATE.TABLE.t1(a.INT);. |
11b800 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
11b820 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
11b840 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
11b860 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
11b880 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
11b8a0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
11b8c0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
11b8e0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
11b900 | 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 | nts.WHERE.v>.json(1);...UPDATE.c |
11b920 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 | ounts.SET.n=.round(1,2001-01-011 |
11b940 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
11b960 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
11b980 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
11b9a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
11b9c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
11b9e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
11ba00 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
11ba20 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
11ba40 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
11ba60 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
11ba80 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 3c | ;.DELETE.FROM.t1.WHERE.a=7;....< |
11baa0 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
11bac0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
11bae0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
11bb00 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
11bb20 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
11bb40 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
11bb60 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
11bb80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
11bba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
11bbc0 | 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | WHERE.v>.json(1);...UPDATE.count |
11bbe0 | 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=.round(1,1)=old.a;...INS |
11bc00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
11bc20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
11bc40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
11bc60 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
11bc80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
11bca0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
11bcc0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
11bce0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 34 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(4),(1),(3 |
11bd00 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
11bd20 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
11bd40 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 3b 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....;...aCREATE.TAB |
11bd60 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
11bd80 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
11bda0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
11bdc0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
11bde0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
11be00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
11be20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
11be40 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
11be60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 | ELETE.FROM.counts.WHERE.v>.json( |
11be80 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 | 1);...UPDATE.counts.SET.n=.round |
11bea0 | 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | (1,1)=old.a;...INSERT.INTO.count |
11bec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11bee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11bf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
11bf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
11bf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
11bf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
11bf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
11bfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
11bfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
11bfe0 | 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=1;.DELETE.FROM.t1.WHERE.a=7;. |
11c000 | 0d 15 20 00 0b 02 1a 00 1d 4e 1a 9c 17 ea 15 38 12 68 0f b0 0c f8 0a 36 07 7e 04 c6 02 1a 00 00 | .........N.....8.h.....6.~...... |
11c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11c200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 28 8e 50 04 00 | ...........................(.P.. |
11c220 | 8a 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .UCREATE.TABLE.t1(a.INT);.CREATE |
11c240 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
11c260 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
11c280 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
11c2a0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
11c2c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
11c2e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
11c300 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
11c320 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
11c340 | 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v>old.a.AND.n==1;...UPDATE.c |
11c360 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v>old.a;.. |
11c380 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
11c3a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
11c3c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
11c3e0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
11c400 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
11c420 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
11c440 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
11c460 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
11c480 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
11c4a0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 41 4e 41 4c 59 5a 45 20 54 | E.t1.SET.a=5.WHERE.a=4;ANALYZE.T |
11c4c0 | 45 4d 50 20 74 31 85 34 8e 4f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | EMP.t1.4.O...mCREATE.TABLE.t1(a. |
11c4e0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
11c500 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
11c520 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
11c540 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
11c560 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
11c580 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
11c5a0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
11c5c0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
11c5e0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v>old.a.AND.n==1 |
11c600 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
11c620 | 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v>old.a;...INSERT.INTO.counts( |
11c640 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
11c660 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
11c680 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
11c6a0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
11c6c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
11c6e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
11c700 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
11c720 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
11c740 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 75 6e 69 63 6f 64 65 28 | ),(7);.UPDATE.t1.SET.a=.unicode( |
11c760 | 31 29 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 | 1);.DELETE.FROM.t1.WHERE.a=7;..4 |
11c780 | 8e 4e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .N...mCREATE.TABLE.t1(a.INT);.CR |
11c7a0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
11c7c0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
11c7e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
11c800 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
11c820 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
11c840 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
11c860 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
11c880 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
11c8a0 | 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v>old.a.AND.n==1;...UPDA |
11c8c0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v>old. |
11c8e0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
11c900 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
11c920 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
11c940 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
11c960 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
11c980 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
11c9a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
11c9c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
11c9e0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 34 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(4);.U |
11ca00 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
11ca20 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8e 4d 04 00 8b 01 43 52 | TE.FROM.t1.WHERE.a=7;..>.M....CR |
11ca40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
11ca60 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
11ca80 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
11caa0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
11cac0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
11cae0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
11cb00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
11cb20 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
11cb40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
11cb60 | 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v>old.a.AND.n==1;...UPDATE.count |
11cb80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
11cba0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
11cbc0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
11cbe0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
11cc00 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
11cc20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
11cc40 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
11cc60 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
11cc80 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 29 2c | .INTO.t1(a).VALUES(2001-01-011), |
11cca0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
11ccc0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
11cce0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 4c 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.L...m |
11cd00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
11cd20 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
11cd40 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
11cd60 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
11cd80 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
11cda0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
11cdc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
11cde0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
11ce00 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
11ce20 | 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v>old.a.AND.n==1;...UPDATE.cou |
11ce40 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
11ce60 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
11ce80 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
11cea0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
11cec0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
11cee0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
11cf00 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
11cf20 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
11cf40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
11cf60 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
11cf80 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=1;.DELETE.FRO |
11cfa0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8e 4b 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.K...mCREATE.T |
11cfc0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
11cfe0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
11d000 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
11d020 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
11d040 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
11d060 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
11d080 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
11d0a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
11d0c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v>old. |
11d0e0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
11d100 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
11d120 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
11d140 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
11d160 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
11d180 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
11d1a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
11d1c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
11d1e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
11d200 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
11d220 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
11d240 | 3d 20 69 6e 73 74 72 28 31 2c 31 29 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =.instr(1,1);.DELETE.FROM.t1.WHE |
11d260 | 52 45 20 61 3d 37 3b 0a 85 34 8e 4a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.J...mCREATE.TABLE.t1( |
11d280 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
11d2a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
11d2c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
11d2e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
11d300 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
11d320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
11d340 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
11d360 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
11d380 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v>old.a.AND.n= |
11d3a0 | 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a | .json_object(1,1,1,1)OR.true=N;. |
11d3c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
11d3e0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
11d400 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | n).VALUES(new.a,1)...ON.CONFLICT |
11d420 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
11d440 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
11d460 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
11d480 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
11d4a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
11d4c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
11d4e0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
11d500 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a | .UPDATE.t1.SET.a=5.WHERE.a=4;.D. |
11d520 | 00 00 00 18 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 85 2e 8e 49 04 00 8a 61 | .......mCREATE.TABLE.t1(...I...a |
11d540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
11d560 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
11d580 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
11d5a0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
11d5c0 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
11d5e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
11d600 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
11d620 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
11d640 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
11d660 | 45 20 76 3e 3e 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | E.v>>json(1);...UPDATE.counts.SE |
11d680 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
11d6a0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
11d6c0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
11d6e0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
11d700 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
11d720 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
11d740 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
11d760 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
11d780 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
11d7a0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
11d7c0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
11d7e0 | 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 48 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;....H...aCREATE.TABLE.t |
11d800 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
11d820 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
11d840 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
11d860 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
11d880 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
11d8a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
11d8c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
11d8e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
11d900 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a | E.FROM.counts.WHERE.v>.json(1);. |
11d920 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 20 20 67 6c 6f 62 28 31 2c 31 | ..UPDATE.counts.SET.v=..glob(1,1 |
11d940 | 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | )=old.a;...INSERT.INTO.counts(v, |
11d960 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
11d980 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
11d9a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
11d9c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
11d9e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
11da00 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
11da20 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
11da40 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
11da60 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
11da80 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 47 | ;.DELETE.FROM.t1.WHERE.a=7;....G |
11daa0 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
11dac0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
11dae0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
11db00 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
11db20 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
11db40 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
11db60 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
11db80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
11dba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
11dbc0 | 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | WHERE.v>.json(1);...UPDATE.count |
11dbe0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 20 61 62 73 28 31 29 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE..abs(1);...INS |
11dc00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
11dc20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
11dc40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
11dc60 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
11dc80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
11dca0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
11dcc0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
11dce0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
11dd00 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
11dd20 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
11dd40 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8e 46 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....F...aCREATE.TAB |
11dd60 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
11dd80 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
11dda0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
11ddc0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
11dde0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
11de00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
11de20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
11de40 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
11de60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 20 6a 73 6f 6e 28 | ELETE.FROM.counts.WHERE.v>.json( |
11de80 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 72 6f 75 6e 64 | 1);...UPDATE.counts.SET.n=.round |
11dea0 | 28 31 2e 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | (1.1)=old.a;...INSERT.INTO.count |
11dec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11dee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11df00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
11df20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
11df40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
11df60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
11df80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
11dfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
11dfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
11dfe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
11e000 | 0d 00 00 00 0c 01 5c 00 1d 48 1a 9c 17 e4 15 45 12 80 0f c1 0d 02 0a f2 08 36 05 7a 03 6a 01 5c | ......\..H.....E.........6.z.j.\ |
11e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
11e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 0a 8e 5c | ...............................\ |
11e160 | 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
11e180 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
11e1a0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
11e1c0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
11e1e0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
11e200 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 2f 2a 20 2a 2f 20 20 a0 20 20 45 52 54 20 | .VALUES(new.a,1)../*.*/.....ERT. |
11e220 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
11e240 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
11e260 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
11e280 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
11e2a0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
11e2c0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
11e2e0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
11e300 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
11e320 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
11e340 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
11e360 | 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8e 5b 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;....[....CREATE.TABLE.t |
11e380 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
11e3a0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
11e3c0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
11e3e0 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
11e400 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
11e420 | 20 20 a0 20 20 4f 4e 20 43 4f 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .....ON.CONSERT.INTO.counts(v,n) |
11e440 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
11e460 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
11e480 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
11e4a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
11e4c0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
11e4e0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
11e500 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
11e520 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
11e540 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
11e560 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8e 5a 04 00 | DELETE.FROM.t1.WHERE.a=7;..8.Z.. |
11e580 | 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .uCREATE.TABLE.t1(a.INT);.CREATE |
11e5a0 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
11e5c0 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
11e5e0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
11e600 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
11e620 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
11e640 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 7e 4e 55 4c 4c 2b 31 3b 0a 45 4e 44 | (v).DO.UPDATE.SET.n=~NULL+1;.END |
11e660 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
11e680 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
11e6a0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
11e6c0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
11e6e0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
11e700 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
11e720 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
11e740 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
11e760 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
11e780 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
11e7a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
11e7c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
11e7e0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
11e800 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
11e820 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8e 59 04 00 8a 75 43 52 | TE.FROM.t1.WHERE.a=7;..8.Y...uCR |
11e840 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
11e860 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
11e880 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
11e8a0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
11e8c0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
11e8e0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
11e900 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 7e 20 22 61 22 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | DO.UPDATE.SET.n=~."a"+1;.END;.CR |
11e920 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
11e940 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
11e960 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
11e980 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
11e9a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
11e9c0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
11e9e0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
11ea00 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
11ea20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
11ea40 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
11ea60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
11ea80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
11eaa0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
11eac0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
11eae0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8e 58 04 00 88 1d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;....X....CREATE |
11eb00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
11eb20 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
11eb40 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
11eb60 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
11eb80 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
11eba0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
11ebc0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 73 20 57 48 45 52 45 20 6e 2b 31 3b 0a 45 4e 44 2b 0a 43 52 | PDATE.SET.n=s.WHERE.n+1;.END+.CR |
11ebe0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
11ec00 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
11ec20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
11ec40 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
11ec60 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
11ec80 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
11eca0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 45 59 2c 20 | .UPDATE.SET.n=n+1;.END;.CREAEY,. |
11ecc0 | 6e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 73 20 57 48 45 52 | n.t1.BEGIN...DELETE.FROM.cs.WHER |
11ece0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 53 45 4c 45 43 54 20 63 73 20 | E.v=old.a.AND.n==1;...SELECT.cs. |
11ed00 | 53 45 85 3b 8e 57 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | SE.;.W...{CREATE.TABLE.t1(a.INT) |
11ed20 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
11ed40 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
11ed60 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
11ed80 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
11eda0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11edc0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11ede0 | 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .END;EXPLAIN.CREATE.TRIGGER.r2.A |
11ee00 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
11ee20 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
11ee40 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
11ee60 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
11ee80 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
11eea0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
11eec0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
11eee0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
11ef00 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
11ef20 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
11ef40 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
11ef60 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
11ef80 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 41 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=A.WHER |
11efa0 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
11efc0 | 0a 85 3b 8e 56 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..;.V...{CREATE.TABLE.t1(a.INT); |
11efe0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
11f000 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
11f020 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
11f040 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
11f060 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
11f080 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
11f0a0 | 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | END;EXPLAIN.CREATE.TRIGGER.r2.AF |
11f0c0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
11f0e0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
11f100 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
11f120 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
11f140 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11f160 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11f180 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
11f1a0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
11f1c0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
11f1e0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
11f200 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
11f220 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
11f240 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 6f 77 65 72 28 | (4),(7);.UPDATE.t1.SET.a=.lower( |
11f260 | 31 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | 1)=4;.DELETE.FROM.t1.WHERE.a=7;. |
11f280 | 85 41 8e 55 04 00 8b 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .A.U....CREATE.TABLE.t1(a.INT);. |
11f2a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
11f2c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
11f2e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
11f300 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
11f320 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
11f340 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
11f360 | 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | ND;EXPLAIN.CREATE.TRIGGER.r2.AFT |
11f380 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
11f3a0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
11f3c0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
11f3e0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
11f400 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
11f420 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
11f440 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
11f460 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
11f480 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
11f4a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
11f4c0 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
11f4e0 | 55 45 53 28 31 29 2c 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 | UES(1),(.sqlite_compileoption_us |
11f500 | 65 64 28 31 29 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | ed(1));.UPDATE.t1.SET.a=5.WHERE. |
11f520 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 | a=4;.DELETE.FROM.t1.WHERE.a=7;VA |
11f540 | 43 55 55 4d 0a 85 1b 8e 54 04 00 8a 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | CUUM....T...;CREATE.TABLE.t1(a.I |
11f560 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
11f580 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
11f5a0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
11f5c0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
11f5e0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
11f600 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
11f620 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
11f640 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
11f660 | 4d 20 e3 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M..ounts.WHERE.v=old.a.AND.n==1; |
11f680 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
11f6a0 | 20 76 3d 6f 6c 64 2e 61 3b 45 4e 44 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .v=old.a;END...INSERT.INTO.count |
11f6c0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11f6e0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11f700 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
11f720 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
11f740 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
11f760 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
11f780 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
11f7a0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
11f7c0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
11f7e0 | 20 61 3d 34 85 34 8e 53 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .a=4.4.S...mCREATE.TABLE.t1(a.IN |
11f800 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
11f820 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
11f840 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
11f860 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
11f880 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
11f8a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
11f8c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
11f8e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
11f900 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 4e 3b 0a | .counts.WHERE.v>old.a.AND.v==N;. |
11f920 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
11f940 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
11f960 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
11f980 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
11f9a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
11f9c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
11f9e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
11fa00 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
11fa20 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
11fa40 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
11fa60 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
11fa80 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 28 8e 52 | ;.DELETE.FROM.t1.WHERE.a=7;..(.R |
11faa0 | 04 00 8a 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...UCREATE.TABLE.t1(a.INT);.CREA |
11fac0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
11fae0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
11fb00 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
11fb20 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
11fb40 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
11fb60 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
11fb80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
11fba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
11fbc0 | 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v>old.a.AND.n==1;...UPDATE |
11fbe0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b | .counts.SET.v=n-1.WHERE.v>old.a; |
11fc00 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
11fc20 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
11fc40 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
11fc60 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
11fc80 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
11fca0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
11fcc0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
11fce0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
11fd00 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
11fd20 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 41 4e 41 4c 59 5a 45 | ATE.t1.SET.a=5.WHERE.a=4;ANALYZE |
11fd40 | 20 46 52 4f 4d 20 74 31 85 34 8e 51 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .FROM.t1.4.Q...mCREATE.TABLE.t1( |
11fd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
11fd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
11fda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
11fdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
11fde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
11fe00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
11fe20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
11fe40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
11fe60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v>old.a.AND.n= |
11fe80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
11fea0 | 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v>old.a;...INSERT.INTO.count |
11fec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
11fee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
11ff00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
11ff20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
11ff40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
11ff60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e | UPDATE.counts.SET.n=n-1.WHERE.v> |
11ff80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
11ffa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
11ffc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
11ffe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
120000 | 0d 00 00 00 0c 00 f6 00 1d 3e 1a 9e 18 8f 16 80 13 ae 10 d4 0d f8 0b ea 08 e4 05 f8 03 06 00 f6 | .........>...................... |
120020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
120080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1200a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1200c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1200e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 0c 8e 68 04 00 88 1d 43 52 | .........................h....CR |
120100 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
120120 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
120140 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
120160 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
120180 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 | ...INSERT.INTO.counts(v,n).WITH. |
1201a0 | 63 28 78 29 20 41 53 20 28 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 3f | c(x).AS.(.WITH.c(x).AS.(values(? |
1201c0 | 29 29 20 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | )).values(1))..VALUES(new.a,1).. |
1201e0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
120200 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | T.n=n+1;.END;.UPDATE.ON.t1.BEGIN |
120220 | 0a 20 20 44 45 4c 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | ...DELR.DELETE.ON.t1.BEGIN...DEL |
120240 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
120260 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
120280 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
1202a0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
1202c0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
1202e0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
120300 | 48 45 52 45 20 61 85 6e 8e 67 04 00 8b 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | HERE.a.n.g...aCREATE.TABLE.t1(a. |
120320 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
120340 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
120360 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
120380 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
1203a0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 20 57 49 54 48 20 63 | ounts(v,n).WITH.c(x).AS.(.WITH.c |
1203c0 | 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 76 61 6c 75 65 73 28 31 29 29 20 20 56 | (x).AS.(values(1)).values(1))..V |
1203e0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
120400 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
120420 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
120440 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
120460 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
120480 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
1204a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
1204c0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
1204e0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
120500 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
120520 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
120540 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
120560 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
120580 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
1205a0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
1205c0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
1205e0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 68 8e 66 04 00 8b 55 | ROM.t1.WHERE.a=7;VACUUM..h.f...U |
120600 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
120620 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
120640 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
120660 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
120680 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 | IN...INSERT.INTO.counts(v,n).WIT |
1206a0 | 48 20 63 28 78 29 20 41 53 20 28 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 | H.c(x).AS.(.WITH.c(x).AS.(values |
1206c0 | 28 31 29 29 20 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | (1)).values(1))..VALUES(new.a,1) |
1206e0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
120700 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
120720 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
120740 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
120760 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
120780 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
1207a0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
1207c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
1207e0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
120800 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
120820 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
120840 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
120860 | 45 20 76 3d 6f 6c 64 2e 61 2b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a+.END;.INSERT.INTO.t1(a |
120880 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
1208a0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
1208c0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
1208e0 | 3d 37 3b 0a 86 02 8e 65 04 00 8c 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;....e....CREATE.TABLE.t1(a.IN |
120900 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
120920 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
120940 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
120960 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
120980 | 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 20 57 49 54 48 20 63 28 78 | nts(v,n).WITH.c(x).AS.(.WITH.c(x |
1209a0 | 29 20 41 53 20 28 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 | ).AS.(.WITH.c(x).AS.(values(1)). |
1209c0 | 76 61 6c 75 65 73 28 31 29 29 20 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 | values(1)).values(1))..VALUES(ne |
1209e0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
120a00 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
120a20 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
120a40 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
120a60 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
120a80 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
120aa0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
120ac0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
120ae0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
120b00 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
120b20 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
120b40 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
120b60 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
120b80 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
120ba0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
120bc0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
120be0 | 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 64 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;....d....CREATE.TABLE.t |
120c00 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
120c20 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
120c40 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
120c60 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
120c80 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 20 61 2c 62 78 29 20 41 53 20 | TO.counts(v,n).WITH.c(.a,bx).AS. |
120ca0 | 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 a0 | (values(1))..VALUES(new.a,1).... |
120cc0 | 20 20 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ..UES(new.a,1).......ON.CONFLICT |
120ce0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
120d00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
120d20 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
120d40 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
120d60 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
120d80 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
120da0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
120dc0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
120de0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 58 8e 63 04 00 8b 35 | LETE.FROM.t1.WHERE.a=7;..X.c...5 |
120e00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
120e20 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
120e40 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
120e60 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
120e80 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 | IN...INSERT.INTO.counts(v,n).WIT |
120ea0 | 48 20 63 28 20 61 2c 62 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 | H.c(.a,bx).AS.(values(1))..VALUE |
120ec0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
120ee0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
120f00 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
120f20 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
120f40 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
120f60 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
120f80 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
120fa0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
120fc0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
120fe0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
121000 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
121020 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
121040 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
121060 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
121080 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
1210a0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
1210c0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 56 8e 62 04 00 8b 31 43 52 45 41 | t1.WHERE.a=7;VACUUM..V.b...1CREA |
1210e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
121100 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
121120 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
121140 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
121160 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 | .INSERT.INTO.counts(v,n).WITH.c( |
121180 | 20 20 61 2c 62 61 2c 62 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 | ..a,ba,bx).AS.(values(1))..VALUE |
1211a0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
1211c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
1211e0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
121200 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
121220 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
121240 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
121260 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
121280 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
1212a0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
1212c0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
1212e0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
121300 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
121320 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
121340 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
121360 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
121380 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
1213a0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 4e 8e 61 04 00 8b 21 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..N.a...!CREATE.TAB |
1213c0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
1213e0 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
121400 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
121420 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
121440 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 20 60 61 60 20 41 53 20 | T.INTO.counts(v,n).WITH..`a`.AS. |
121460 | 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | (values(1))..VALUES(new.a,1).... |
121480 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
1214a0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
1214c0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
1214e0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
121500 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
121520 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
121540 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
121560 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
121580 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
1215a0 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
1215c0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
1215e0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
121600 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
121620 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
121640 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
121660 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
121680 | 84 0b 8e 60 04 00 88 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...`....CREATE.TABLE.t1(a.INT);. |
1216a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
1216c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
1216e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
121700 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
121720 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 7e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(~ew.a,1).......ON.CO |
121740 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
121760 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
121780 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
1217a0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 2d 31 20 6e 3d 3d 47 49 4e 0a | nts.WHERE.v=old.a.AND.-1.n==GIN. |
1217c0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
1217e0 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
121800 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
121820 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
121840 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
121860 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
121880 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0b 8e 5f 04 00 88 1b 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a=7;...._....CREATE.TA |
1218a0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
1218c0 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
1218e0 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
121900 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
121920 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 ae 61 | RT.INTO.counts(v,n).VALUES(new.a |
121940 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 20 40 31 76 29 20 44 4f 20 55 | ,1).......ON.CONFLICT(.@1v).DO.U |
121960 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 20 20 20 20 4f 4e 20 43 4f | PDATE.SET.n=n+1;.END;.C....ON.CO |
121980 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
1219a0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
1219c0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
1219e0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
121a00 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
121a20 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
121a40 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
121a60 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
121a80 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 1c | =4;.DELETE.FROM.t1.WHERE.a=7;... |
121aa0 | 8e 5e 04 00 8a 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .^...=CREATE.TABLE.t1(a.INT);.CR |
121ac0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
121ae0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
121b00 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
121b20 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
121b40 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 33 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,3).......ON.CONF |
121b60 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
121b80 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
121ba0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
121bc0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
121be0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c 64 2e | TE.counts.SET.v=n-.upper(1)=old. |
121c00 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
121c20 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
121c40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
121c60 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
121c80 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
121ca0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
121cc0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
121ce0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
121d00 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
121d20 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 85 3e | PDATE.t1.SET.a=5.WHERE.a=4;.DE.> |
121d40 | 8e 5d 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .]....CREATE.TABLE.t1(a.INT);.CR |
121d60 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
121d80 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
121da0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
121dc0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
121de0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 0a 20 20 20 | n).VALUES(new.a,2001-01-011).... |
121e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
121e20 | 76 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | v=n+1;.END;.CREATE.TRIGGER.r2.AF |
121e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
121e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
121e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
121ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
121ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
121ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
121f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
121f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
121f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
121f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
121f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
121fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
121fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
121fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
122000 | 0d 00 00 00 0e 00 b1 00 1d 2e 1b 20 19 0f 16 3d 13 51 11 27 0f 19 0d 0b 0a fd 08 ef 06 e1 04 d3 | ...............=.Q.'............ |
122020 | 02 c5 00 b1 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
122080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1220a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 10 8e 76 04 00 88 25 43 52 45 41 54 45 20 | ....................v...%CREATE. |
1220c0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
1220e0 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
122100 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
122120 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
122140 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 | SERT.INTO.counts(v,n).WITH.c(x). |
122160 | 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 | AS.(values(1))..VALUES(new.a,1)E |
122180 | 58 43 45 50 54 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | XCEPT.VALUES(new.a,1).......ON.C |
1221a0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
1221c0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
1221e0 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
122200 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
122220 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
122240 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
122260 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
122280 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 | 4),(7);.UPDATE.t1.SET.a=5.WHERE. |
1222a0 | 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 | a=4;.DELETE.FROM.t1.WHERE.a=7;VA |
1222c0 | 43 55 55 4d 0a 84 0a 8e 75 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | CUUM....u....CREATE.TABLE.t1(a.I |
1222e0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
122300 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
122320 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
122340 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
122360 | 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | unts(v,n).WITH.c(x).AS.(values(1 |
122380 | 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 58 43 45 50 54 20 56 41 4c 55 45 53 | ))..VALUES(new.a,1)EXCEPT.VALUES |
1223a0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
1223c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
1223e0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
122400 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
122420 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
122440 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
122460 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
122480 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
1224a0 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
1224c0 | 46 52 4f 4d 20 74 31 00 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 74 04 00 88 19 43 52 45 41 54 | FROM.t1.WHERE.a=7;....t....CREAT |
1224e0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
122500 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
122520 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
122540 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
122560 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 | INSERT.INTO.counts(v,n).WITH.c(x |
122580 | 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | ).AS.(values(1))..VALUES(new.a,1 |
1225a0 | 29 45 58 43 45 50 54 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | )EXCEPT.VALUES(new.a,1).......ON |
1225c0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
1225e0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
122600 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
122620 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
122640 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
122660 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
122680 | 41 4c 55 45 53 28 31 29 2c 28 32 29 00 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2).(1),(3),(1),(3),(2) |
1226a0 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
1226c0 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
1226e0 | 0a 84 0a 8e 73 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ....s....CREATE.TABLE.t1(a.INT); |
122700 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
122720 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
122740 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
122760 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
122780 | 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 | (v,n).WITH.c(x).AS.(values(1)).. |
1227a0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 58 43 45 50 54 20 56 41 4c 55 45 53 28 6e 65 77 | VALUES(new.a,1)EXCEPT.VALUES(new |
1227c0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
1227e0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 2b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END+.CREATE.TRIG |
122800 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
122820 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
122840 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
122860 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
122880 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
1228a0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
1228c0 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
1228e0 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 72 04 00 88 19 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a=7;....r....CREATE.TA |
122900 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
122920 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
122940 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
122960 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
122980 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 | RT.INTO.counts(v,n).WITH.c(x).AS |
1229a0 | 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 58 43 | .(values(1))..VALUES(new.a,1)EXC |
1229c0 | 45 50 54 20 53 45 4c 45 43 54 28 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 | EPT.SELECT(.WITH.c(x).AS.(values |
1229e0 | 28 31 29 29 20 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | (1)).(v).DO.UPDATE.SET.n=n+1;.EN |
122a00 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
122a20 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
122a40 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
122a60 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
122a80 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
122aa0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
122ac0 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
122ae0 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e | 4;.DELETE.FROM.t1.WHERE.a=7;.... |
122b00 | 71 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | q....CREATE.TABLE.t1(a.INT);.CRE |
122b20 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
122b40 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
122b60 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
122b80 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
122ba0 | 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 | ).WITH.c(x).AS.(values(1))..VALU |
122bc0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 55 4e 49 4f 4e 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | ES(new.a,1).UNION.VALUES(new.a,1 |
122be0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
122c00 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
122c20 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
122c40 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
122c60 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
122c80 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
122ca0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 24 73 71 6c 69 74 65 5f 76 65 72 73 | TO.t1(a).VALUES(1),($sqlite_vers |
122cc0 | 69 6f 6e 28 29 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | ion()),(2),(4),(7);.UPDATE.t1.SE |
122ce0 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
122d00 | 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 70 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 | WHERE.a=7;....p....CREATE.TABLE. |
122d20 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
122d40 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
122d60 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 | T.ROWID*/;.CREATE.TRIGGER.r1.AFT |
122d80 | 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 | ER.INSERT.ON.t1.BEGIN...INSERT.I |
122da0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 | NTO.counts(v,n).WITH.c(x).AS.(va |
122dc0 | 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 55 4e 49 4f 4e 20 | lues(1))..VALUES(new.a,1).UNION. |
122de0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
122e00 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
122e20 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
122e40 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
122e60 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
122e80 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
122ea0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
122ec0 | 2c 28 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(.sqlite_version()),(2),(4),(7) |
122ee0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
122f00 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 6f 04 00 88 | ELETE.FROM.t1.WHERE.a=7;....o... |
122f20 | 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .CREATE.TABLE.t1(a.INT);.CREATE. |
122f40 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
122f60 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
122f80 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
122fa0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 | GIN...INSERT.INTO.counts(v,n).WI |
122fc0 | 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e | TH.c(x).AS.(values(1))..VALUES(n |
122fe0 | 65 77 2e 61 2c 31 29 0a 55 4e 49 4f 4e 20 53 45 4c 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | ew.a,1).UNION.SELECT(new.a,1)... |
123000 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
123020 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
123040 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
123060 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
123080 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
1230a0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | HERE.v=old.a;.END;.INSERT.INTO.t |
1230c0 | 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 | 1(a).VALUES(1),(2),(1),(3),(1),( |
1230e0 | 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 3),(2),(4),(7);.UPDATE.t1.SET.a= |
123100 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 | 5.WHERE.a=4;.DELETE.FROM.t1.WHER |
123120 | 45 20 61 3d 37 3b 0a 84 26 8e 6e 04 00 88 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | E.a=7;..&.n...QCREATE.TABLE.t1(a |
123140 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 | .INT);.CREATE.TABLE.counts(v.INT |
123160 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f | EGER.PRIMARY.KEY,.n.INT)/*WUT.RO |
123180 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
1231a0 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
1231c0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 | counts(v,n).WITH.c(x).AS.(values |
1231e0 | 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (1))..VALUES(new.a,1).......ON.C |
123200 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 3f 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+?;. |
123220 | 45 4e 44 3b 0a 43 52 45 41 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | END;.CREA.....ON.CONFLICT(v).DO. |
123240 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
123260 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
123280 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
1232a0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
1232c0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
1232e0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
123300 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
123320 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
123340 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 68 8e 6d 04 00 8b 55 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..h.m...UCREATE. |
123360 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
123380 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
1233a0 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
1233c0 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
1233e0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 | SERT.INTO.counts(v,n).WITH.c(x). |
123400 | 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | AS.(values(1))..VALUES(new.a,1). |
123420 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
123440 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | ET.n=n+1;.END;.CREATE.TRIGGER.r2 |
123460 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
123480 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
1234a0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
1234c0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | .WHERE.v=old.a;...INSERT.INTO.co |
1234e0 | 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | unts(v,n).WITH.c(x).AS.(values(1 |
123500 | 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ))..VALUES(new.a,1).......ON.CON |
123520 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
123540 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
123560 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
123580 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
1235a0 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
1235c0 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
1235e0 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
123600 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
123620 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 4e 8e | 4;.DELETE.FROM.t1.WHERE.a=7;..N. |
123640 | 6c 04 00 8b 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | l...!CREATE.TABLE.t1(a.INT);.CRE |
123660 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
123680 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
1236a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
1236c0 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
1236e0 | 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 | ).WITH.c(x).AS.(values(1))..VALU |
123700 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
123720 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
123740 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
123760 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
123780 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
1237a0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
1237c0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
1237e0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
123800 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
123820 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
123840 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
123860 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
123880 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
1238a0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
1238c0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 3f 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(?);.UPDATE.t |
1238e0 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
123900 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0d 8e 6b 04 00 88 1f 43 52 45 41 54 45 20 54 41 | .t1.WHERE.a=7;....k....CREATE.TA |
123920 | 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e | BLE.t1(a.INT);.CREATE.TABLE.coun |
123940 | 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 | ts(v.INTEGER.PRIMARY.KEY,.n.INT) |
123960 | 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 | /*WUT.ROWID*/;.CREATE.TRIGGER.r1 |
123980 | 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 | .AFTER.INSERT.ON.t1.BEGIN...INSE |
1239a0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 | RT.INTO.counts(v,n).WITH.c(x).AS |
1239c0 | 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 20 2d 31 2c 31 29 | .(values(1))..VALUES(new.a.-1,1) |
1239e0 | 0a 55 4e 49 4f 4e 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | .UNION.VALUES(new.a,1).......ON. |
123a00 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
123a20 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
123a40 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
123a60 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
123a80 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
123aa0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
123ac0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
123ae0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
123b00 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
123b20 | 84 0a 8e 6a 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...j....CREATE.TABLE.t1(a.INT);. |
123b40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
123b60 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
123b80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
123ba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
123bc0 | 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 53 45 4c 45 43 54 28 31 29 29 20 20 56 | v,n).WITH.c(x).AS.(SELECT(1))..V |
123be0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 58 43 45 50 54 20 53 45 4c 45 43 54 28 6e 65 77 2e | ALUES(new.a,1)EXCEPT.SELECT(new. |
123c00 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
123c20 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
123c40 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
123c60 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
123c80 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
123ca0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
123cc0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
123ce0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
123d00 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
123d20 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 4e 8e 69 04 00 8b 21 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..N.i...!CREATE.TAB |
123d40 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
123d60 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
123d80 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
123da0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
123dc0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 | T.INTO.counts(v,n).WITH.c(x).AS. |
123de0 | 28 53 45 4c 45 43 54 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | (SELECT(1))..VALUES(new.a,1).... |
123e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
123e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
123e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
123e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
123e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
123ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
123ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
123ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
123f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
123f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
123f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
123f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
123f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
123fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
123fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
123fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
124000 | 0d 00 00 00 0e 01 28 00 1d f2 1b e4 19 d6 17 c8 15 ba 12 fb 10 39 0d 81 0b 71 09 63 07 53 05 46 | ......(..............9...q.c.S.F |
124020 | 03 38 01 28 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .8.(............................ |
124040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1240a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1240c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1240e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
124120 | 00 00 00 00 00 00 00 00 84 0c 8f 04 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ................CREATE.TABLE.t1( |
124140 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
124160 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
124180 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
1241a0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 57 49 54 48 20 63 28 78 29 20 41 53 20 | INSERT.ON.t1.BEGIN.WITH.c(x).AS. |
1241c0 | 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | (values(1))..VALUES(new.a,1).... |
1241e0 | 20 20 20 20 4e 20 43 4f 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | ....N.CONSERT.INTO.counts(v,n).V |
124200 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
124220 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
124240 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
124260 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
124280 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
1242a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
1242c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
1242e0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
124300 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
124320 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8f 03 04 00 88 19 | LETE.FROM.t1.WHERE.a=7;......... |
124340 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
124360 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
124380 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
1243a0 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
1243c0 | 49 4e 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c | IN.WITH.c(x).AS.(values(1))..VAL |
1243e0 | 55 45 53 28 6e 65 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 2e 61 2c 31 29 0a 20 20 | UES(nevalues(1))..VALUES.a,1)... |
124400 | 77 2e 61 2c 31 29 0a 20 20 54 45 58 54 20 20 20 20 20 4e 20 43 4f 4e 53 45 52 54 20 49 4e 54 4f | w.a,1)...TEXT.....N.CONSERT.INTO |
124420 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .counts(v,n)CT(v).DO.UPDATE.SET. |
124440 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 5a | n=n+1;.END;.CREATE.TRIGGER.r3.AZ |
124460 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
124480 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1244a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
1244c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
1244e0 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
124500 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
124520 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
124540 | 20 61 3d 37 3b 0a 84 09 8f 02 04 00 88 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;.........CREATE.TABLE.t1(a. |
124560 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
124580 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
1245a0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
1245c0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 57 49 54 48 20 45 63 28 78 29 20 41 53 20 28 | SERT.ON.t1.BEGIN.WITH.Ec(x).AS.( |
1245e0 | 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | values(1))..VALUES(new.a,1)..... |
124600 | 20 20 4f 4e 20 43 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..ON.CRT.INTO.counts(v,n).VALUES |
124620 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
124640 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
124660 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
124680 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
1246a0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
1246c0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
1246e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
124700 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
124720 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
124740 | 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8f 01 04 00 88 1d 43 52 45 41 54 | FROM.t1.WHERE.a=7;.........CREAT |
124760 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
124780 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
1247a0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
1247c0 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 57 49 | R.r1.AFTER.INSERT.ON.t1.BEGIN.WI |
1247e0 | 54 48 20 43 41 53 45 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 | TH.CASEc(x).AS.(values(1))..VALU |
124800 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 53 45 52 54 20 49 4e 54 | ES(new.a,1).......ON.CONSERT.INT |
124820 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
124840 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
124860 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r3.A |
124880 | 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.DELETE.ON.t1.BEGIN...DELETE |
1248a0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
1248c0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
1248e0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | HERE.v=old.a;.END;.INSERT.INTO.t |
124900 | 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 | 1(a).VALUES(1),(2),(1),(3),(1),( |
124920 | 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d | 3),(2),(4),(7);.UPDATE.t1.SET.a= |
124940 | 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 | 5.WHERE.a=4;.DELETE.FROM.t1.WHER |
124960 | 45 20 61 84 0a 8f 00 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | E.a........CREATE.TABLE.t1(a.INT |
124980 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
1249a0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
1249c0 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
1249e0 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 57 49 54 48 20 41 53 63 28 78 29 20 41 53 20 28 76 61 | T.ON.t1.BEGIN.WITH.ASc(x).AS.(va |
124a00 | 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | lues(1))..VALUES(new.a,1)....... |
124a20 | 4f 4e 20 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | ON.ERT.INTO.counts(v,n).VALUES(n |
124a40 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
124a60 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
124a80 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
124aa0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
124ac0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
124ae0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
124b00 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
124b20 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
124b40 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
124b60 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8e 7f 04 00 88 1d 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;.........CREATE. |
124b80 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
124ba0 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
124bc0 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
124be0 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 57 49 54 | r1.AFTER.INSERT.ON.t1.BEGIN..WIT |
124c00 | 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 6e 65 77 | H.c(x).AS.(values(1)).VALUES(new |
124c20 | 2e 61 2c 31 29 0a 20 20 a0 20 20 20 4f 4e 20 43 4f 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | .a,1).......ON.CONSERT.INTO.coun |
124c40 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
124c60 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
124c80 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
124ca0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
124cc0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
124ce0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
124d00 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
124d20 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
124d40 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
124d60 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
124d80 | 0a 85 34 8e 7e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..4.~...mCREATE.TABLE.t1(a.INT); |
124da0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
124dc0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
124de0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
124e00 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
124e20 | 28 76 ac 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v.n).VALUES(new.a,1).......ON.C |
124e40 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
124e60 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
124e80 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
124ea0 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
124ec0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
124ee0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
124f00 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
124f20 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
124f40 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
124f60 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
124f80 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
124fa0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
124fc0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
124fe0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
125000 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
125020 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8e 7d 04 00 8b | ELETE.FROM.t1.WHERE.a=7;..>.}... |
125040 | 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .CREATE.TABLE.t1(a.INT);.CREATE. |
125060 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
125080 | 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)/*WUT.ROWID*/;.CREATE. |
1250a0 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
1250c0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 76 29 20 56 41 | GIN...INSERT.INTO.counts(v,v).VA |
1250e0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
125100 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
125120 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
125140 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
125160 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
125180 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
1251a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
1251c0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
1251e0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
125200 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
125220 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
125240 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
125260 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
125280 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
1252a0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
1252c0 | 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 3b | .t1.SET.a=520012001-01-01-01-01; |
1252e0 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8e 7c 04 | .DELETE.FROM.t1.WHERE.a=7;..;.|. |
125300 | 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..{CREATE.TABLE.t1(a.INT);.CREAT |
125320 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
125340 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
125360 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
125380 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 76 29 20 | BEGIN...INSERT.INTO.counts(v,v). |
1253a0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
1253c0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
1253e0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
125400 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
125420 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
125440 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
125460 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
125480 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
1254a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
1254c0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
1254e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
125500 | 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 49 53 20 74 72 75 65 3d 31 3b 0a 20 20 55 50 44 41 54 45 | =.nullif(1,1)IS.true=1;...UPDATE |
125520 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
125540 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
125560 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
125580 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
1255a0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 7b 04 00 | DELETE.FROM.t1.WHERE.a=7;....{.. |
1255c0 | 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
1255e0 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
125600 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
125620 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
125640 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 | EGIN...INSERT.INTO.counts(v,n).W |
125660 | 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 3f 29 29 20 20 56 41 4c 55 45 53 28 | ITH.c(x).AS.(values(?))..VALUES( |
125680 | 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | new.a,1)...ON.CONFLICT(v).DO.UPD |
1256a0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 53 45 | ATE.SET.n=n+1;.END;.CREATE.TRISE |
1256c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
1256e0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
125700 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
125720 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
125740 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
125760 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
125780 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
1257a0 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
1257c0 | 52 45 20 61 3d 37 3b 0a 84 0a 8e 7a 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;....z....CREATE.TABLE.t1( |
1257e0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
125800 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
125820 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
125840 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
125860 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 | .counts(v,n).WITH.c(x).AS.(value |
125880 | 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 3c 31 29 45 58 43 45 50 54 20 53 45 4c | s(1))..VALUES(new.a<1)EXCEPT.SEL |
1258a0 | 45 43 54 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | ECT(new.a,1).......ON.CONFLICT(v |
1258c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1258e0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
125900 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
125920 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
125940 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
125960 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
125980 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
1259a0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
1259c0 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 79 04 00 88 19 43 52 | TE.FROM.t1.WHERE.a=7;....y....CR |
1259e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
125a00 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
125a20 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
125a40 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
125a60 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 | ...INSERT.INTO.counts(v,n).WITH. |
125a80 | 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e | c(x).AS.(values(1))..VALUES(new. |
125aa0 | 61 2c 39 29 45 58 43 45 50 54 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | a,9)EXCEPT.VALUES(new.a,1)...... |
125ac0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
125ae0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
125b00 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
125b20 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
125b40 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
125b60 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
125b80 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
125ba0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
125bc0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
125be0 | 3d 37 3b 0a 84 0a 8e 78 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;....x....CREATE.TABLE.t1(a.IN |
125c00 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
125c20 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
125c40 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
125c60 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
125c80 | 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 | nts(v,n).WITH.c(x).AS.(values(1) |
125ca0 | 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 58 43 45 50 54 20 56 41 4c 55 45 53 28 | )..VALUES(new.a,1)EXCEPT.VALUES( |
125cc0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
125ce0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
125d00 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
125d20 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
125d40 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
125d60 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
125d80 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 55 4e 49 4f 4e 28 31 | SERT.INTO.t1(a).VALUES(1)UNION(1 |
125da0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
125dc0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
125de0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0a 8e 77 04 00 88 19 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;....w....CREATE |
125e00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
125e20 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
125e40 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
125e60 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
125e80 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 | NSERT.INTO.counts(v,n).WITH.c(x) |
125ea0 | 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | .AS.(values(1))..VALUES(new.a,1) |
125ec0 | 45 58 43 45 50 54 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | EXCEPT.VALUES(new.a,1).......ON. |
125ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
125f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
125f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
125f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
125f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
125f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
125fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 3b 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1);(3),(1),(3),(2), |
125fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
125fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
126000 | 0d 00 00 00 0d 01 cb 00 1d f0 1b e2 19 2a 16 68 13 b0 10 f2 0e 33 0c 25 0a 12 08 02 05 f2 03 e2 | .............*.h.....3.%........ |
126020 | 01 cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1260a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1260c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1260e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
126180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1261a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1261c0 | 00 00 00 00 00 00 00 00 00 00 00 84 13 8f 11 04 00 88 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ..................+CREATE.TABLE. |
1261e0 | 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 | t1(a.INT);.CREATE.TABLE.counts(v |
126200 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 | .INTEGER.PRIMARY.KEY,.n.INT)/*WU |
126220 | 54 20 52 4f 57 49 44 2a 2f 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | T.ROWID*/;EXPLAIN.CREATE.TRIGGER |
126240 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
126260 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
126280 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
1262a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1262c0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
1262e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 a0 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
126300 | 64 2e 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | d.=1;...UPDATE.cou...DELETE.FROM |
126320 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
126340 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
126360 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
126380 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
1263a0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
1263c0 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
1263e0 | 3b 0a 84 0c 8f 10 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;.........CREATE.TABLE.t1(a.INT) |
126400 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
126420 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
126440 | 3b 41 4e 41 4c 59 5a 45 00 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 4e 20 74 31 20 42 | ;ANALYZE.TRIGGER.r1.AFTER.N.t1.B |
126460 | 45 47 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | EGE.v=old.a.AND.n==1;...UPDATE.c |
126480 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
1264a0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
1264c0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
1264e0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
126500 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
126520 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
126540 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
126560 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
126580 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
1265a0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
1265c0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
1265e0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8f 0f 04 00 88 1d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;.........CREATE |
126600 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
126620 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
126640 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
126660 | 20 72 33 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r3.AFTER.INSERT.ON.t1.BEGIN...I |
126680 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
1266a0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
1266c0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 91 f6 f6 f6 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 | PDATE.SET.n=.................... |
1266e0 | 09 09 09 09 09 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | .....r2.AFTER.UPDATE.ON.t1.BEGIN |
126700 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
126720 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
126740 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
126760 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
126780 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
1267a0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 62 | SET.n=n+1;.END;.CREATE.TRIGGER.b |
1267c0 | 33 20 41 46 54 45 52 20 44 45 41 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DEAETE.ON.t1.BEGIN...DEL |
1267e0 | 45 54 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | ETounts.WHERE.v=olM.t1.WHERE.a=7 |
126800 | 3b 0a 84 0c 8f 0e 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;.........CREATE.TABLE.t1(a.INT) |
126820 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
126840 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
126860 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r3.AFTER.INSERT |
126880 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
1268a0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
1268c0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
1268e0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
126900 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
126920 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
126940 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 76 3d | UPDATE.counts.SET.CURRENT_TIMEv= |
126960 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
126980 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
1269a0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
1269c0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
1269e0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | N.t1.BEGIN...DELETounts.WHERE.v= |
126a00 | 6f 6c 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0f 8f 0d 04 00 88 23 43 52 45 41 54 45 | olM.t1.WHERE.a=7;........#CREATE |
126a20 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
126a40 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
126a60 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
126a80 | 20 72 33 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r3.AFTER.INSERT.ON.t1.BEGIN...I |
126aa0 | 4e 53 45 52 54 20 49 4e 54 4f 20 41 44 44 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | NSERT.INTO.ADDcounts(v,n).VALUES |
126ac0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
126ae0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 | O.UPDATE.SET.n=n................ |
126b00 | 09 09 09 09 09 09 09 09 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | ........r2.AFTER.UPDATE.ON.t1.BE |
126b20 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
126b40 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
126b60 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
126b80 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
126ba0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
126bc0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
126be0 | 52 20 62 33 20 41 46 54 45 52 20 44 45 41 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.b3.AFTER.DEAETE.ON.t1.BEGIN... |
126c00 | 44 45 4c 45 54 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 4d 20 74 31 20 57 48 45 52 45 20 | DELETounts.WHERE.v=olM.t1.WHERE. |
126c20 | 61 3d 37 3b 0a 84 0a 8f 0c 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;.........CREATE.TABLE.t1(a.I |
126c40 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
126c60 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
126c80 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r3.AFTER.INS |
126ca0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 2f 2a 20 2a 2f 20 49 | ERT.ON.t1.BEGIN...INSERT./*.*/.I |
126cc0 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
126ce0 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
126d00 | 45 54 20 6e 3d 6e 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 09 72 32 | ET.n=n........................r2 |
126d20 | 20 41 46 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .AFTE.ON.t1.BEGIN...DELETE.FROM. |
126d40 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
126d60 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
126d80 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
126da0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
126dc0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
126de0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 62 33 20 41 46 54 45 52 20 44 45 41 45 54 45 20 | .CREATE.TRIGGER.b3.AFTER.DEAETE. |
126e00 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | ON.t1.BEGIN...DELETounts.WHERE.v |
126e20 | 3d 6f 6c 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8f 0b 04 00 8a 7b 43 52 45 41 54 | =olM.t1.WHERE.a=7;..;.....{CREAT |
126e40 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
126e60 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
126e80 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
126ea0 | 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
126ec0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
126ee0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
126f00 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
126f20 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
126f40 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
126f60 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
126f80 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
126fa0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
126fc0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
126fe0 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
127000 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
127020 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
127040 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
127060 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 49 4e | -1.WHERE.v=old.a;.END;EXPLAIN.IN |
127080 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
1270a0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
1270c0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
1270e0 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8f 0a 04 00 8a 79 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..:.....yCREATE |
127100 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
127120 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
127140 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
127160 | 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
127180 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
1271a0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
1271c0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1271e0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
127200 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
127220 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
127240 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
127260 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
127280 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
1272a0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
1272c0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
1272e0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
127300 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
127320 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
127340 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
127360 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
127380 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
1273a0 | 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8f 09 04 00 8a 6d 43 52 45 41 54 45 20 54 | HERE.a=7;VACUUM..4.....mCREATE.T |
1273c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
1273e0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
127400 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
127420 | 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
127440 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
127460 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
127480 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
1274a0 | 45 52 20 72 32 00 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
1274c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
1274e0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
127500 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
127520 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
127540 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
127560 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
127580 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
1275a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
1275c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
1275e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
127600 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
127620 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
127640 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
127660 | 52 45 20 61 3d 37 3b 0a 85 3e 8f 08 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..>......CREATE.TABLE.t1( |
127680 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
1276a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
1276c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
1276e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | UPDATE.ON.t1.BEGIN...INSERT.INTO |
127700 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
127720 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
127740 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
127760 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
127780 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
1277a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
1277c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
1277e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
127800 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
127820 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
127840 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
127860 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
127880 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
1278a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
1278c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
1278e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 32 30 | (4),(7);.UPDATE.t1.SET.a=5200120 |
127900 | 30 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | 01-01-01-01-01;.DELETE.FROM.t1.W |
127920 | 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 07 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..4.....mCREATE.TABLE.t |
127940 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
127960 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | INTEGER.PRIMARY.KEY,.n.INT)/*WUT |
127980 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
1279a0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.UPDATE.ON.t1.BEGIN...INSERT.IN |
1279c0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
1279e0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
127a00 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
127a20 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
127a40 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
127a60 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
127a80 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
127aa0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
127ac0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
127ae0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
127b00 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
127b20 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
127b40 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
127b60 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
127b80 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
127ba0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 | ),(4),(7);.UPDATE.t1.SET.a=52001 |
127bc0 | 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | -01-01;.DELETE.FROM.t1.WHERE.a=7 |
127be0 | 3b 0a 84 0a 8f 06 04 00 88 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;.........CREATE.TABLE.t1(a.INT) |
127c00 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
127c20 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
127c40 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
127c60 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 | .ON.t1.BEGIN.WITH.c(x).AS.(value |
127c80 | 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 2f 2a 20 2a 2f | s(1))..VALUES(new.a,1)...../*.*/ |
127ca0 | 20 20 20 4f 4e 20 43 4f 4e 53 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | ...ON.CONS.counts(v,n).VALUES(ne |
127cc0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
127ce0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
127d00 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
127d20 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
127d40 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
127d60 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
127d80 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
127da0 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
127dc0 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
127de0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8f 05 04 00 88 1d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;.........CREATE.T |
127e00 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
127e20 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
127e40 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
127e60 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 20 57 49 54 48 20 | 1.AFTER.INSERT.ON.t1.BEGIN.WITH. |
127e80 | 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e | c(x).AS.(values(1))..VALUES(new. |
127ea0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | a,1).......ON.CONSERT.INTO.count |
127ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
127ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
127f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
127f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
127f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
127f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
127f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
127fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
127fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
127fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
128000 | 0d 00 00 00 0b 01 e4 00 1d 3a 1a 89 17 bf 14 fa 12 3e 0f 83 0c c8 0a 0c 07 54 04 9c 01 e4 00 00 | .........:.......>.......T...... |
128020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1280a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1280c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1280e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
128180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1281a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1281c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1281e0 | 00 00 00 00 85 34 8f 1c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .....4.....mCREATE.TABLE.t1(a.IN |
128200 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v.INTEGE |
128220 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 | R.PRIMARY.KEY,.n.INT)WITHOUT.ROW |
128240 | 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | ID;.CREATE.TRIGGER.r1.AFTER.INSE |
128260 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
128280 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
1282a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
1282c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
1282e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
128300 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v<old.a.AND.n==1;. |
128320 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
128340 | 76 2d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v-old.a;...INSERT.INTO.counts(v, |
128360 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
128380 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.v=n+1;.END |
1283a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
1283c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1283e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
128400 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
128420 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
128440 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
128460 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
128480 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 1b | ;.DELETE.FROM.t1.WHERE.a=7;..4.. |
1284a0 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
1284c0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
1284e0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | Y.KEY,.n.INT)WITHOUT.ROWID;.CREA |
128500 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
128520 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
128540 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
128560 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
128580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
1285a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
1285c0 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.n==1;...UPDATE |
1285e0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 20 69 6e 73 74 72 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b | .counts.SET.n=.instr(1,1)=old.a; |
128600 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
128620 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
128640 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.v=n+1;.END;.CREATE |
128660 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
128680 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
1286a0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
1286c0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
1286e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
128700 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
128720 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
128740 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 1a 04 00 8a 6d 43 52 45 41 | .FROM.t1.WHERE.a=7;..4.....mCREA |
128760 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
128780 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
1287a0 | 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)WITHOUT.ROWID;.CREATE.TRIGG |
1287c0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
1287e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
128800 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
128820 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
128840 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
128860 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 20 74 | IN...DELETE.FROM.counts.WHERE..t |
128880 | 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | otal_changes();...UPDATE.counts. |
1288a0 | 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-.random()=old.a;...INSER |
1288c0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
1288e0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
128900 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
128920 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
128940 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
128960 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
128980 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
1289a0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
1289c0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
1289e0 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
128a00 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8f 19 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..8.....uCREATE.TABLE |
128a20 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
128a40 | 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 | v.INTEGER.PRIMARY.KEY,.n.INT)WIT |
128a60 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | HOUT.ROWID;.CREATE.TRIGGER.r1.AF |
128a80 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
128aa0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
128ac0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
128ae0 | 53 45 54 20 6e 3d 6e 2b 20 31 3d 31 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | SET.n=n+.1=11;.END;.CREATE.TRIGG |
128b00 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
128b20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
128b40 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
128b60 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
128b80 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
128ba0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
128bc0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
128be0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
128c00 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
128c20 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
128c40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
128c60 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
128c80 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
128ca0 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
128cc0 | 52 45 20 61 3d 37 3b 0a 85 37 8f 18 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..7.....sCREATE.TABLE.t1( |
128ce0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
128d00 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 | TEGER.PRIMARY.KEY,.n.INT)WITHOUT |
128d20 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
128d40 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
128d60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
128d80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
128da0 | 6e 3d 6e 20 2d 31 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 | n=n.-1+1;.END;.CREATE.TRIGGER.r2 |
128dc0 | 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.UPDATE.ON.t1.BEGIN...DELE |
128de0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v<old.a.AND |
128e00 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
128e20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | .WHERE.v=old.a;...INSERT.INTO.co |
128e40 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
128e60 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
128e80 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r3.AFTER |
128ea0 | 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .DELETE.ON.t1.BEGIN...DELETE.FRO |
128ec0 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
128ee0 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
128f00 | 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 | .v=old.a;.END;.INSERT.INTO.t1(a) |
128f20 | 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 | .VALUES(1),(2),(1),(3),(1),(3),( |
128f40 | 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 | 2),(4),(7);.UPDATE.t1.SET.a=5.WH |
128f60 | 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | ERE.a=4;.DELETE.FROM.t1.WHERE.a= |
128f80 | 37 3b 0a 85 37 8f 17 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | 7;..7.....sCREATE.TABLE.t1(a.INT |
128fa0 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v.INTEGER |
128fc0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | .PRIMARY.KEY,.n.INT)WITHOUT.ROWI |
128fe0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | D;.CREATE.TRIGGER.r1.AFTER.INSER |
129000 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
129020 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 20 2d 31 29 0a 20 20 20 20 20 | ts(v,n).VALUES(new.a,1.-1)...... |
129040 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
129060 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
129080 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1290a0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v<old.a.AND.n==1 |
1290c0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
1290e0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
129100 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
129120 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
129140 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
129160 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
129180 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
1291a0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
1291c0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
1291e0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
129200 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
129220 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 | =4;.DELETE.FROM.t1.WHERE.a=7;..8 |
129240 | 8f 16 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .....uCREATE.TABLE.t1(a.INT);.CR |
129260 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
129280 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | ARY.KEY,.n.INT)WITHOUT.ROWID;.CR |
1292a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
1292c0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
1292e0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 20 31 3d 31 31 29 0a 20 20 20 20 20 20 4f 4e 20 | n).VALUES(new.a,.1=11).......ON. |
129300 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
129320 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
129340 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
129360 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v<old.a.AND.n==1;... |
129380 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
1293a0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
1293c0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
1293e0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
129400 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
129420 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
129440 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
129460 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
129480 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
1294a0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
1294c0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
1294e0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 41 8f 15 04 00 | DELETE.FROM.t1.WHERE.a=7;..A.... |
129500 | 8b 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
129520 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
129540 | 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2f 2a 57 55 54 20 52 4f | KEY,.n.INT)WITHOUT.ROWID/*WUT.RO |
129560 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 | WID*/;.CREATE.TRIGGER.r1.AFTER.I |
129580 | 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NSERT.ON.t1.BEGIN...INSERT.INTO. |
1295a0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
1295c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
1295e0 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
129600 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
129620 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 | ROM.counts.WHERE.v=old.a.AND.n=. |
129640 | 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a 20 | json_object(1,1,1,1)OR.true=N;.. |
129660 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
129680 | 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =old.a;...INSERT.INTO.counts(v,n |
1296a0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ).VALUES(new.a,1)...ON.CONFLICT( |
1296c0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
1296e0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r3.AFTER.DELETE.ON.t |
129700 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
129720 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
129740 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e | unts.SET.n=n-1.WHERE.v=old.a;.EN |
129760 | 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 | D;.INSERT.INTO.t1(a).VALUES(1),( |
129780 | 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a | 2),(1),(3),(1),(3),(2),(4),(7);. |
1297a0 | 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a 85 | UPDATE.t1.SET.a=5.WHERE.a=4;.D.. |
1297c0 | 46 8f 14 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 | F......CREATE.TABLE.t1(a.INT);.C |
1297e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 | REATE.TABLE.counts(v.INTEGER.PRI |
129800 | 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 45 58 | MARY.KEY,.n.INT)/*WUT.ROWID*/;EX |
129820 | 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | PLAIN.QUERY.PLAN.CREATE.TRIGGER. |
129840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
129860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
129880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
1298a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
1298c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
1298e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
129900 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
129920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
129940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
129960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
129980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
1299a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
1299c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
1299e0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
129a00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
129a20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
129a40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
129a60 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
129a80 | 45 52 45 20 61 3d 37 3b 0a 85 2d 8f 13 04 00 8a 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..-....._CREATE.TABLE.t1 |
129aa0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
129ac0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
129ae0 | 52 4f 57 49 44 2a 2f 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | ROWID*/;EXPLAIN.CREATE.TRIGGER.r |
129b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
129b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
129b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
129b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 | ATE.SET.n=n+1;.END;EXPLAIN.CREAT |
129b80 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
129ba0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
129bc0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
129be0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c e4 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=ol..a;...IN |
129c00 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
129c20 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
129c40 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 | DATE.SET.n=n+1;.END;EXPLAIN.CREA |
129c60 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
129c80 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
129ca0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
129cc0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
129ce0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
129d00 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
129d20 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 42 8f 12 04 00 | PDATE.t1.SET.a=5.WHERE.a=4.B.... |
129d40 | 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
129d60 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
129d80 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 45 58 50 4c 41 49 4e | KEY,.n.INT)/*WUT.ROWID*/;EXPLAIN |
129da0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
129dc0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
129de0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
129e00 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
129e20 | 45 4e 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | END;EXPLAIN.CREATE.TRIGGER.r2.AF |
129e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
129e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
129e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
129ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
129ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
129ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
129f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
129f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
129f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
129f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
129f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
129fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
129fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
129fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
12a000 | 0d 00 00 00 0b 02 1c 00 1d 48 1a 90 17 d1 15 19 12 69 0f ba 0d 02 0a 4a 07 92 04 d4 02 1c 00 00 | .........H.......i.....J........ |
12a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12a200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 8f 27 | .............................4.' |
12a220 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
12a240 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
12a260 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | Y.KEY,.n.INT)WITHOUT.ROWID;.CREA |
12a280 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
12a2a0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
12a2c0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
12a2e0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
12a300 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
12a320 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
12a340 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.n==1;...UPDATE |
12a360 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v>old.a; |
12a380 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
12a3a0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
12a3c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
12a3e0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
12a400 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
12a420 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
12a440 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
12a460 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
12a480 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
12a4a0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 6f 77 65 72 28 31 29 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=.lower(1)=4;.DELETE |
12a4c0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8f 26 04 00 8a 79 43 52 45 41 | .FROM.t1.WHERE.a=7;..:.&...yCREA |
12a4e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
12a500 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
12a520 | 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)WITHOUT.ROWID;.CREATE.TRIGG |
12a540 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
12a560 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
12a580 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
12a5a0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
12a5c0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
12a5e0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
12a600 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
12a620 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v>old.a;...INSER |
12a640 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
12a660 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
12a680 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
12a6a0 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
12a6c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
12a6e0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
12a700 | 6e 2d 31 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.6=old.a;.END;.INSERT.I |
12a720 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
12a740 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
12a760 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
12a780 | 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8f 25 04 00 8a 6d 43 52 45 41 54 45 | .WHERE.a=7;VACUUM..4.%...mCREATE |
12a7a0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
12a7c0 | 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.INTEGER.PRIMARY.KEY,.n.I |
12a7e0 | 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)WITHOUT.ROWID;.CREATE.TRIGGER |
12a800 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
12a820 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
12a840 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
12a860 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
12a880 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
12a8a0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c | ...DELETE.FROM.counts.WHERE.v<ol |
12a8c0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
12a8e0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v>old.a;...INSERT. |
12a900 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
12a920 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
12a940 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
12a960 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
12a980 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v<old.a.AN |
12a9a0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
12a9c0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
12a9e0 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
12aa00 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
12aa20 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
12aa40 | 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 24 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..4.$...mCREATE.TABLE.t |
12aa60 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
12aa80 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f | INTEGER.PRIMARY.KEY,.n.INT)WITHO |
12aaa0 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | UT.ROWID;.CREATE.TRIGGER.r1.AFTE |
12aac0 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
12aae0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
12ab00 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
12ab20 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
12ab40 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
12ab60 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v<old.a.AND. |
12ab80 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
12aba0 | 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v>old.a;...INSERT.INTO.cou |
12abc0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
12abe0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
12ac00 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
12ac20 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
12ac40 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.6=old.a.AND.n==1;. |
12ac60 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
12ac80 | 36 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | 6=old.a;.END;.INSERT.INTO.t1(a). |
12aca0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
12acc0 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
12ace0 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
12ad00 | 3b 0a 85 34 8f 23 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..4.#...mCREATE.TABLE.t1(a.INT) |
12ad20 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
12ad40 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY,.n.INT)WITHOUT.ROWID |
12ad60 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
12ad80 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
12ada0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
12adc0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
12ade0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
12ae00 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
12ae20 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v<old.a.AND.n==1;... |
12ae40 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
12ae60 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
12ae80 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
12aea0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.v=n+1;.END;. |
12aec0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
12aee0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
12af00 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
12af20 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
12af40 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
12af60 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
12af80 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 6f 77 65 72 28 31 29 3d 34 3b 0a | );.UPDATE.t1.SET.a=.lower(1)=4;. |
12afa0 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2b 8f 22 04 00 | DELETE.FROM.t1.WHERE.a=7;..+.".. |
12afc0 | 8a 5b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .[CREATE.TABLE.t1(a.INT);.CREATE |
12afe0 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.INTEGER.PRIMARY. |
12b000 | 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)WITHOUT.ROWID;.CREATE |
12b020 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
12b040 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
12b060 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
12b080 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
12b0a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
12b0c0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
12b0e0 | 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v<old.a.AND.n==1;...UPDATE.c |
12b100 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
12b120 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
12b140 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
12b160 | 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 20 67 6c 6f 62 28 31 2c 31 29 57 48 45 52 45 2b 31 | .UPDATE.SET.v=n.glob(1,1)WHERE+1 |
12b180 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
12b1a0 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
12b1c0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
12b1e0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
12b200 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
12b220 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
12b240 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
12b260 | 45 20 61 3d 34 3b 0a 3b 0a 85 2c 8f 21 04 00 8a 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | E.a=4;.;..,.!...]CREATE.TABLE.t1 |
12b280 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
12b2a0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 | NTEGER.PRIMARY.KEY,.n.INT)WITHOU |
12b2c0 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | T.ROWID;.CREATE.TRIGGER.r1.AFTER |
12b2e0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
12b300 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
12b320 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
12b340 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
12b360 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
12b380 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v<old.a.AND.n |
12b3a0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
12b3c0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
12b3e0 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
12b400 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 20 67 | .CONFLICT(v).DO.UPDATE.SET.v=n.g |
12b420 | 6c 6f 62 28 31 2c 31 29 45 53 43 41 50 45 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | lob(1,1)ESCAPE+1;.END;.CREATE.TR |
12b440 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
12b460 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
12b480 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
12b4a0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
12b4c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
12b4e0 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
12b500 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 3b 0a 85 34 8f 20 04 00 8a | .t1.SET.a=5.WHERE.a=4;.;..4..... |
12b520 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
12b540 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
12b560 | 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)WITHOUT.ROWID;.CREATE. |
12b580 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
12b5a0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
12b5c0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
12b5e0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
12b600 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
12b620 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
12b640 | 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v<old.a.AND.n==1;...UPDATE.co |
12b660 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v=old.a;... |
12b680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
12b6a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
12b6c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
12b6e0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
12b700 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
12b720 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 e3 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE..ounts.S |
12b740 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
12b760 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
12b780 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
12b7a0 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=5.WHERE.a=4;.DELETE.FR |
12b7c0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8f 1f 04 00 8a 7b 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..;.....{CREATE. |
12b7e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
12b800 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
12b820 | 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)WITHOUT.ROWID;.CREATE.TRIGGER. |
12b840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
12b860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
12b880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
12b8a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
12b8c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
12b8e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v<old |
12b900 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
12b920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
12b940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
12b960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
12b980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
12b9a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
12b9c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
12b9e0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
12ba00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
12ba20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
12ba40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
12ba60 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
12ba80 | 45 52 45 20 61 3d 37 3b 41 4e 41 4c 59 5a 45 0a 85 34 8f 1e 04 00 8a 6d 43 52 45 41 54 45 20 54 | ERE.a=7;ANALYZE..4.....mCREATE.T |
12baa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
12bac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
12bae0 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )WITHOUT.ROWID;.CREATE.TRIGGER.r |
12bb00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
12bb20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
12bb40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
12bb60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
12bb80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
12bba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
12bbc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
12bbe0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
12bc00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
12bc20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
12bc40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
12bc60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
12bc80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
12bca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
12bcc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
12bce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
12bd00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
12bd20 | 3d 35 20 57 48 45 52 45 20 61 3c 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a<4;.DELETE.FROM.t1.WHE |
12bd40 | 52 45 20 61 3d 37 3b 0a 85 34 8f 1d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
12bd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
12bd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 | TEGER.PRIMARY.KEY,.n.INT)WITHOUT |
12bda0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
12bdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
12bde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
12be00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
12be20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
12be40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
12be60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
12be80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
12bea0 | 45 52 45 20 76 2f 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v/old.a;...INSERT.INTO.count |
12bec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
12bee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
12bf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
12bf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
12bf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
12bf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
12bf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
12bfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
12bfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
12bfe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
12c000 | 0d 00 00 00 0b 02 42 00 1d 48 1a 90 17 d1 15 19 12 61 0f a9 0c f1 0a 55 07 b9 05 01 02 42 00 00 | ......B..H.......a.....U.....B.. |
12c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12c240 | 00 00 85 3b 8f 32 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ...;.2...{CREATE.TABLE.t1(a.INT) |
12c260 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v.INTEGER. |
12c280 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | PRIMARY.KEY,.n.INT)WITHOUT.ROWID |
12c2a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
12c2c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
12c2e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
12c300 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
12c320 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
12c340 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
12c360 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
12c380 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
12c3a0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
12c3c0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
12c3e0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
12c400 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
12c420 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
12c440 | 57 48 45 52 45 20 76 3d 20 6e 75 6c 6c 69 66 28 31 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a 20 | WHERE.v=.nullif(1,1)OR.true=N;.. |
12c460 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
12c480 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
12c4a0 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
12c4c0 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
12c4e0 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
12c500 | 0a 85 34 8f 31 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..4.1...mCREATE.TABLE.t1(a.INT); |
12c520 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
12c540 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY,.n.INT)WITHOUT.ROWID; |
12c560 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
12c580 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
12c5a0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
12c5c0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
12c5e0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
12c600 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
12c620 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
12c640 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f | PDATE.counts.SET.n=n-.upper(1)=o |
12c660 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
12c680 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
12c6a0 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
12c6c0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
12c6e0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
12c700 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
12c720 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
12c740 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
12c760 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
12c780 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
12c7a0 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8f 30 04 00 8a | ELETE.FROM.t1.WHERE.a=7;....0... |
12c7c0 | 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | 5CREATE.TABLE.t1(a.INT);.CREATE. |
12c7e0 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
12c800 | 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)WITHOUT.ROWID;.CREATE. |
12c820 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
12c840 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
12c860 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
12c880 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
12c8a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
12c8c0 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
12c8e0 | 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v=old.a.AND.n==1;...UPDATE.co |
12c900 | 75 6e 74 73 20 53 45 54 20 6e 3d 20 75 6e 69 63 6f 64 65 28 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=.unicode(1)=old.a;... |
12c920 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
12c940 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
12c960 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
12c980 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
12c9a0 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
12c9c0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
12c9e0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
12ca00 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
12ca20 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
12ca40 | 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8f 2f 04 00 8a 35 43 52 45 | .t1.SET.a=5.WHERE.a=4.../...5CRE |
12ca60 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
12ca80 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
12caa0 | 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)WITHOUT.ROWID;.CREATE.TRIG |
12cac0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
12cae0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
12cb00 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
12cb20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
12cb40 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
12cb60 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
12cb80 | 3d 6f 49 44 2d 45 44 49 41 54 45 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =oID-EDIATEn==1;...UPDATE.counts |
12cba0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
12cbc0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
12cbe0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
12cc00 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
12cc20 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
12cc40 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
12cc60 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
12cc80 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
12cca0 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
12ccc0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
12cce0 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 34 8f 2e 04 00 8a 6d 43 52 45 41 54 45 20 | SET.a=5.WHERE.a=4.4.....mCREATE. |
12cd00 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
12cd20 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
12cd40 | 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)WITHOUT.ROWID;.CREATE.TRIGGER. |
12cd60 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
12cd80 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
12cda0 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
12cdc0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
12cde0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
12ce00 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 52 | ..DELETE.FROM.counts.WHERE.v=CUR |
12ce20 | 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | RENT_TIME=1;...UPDATE.counts.SET |
12ce40 | 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=CURRENT_TIMESTAMP;...INSERT.I |
12ce60 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
12ce80 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
12cea0 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
12cec0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
12cee0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
12cf00 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
12cf20 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
12cf40 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
12cf60 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
12cf80 | 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a+4;.DELETE.FROM.t1.WH |
12cfa0 | 45 52 45 20 61 3d 37 3b 0a 85 34 8f 2d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..4.-...mCREATE.TABLE.t1 |
12cfc0 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a.INT);.CREATE.TABLE.counts(v.I |
12cfe0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 | NTEGER.PRIMARY.KEY,.n.INT)WITHOU |
12d000 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | T.ROWID;.CREATE.TRIGGER.r1.AFTER |
12d020 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
12d040 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
12d060 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
12d080 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
12d0a0 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
12d0c0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v<old.a.AND.n |
12d0e0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.v=n-1.W |
12d100 | 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v>old.a;...INSERT.INTO.coun |
12d120 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
12d140 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
12d160 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
12d180 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
12d1a0 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
12d1c0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
12d1e0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
12d200 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
12d220 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
12d240 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
12d260 | 0a 85 34 8f 2c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b | ..4.,...mCREATE.TABLE.t1(a.INT); |
12d280 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 | .CREATE.TABLE.counts(v.INTEGER.P |
12d2a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY,.n.INT)WITHOUT.ROWID; |
12d2c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
12d2e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
12d300 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
12d320 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
12d340 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
12d360 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
12d380 | 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v<old.a.AND.n==1;...U |
12d3a0 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.v=n-1.WHERE.v=o |
12d3c0 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
12d3e0 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
12d400 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.v=n+1;.END;.C |
12d420 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
12d440 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
12d460 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
12d480 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
12d4a0 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
12d4c0 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
12d4e0 | 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 | ;.UPDATE.t1.SET.a=5.WHERE.a=4;.D |
12d500 | 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 2b 04 00 8a | ELETE.FROM.t1.WHERE.a=7;..4.+... |
12d520 | 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | mCREATE.TABLE.t1(a.INT);.CREATE. |
12d540 | 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | TABLE.counts(v.INTEGER.PRIMARY.K |
12d560 | 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | EY,.n.INT)WITHOUT.ROWID;.CREATE. |
12d580 | 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r1.AFTER.INSERT.ON.t1.BE |
12d5a0 | 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 | GIN...INSERT.INTO.counts(v,n).VA |
12d5c0 | 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | LUES(new.a,1).......ON.CONFLICT( |
12d5e0 | 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 | v).DO.UPDATE.SET.n=n+1;.END;.CRE |
12d600 | 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 | ATE.TRIGGER.r2.AFTER.UPDATE.ON.t |
12d620 | 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 | 1.BEGIN...DELETE.FROM.counts.WHE |
12d640 | 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f | RE.v<old.a.AND.n==1;...UPDATE.co |
12d660 | 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 | unts.SET.n=n-1.WHERE.v>old.a;... |
12d680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
12d6a0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
12d6c0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
12d6e0 | 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r3.AFTER.DELETE.ON.t1.BEGI |
12d700 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f | N...DELETE.FROM.counts.WHERE.v=o |
12d720 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
12d740 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 | ET.n=n-1.WHERE.v=old.a;.END;.INS |
12d760 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 | ERT.INTO.t1(a).VALUES(1),(2),(1) |
12d780 | 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 | ,(3),(1),(3),(2),(4),(7);.UPDATE |
12d7a0 | 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 | .t1.SET.a=52001-01-01;.DELETE.FR |
12d7c0 | 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8f 2a 04 00 8a 7b 43 52 45 41 54 45 20 | OM.t1.WHERE.a=7;..;.*...{CREATE. |
12d7e0 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a.INT);.CREATE.TABLE.co |
12d800 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
12d820 | 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)WITHOUT.ROWID;.CREATE.TRIGGER. |
12d840 | 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
12d860 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
12d880 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
12d8a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
12d8c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
12d8e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v<old |
12d900 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
12d920 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v>old.a;...INSERT.I |
12d940 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
12d960 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
12d980 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
12d9a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
12d9c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
12d9e0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
12da00 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
12da20 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
12da40 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
12da60 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
12da80 | 45 52 45 20 61 3d 37 3b 52 45 49 4e 44 45 58 0a 85 34 8f 29 04 00 8a 6d 43 52 45 41 54 45 20 54 | ERE.a=7;REINDEX..4.)...mCREATE.T |
12daa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
12dac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
12dae0 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )WITHOUT.ROWID;.CREATE.TRIGGER.r |
12db00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
12db20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
12db40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
12db60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
12db80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
12dba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
12dbc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
12dbe0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v>old.a;...INSERT.IN |
12dc00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
12dc20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
12dc40 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
12dc60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
12dc80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
12dca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
12dcc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
12dce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
12dd00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
12dd20 | 3d 35 20 57 48 45 52 45 20 61 3d 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=1;.DELETE.FROM.t1.WHE |
12dd40 | 52 45 20 61 3d 37 3b 0a 85 34 8f 28 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.(...mCREATE.TABLE.t1( |
12dd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
12dd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 | TEGER.PRIMARY.KEY,.n.INT)WITHOUT |
12dda0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
12ddc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
12dde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
12de00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
12de20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
12de40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
12de60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
12de80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
12dea0 | 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v>old.a;...INSERT.INTO.count |
12dec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
12dee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
12df00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
12df20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
12df40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
12df60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
12df80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
12dfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
12dfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 32 30 30 31 2d 30 31 | (4),(7);.UPDATE.t1.SET.a=2001-01 |
12dfe0 | 2d 30 31 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | -014;.DELETE.FROM.t1.WHERE.a=7;. |
12e000 | 0d 00 00 00 0b 02 7c 00 1d 48 1a b0 17 f8 15 5c 12 c0 10 20 0d 68 0a b0 07 f4 05 38 02 7c 00 00 | ......|..H.....\.....h.....8.|.. |
12e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
12e260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 38 8f 3d | .............................8.= |
12e280 | 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...uCREATE.TABLE.t1(a.INT);.CREA |
12e2a0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
12e2c0 | 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | Y.KEY,.n,I,T)WITHOUT.ROWID;.CREA |
12e2e0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
12e300 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
12e320 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 20 31 3d 31 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | .VALUES(new.a,.1=11).......ON.CO |
12e340 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
12e360 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
12e380 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
12e3a0 | 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v<old.a.AND.n==1;...UP |
12e3c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
12e3e0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
12e400 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
12e420 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
12e440 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
12e460 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
12e480 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
12e4a0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
12e4c0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
12e4e0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
12e500 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
12e520 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8f 3c 04 00 8a 75 | LETE.FROM.t1.WHERE.a=7;..8.<...u |
12e540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
12e560 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
12e580 | 59 2c 20 6e 20 61 2c 62 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | Y,.n.a,b,I,T)WITHOUT.ROWID;.CREA |
12e5a0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
12e5c0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
12e5e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
12e600 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
12e620 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
12e640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
12e660 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.n==1;...UPDATE |
12e680 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
12e6a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
12e6c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
12e6e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
12e700 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
12e720 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
12e740 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
12e760 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
12e780 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
12e7a0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
12e7c0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
12e7e0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8f 3b 04 00 8a 75 43 52 45 41 | .FROM.t1.WHERE.a=7;..8.;...uCREA |
12e800 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
12e820 | 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.INTEGER.PRIMARY.KEY,.n |
12e840 | 20 61 2c 62 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | .a,b.INT)/*WUT.ROWID*/;.CREATE.T |
12e860 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
12e880 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
12e8a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
12e8c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
12e8e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
12e900 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
12e920 | 45 20 76 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=CURRENT_TIME=1;...UPDATE.cou |
12e940 | 6e 74 73 20 53 45 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 | nts.SET.n=CURRENT_TIMESTAMP;...I |
12e960 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
12e980 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
12e9a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
12e9c0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
12e9e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
12ea00 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
12ea20 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
12ea40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
12ea60 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
12ea80 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a+4;.DELETE.FRO |
12eaa0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 3a 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.:...mCREATE.T |
12eac0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
12eae0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
12eb00 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )WITHOUT.ROWID;.CREATE.TRIGGER.r |
12eb20 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
12eb40 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
12eb60 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
12eb80 | 41 54 45 20 53 45 54 20 6e 3d 6e 3c 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n<1;.END;.CREATE.TRIGG |
12eba0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
12ebc0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
12ebe0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
12ec00 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
12ec20 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
12ec40 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
12ec60 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
12ec80 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
12eca0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
12ecc0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
12ece0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
12ed00 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
12ed20 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
12ed40 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
12ed60 | 52 45 20 61 3d 37 3b 0a 85 34 8f 39 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.9...mCREATE.TABLE.t1( |
12ed80 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
12eda0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 | TEGER.PRIMARY.KEY,.n.INT)WITHOUT |
12edc0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
12ede0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
12ee00 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
12ee20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
12ee40 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
12ee60 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
12ee80 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 4f 52 20 66 61 6c | FROM.counts.WHERE.v=old.a.OR.fal |
12eea0 | 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | se;...UPDATE.counts.SET.n=n-1.WH |
12eec0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
12eee0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
12ef00 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
12ef20 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
12ef40 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
12ef60 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 4f 52 20 66 61 6c 73 65 3b 0a 20 20 | ounts.WHERE.v=old.a.OR.false;... |
12ef80 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
12efa0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
12efc0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
12efe0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
12f000 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
12f020 | 85 1c 8f 38 04 00 8a 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...8...=CREATE.TABLE.t1(a.INT);. |
12f040 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
12f060 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY,.n.INT)WITHOUT.ROWID;. |
12f080 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
12f0a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
12f0c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
12f0e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
12f100 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
12f120 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
12f140 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
12f160 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 20 75 70 70 65 72 28 31 29 3d 6f 6c | DATE.counts.SET.v=n-.upper(1)=ol |
12f180 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
12f1a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
12f1c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
12f1e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
12f200 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
12f220 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
12f240 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
12f260 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
12f280 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
12f2a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
12f2c0 | 85 18 8f 37 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | ...7...5CREATE.TABLE.t1(a.INT);. |
12f2e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v.INTEGER.PR |
12f300 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | IMARY.KEY,.n.INT)WITHOUT.ROWID;. |
12f320 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
12f340 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
12f360 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
12f380 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
12f3a0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
12f3c0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
12f3e0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
12f400 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2b 67 6c 6f 62 28 31 2c 31 29 3d 6f 6c | DATE.counts.SET.v=n+glob(1,1)=ol |
12f420 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
12f440 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
12f460 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
12f480 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
12f4a0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
12f4c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
12f4e0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
12f500 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
12f520 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
12f540 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 18 8f 36 | .UPDATE.t1.SET.a=5.WHERE.a=4...6 |
12f560 | 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...5CREATE.TABLE.t1(a.INT);.CREA |
12f580 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
12f5a0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | Y.KEY,.n.INT)WITHOUT.ROWID;.CREA |
12f5c0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
12f5e0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
12f600 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
12f620 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
12f640 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
12f660 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
12f680 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
12f6a0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 31 2c 31 29 3b | .counts.SET.v=.json_remove(1,1); |
12f6c0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
12f6e0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
12f700 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
12f720 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
12f740 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
12f760 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
12f780 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
12f7a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
12f7c0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
12f7e0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 34 8f 35 04 00 8a 6d | ATE.t1.SET.a=5.WHERE.a=4.4.5...m |
12f800 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
12f820 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.INTEGER.PRIMARY.KE |
12f840 | 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)WITHOUT.ROWID;.CREATE.T |
12f860 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
12f880 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
12f8a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
12f8c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
12f8e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
12f900 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
12f920 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
12f940 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
12f960 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
12f980 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
12f9a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
12f9c0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
12f9e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
12fa00 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
12fa20 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
12fa40 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
12fa60 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
12fa80 | 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=52001-01-01;.DELETE.FRO |
12faa0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 14 8f 34 04 00 8a 2d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;....4...-CREATE.T |
12fac0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
12fae0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v.INTEGER.PRIMARY.KEY,.n.INT |
12fb00 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )WITHOUT.ROWID;.CREATE.TRIGGER.r |
12fb20 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
12fb40 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
12fb60 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
12fb80 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
12fba0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
12fbc0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
12fbe0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
12fc00 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
12fc20 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
12fc40 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
12fc60 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
12fc80 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
12fca0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
12fcc0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
12fce0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
12fd00 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
12fd20 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
12fd40 | 3d 30 20 41 4e 44 20 74 85 34 8f 33 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | =0.AND.t.4.3...mCREATE.TABLE.t1( |
12fd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
12fd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 57 49 54 48 4f 55 54 | TEGER.PRIMARY.KEY,.n.INT)WITHOUT |
12fda0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
12fdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
12fde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
12fe00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
12fe20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
12fe40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
12fe60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
12fe80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
12fea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
12fec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
12fee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
12ff00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
12ff20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
12ff40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
12ff60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 72 61 6e 64 6f 6d 28 29 3d | UPDATE.counts.SET.n=n-.random()= |
12ff80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
12ffa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
12ffc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
12ffe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 | .a=4;.DELETE.FROM.t1.NOT.INDEXED |
130000 | 0d 00 00 00 0b 02 05 00 1d 48 1a 90 17 d5 15 13 12 5b 0f 9d 0c e5 0a 2d 07 75 04 bd 02 05 00 00 | .........H.......[.....-.u...... |
130020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1300a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1300c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1300e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1301a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1301c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1301e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
130200 | 00 00 00 00 00 85 34 8f 48 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ......4.H...mCREATE.TABLE.t1(a.I |
130220 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
130240 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n,INT)/*WUT.ROWI |
130260 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
130280 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
1302a0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
1302c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
1302e0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
130300 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
130320 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v=old.a.AND.n==1; |
130340 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 20 75 70 70 65 72 28 | ...UPDATE.counts.SET.n=n-.upper( |
130360 | 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | 1)=old.a;...INSERT.INTO.counts(v |
130380 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
1303a0 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
1303c0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
1303e0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
130400 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
130420 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
130440 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
130460 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
130480 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
1304a0 | 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f | 4;.DELETE.FROM.t1.WHERE.a=7;..4. |
1304c0 | 47 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | G...mCREATE.TABLE.t1(a.INT);.CRE |
1304e0 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
130500 | 52 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RY.KEY,.n,I,T)WITHOUT.ROWID;.CRE |
130520 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
130540 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
130560 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
130580 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
1305a0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
1305c0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
1305e0 | 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v<old.a.AND.n==1;...UPDAT |
130600 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
130620 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
130640 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
130660 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.v=n+1;.END;.CREAT |
130680 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
1306a0 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
1306c0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
1306e0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
130700 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
130720 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
130740 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
130760 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 46 04 00 8a 6d 43 52 45 | E.FROM.t1.WHERE.a=7;..4.F...mCRE |
130780 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
1307a0 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
1307c0 | 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n,I,T)WITHOUT.ROWID;.CREATE.TRIG |
1307e0 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
130800 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
130820 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
130840 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
130860 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
130880 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
1308a0 | 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | <old.a.AND.n==1;...UPDATE.counts |
1308c0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
1308e0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
130900 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
130920 | 54 45 20 53 45 54 20 74 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.t=n+1;.END;.CREATE.TRIGGE |
130940 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
130960 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
130980 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
1309a0 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
1309c0 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
1309e0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
130a00 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 | SET.a=5.WHERE.a=4;.DELETE.FROM.t |
130a20 | 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 45 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c | 1.WHERE.a=7;..4.E...mCREATE.TABL |
130a40 | 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | E.t1(a.INT);.CREATE.TABLE.counts |
130a60 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 | (v.INTEGER.PRIMARY.KEY,.n,I,T)WI |
130a80 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | THOUT.ROWID;.CREATE.TRIGGER.r1.A |
130aa0 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
130ac0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
130ae0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
130b00 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
130b20 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
130b40 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v<old.a.A |
130b60 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
130b80 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
130ba0 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
130bc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
130be0 | 3d 6e 2b 49 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+I;.END;.CREATE.TRIGGER.r3.AFT |
130c00 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
130c20 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
130c40 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
130c60 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
130c80 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
130ca0 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
130cc0 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
130ce0 | 61 3d 37 3b 0a 85 34 8f 44 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..4.D...mCREATE.TABLE.t1(a.I |
130d00 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
130d20 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f | ER.PRIMARY.KEY,.n,I,T)WITHOUT.RO |
130d40 | 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | WID;.CREATE.TRIGGER.r1.AFTER.INS |
130d60 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
130d80 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 | unts(v,n).VALUES(new.a,1)....... |
130da0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e | ON.CONFLICT(v).DO.UPDATE.SET.n=n |
130dc0 | 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 | +1;.END;.CREATE.TRIGGER.r2.AFTER |
130de0 | 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f | .UPDATE.ON.t1.BEGIN...DELETE.FRO |
130e00 | 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b | M.counts.WHERE.v<old.a.AND.n==1; |
130e20 | 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 | ...UPDATE.counts.SET.n=n-1.WHERE |
130e40 | 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 | .v=old.a;...INSERT.INTO.counts(v |
130e60 | 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e | ,n).VALUES(new.a,1).......ON.CON |
130e80 | 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e | FLICT(v).DO.UPDATE.SET.n=n+1;.EN |
130ea0 | 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 | D;.CREATE.TRIGGER.r3.AFTER.DELET |
130ec0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e | E.ON.t1.BEGIN...DELETE.FROM.coun |
130ee0 | 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 | ts.WHERE.v=old.a.AND.n==1;...UPD |
130f00 | 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ATE.counts.SET.n=n-1.WHERE.v=old |
130f20 | 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 | .a;.END;.INSERT.INTO.t1(a).VALUE |
130f40 | 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 | S(1),(2),(1),(3),(1),(3),(2),(4) |
130f60 | 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d | ,(7);.UPDATE.t1.SET.a=5.WHERE.a= |
130f80 | 34 3b 41 4e 41 4c 59 5a 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8f | 4;ANALYZE.FROM.t1.WHERE.a=7;..:. |
130fa0 | 43 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 | C...yCREATE.TABLE.t1(a.INT);.CRE |
130fc0 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
130fe0 | 52 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RY.KEY,.n,I,T)WITHOUT.ROWID;.CRE |
131000 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
131020 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
131040 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
131060 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
131080 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
1310a0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
1310c0 | 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v<old.a.AND.n==1;...UPDAT |
1310e0 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
131100 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
131120 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
131140 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
131160 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
131180 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
1311a0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
1311c0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
1311e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
131200 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
131220 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
131240 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 8f 42 04 | E.FROM.t1.WHERE.a=7;VACUUM..4.B. |
131260 | 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..mCREATE.TABLE.t1(a.INT);.CREAT |
131280 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v.INTEGER.PRIMARY |
1312a0 | 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | .KEY,.n,I,T)WITHOUT.ROWID;.CREAT |
1312c0 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
1312e0 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
131300 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
131320 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
131340 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
131360 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
131380 | 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v<old.a.AND.n==1;...UPDATE. |
1313a0 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
1313c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
1313e0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
131400 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
131420 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
131440 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
131460 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
131480 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
1314a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
1314c0 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
1314e0 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
131500 | 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e 8f 41 04 00 8b 01 43 52 45 41 54 | FROM.t1.WHERE.a=7;..>.A....CREAT |
131520 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
131540 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c | counts(v.INTEGER.PRIMARY.KEY,.n, |
131560 | 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | I,T)WITHOUT.ROWID;.CREATE.TRIGGE |
131580 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
1315a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
1315c0 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
1315e0 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
131600 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
131620 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f | N...DELETE.FROM.counts.WHERE.v<o |
131640 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
131660 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
131680 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
1316a0 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
1316c0 | 20 53 45 54 20 6e 3d 6e 20 67 6c 6f 62 28 31 2c 31 29 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .SET.n=n.glob(1,1)+1;.END;.CREAT |
1316e0 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
131700 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
131720 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
131740 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
131760 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
131780 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
1317a0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
1317c0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 37 8f 40 04 00 8a 73 43 52 45 | E.FROM.t1.WHERE.a=7;..7.@...sCRE |
1317e0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a.INT);.CREATE.TABL |
131800 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
131820 | 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n,I,T)WITHOUT.ROWID;.CREATE.TRIG |
131840 | 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
131860 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
131880 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
1318a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
1318c0 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
1318e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
131900 | 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | <old.a.AND.n==1;...UPDATE.counts |
131920 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
131940 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
131960 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
131980 | 54 45 20 53 45 54 20 6e 3d 6e 20 2d 31 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | TE.SET.n=n.-1+1;.END;.CREATE.TRI |
1319a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1319c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
1319e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
131a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
131a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
131a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
131a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
131a80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 3f 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.?...mCREATE.T |
131aa0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
131ac0 | 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 | nts(v.INTEGER.PRIMARY.KEY,.n,I,T |
131ae0 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )WITHOUT.ROWID;.CREATE.TRIGGER.r |
131b00 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
131b20 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
131b40 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
131b60 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
131b80 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
131ba0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
131bc0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
131be0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
131c00 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
131c20 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
131c40 | 54 20 6e 3d 69 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=i+1;.END;.CREATE.TRIGGER.r3. |
131c60 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
131c80 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
131ca0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
131cc0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
131ce0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
131d00 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
131d20 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
131d40 | 52 45 20 61 3d 37 3b 0a 85 34 8f 3e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.>...mCREATE.TABLE.t1( |
131d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
131d80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 2c 54 29 57 49 54 48 4f 55 54 | TEGER.PRIMARY.KEY,.n,I,T)WITHOUT |
131da0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
131dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
131de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
131e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
131e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
131e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
131e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
131e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
131ea0 | 45 52 45 20 36 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.6=old.a;...INSERT.INTO.count |
131ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
131ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
131f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
131f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
131f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
131f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
131f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
131fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
131fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
131fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
132000 | 0d 00 00 00 0c 00 a5 00 1d 45 1a 8a 17 ce 15 16 12 5e 0f a6 0c ee 0a 36 07 7e 05 6e 02 b6 00 a5 | .........E.......^.....6.~.n.... |
132020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
132040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
132060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
132080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1320a0 | 00 00 00 00 00 84 0d 8f 54 04 00 88 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | ........T....CREATE.TABLE.t1(a.I |
1320c0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 56 | NT);.CREATE.TABLE.counts(v.INTEV |
1320e0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | ER.PRIMARY.KEY,.n.INT)/*WUT.ROWI |
132100 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
132120 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
132140 | 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | unts(v,n).WITH.c(x).AS.(values(1 |
132160 | 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 45 58 43 45 50 54 20 56 41 4c 55 45 53 | ))..VALUES(new.a,1)EXCEPT.VALUES |
132180 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
1321a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
1321c0 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
1321e0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
132200 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
132220 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
132240 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
132260 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(4),(7);.UPDA |
132280 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 69 | TE.t1.SET.a=5.WHERE.a=4;.DELETEi |
1322a0 | 6d 65 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 53 04 00 8a 6d 43 52 | me.FROM.t1.WHERE.a=7;..4.S...mCR |
1322c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
1322e0 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 a0 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
132300 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
132320 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.UPDATE.ON.t1.BEGIN |
132340 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
132360 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
132380 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
1323a0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
1323c0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
1323e0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
132400 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
132420 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
132440 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
132460 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
132480 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
1324a0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
1324c0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
1324e0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
132500 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
132520 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
132540 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
132560 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 84 0c 8f 52 04 00 88 1d 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....R....CREATE.TAB |
132580 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
1325a0 | 73 28 76 20 49 4e 54 45 47 45 52 a0 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v.INTEGER.PRIMARY.KEY,.n.INT)/ |
1325c0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
1325e0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
132600 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
132620 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
132640 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
132660 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
132680 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
1326a0 | 41 4e 44 20 6e 3d 3d 31 3c 8a 20 20 55 50 44 41 54 45 20 63 6f 75 45 20 46 52 4f 4d 20 63 6f 75 | AND.n==1<...UPDATE.couE.FROM.cou |
1326c0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
1326e0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
132700 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
132720 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
132740 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
132760 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 | =4;.DELETE.FROM.t1.WHERE.a=7;..4 |
132780 | 8f 51 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .Q...mCREATE.TABLE.t1(a.INT);.CR |
1327a0 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 a0 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
1327c0 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
1327e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
132800 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
132820 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
132840 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
132860 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
132880 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1328a0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
1328c0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
1328e0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
132900 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
132920 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
132940 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
132960 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
132980 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
1329a0 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
1329c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
1329e0 | 29 2c 28 31 29 2c 28 b3 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(.),(1),(3),(2),(4),(7);.U |
132a00 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
132a20 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 50 04 00 8a 6d 43 52 | TE.FROM.t1.WHERE.a=7;..4.P...mCR |
132a40 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
132a60 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 a0 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
132a80 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
132aa0 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
132ac0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
132ae0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
132b00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
132b20 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
132b40 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
132b60 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
132b80 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
132ba0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
132bc0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
132be0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
132c00 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
132c20 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
132c40 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
132c60 | 6e 3d 6e 2d 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | n=n-.json_replace(1,1,1);.INSERT |
132c80 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
132ca0 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
132cc0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
132ce0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 4f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..4.O...mCREATE.TAB |
132d00 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
132d20 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 | s(v.INTEGER.PRIMARY.KEY,.n,INT)W |
132d40 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | ITHOUT.ROWID;.CREATE.TRIGGER.r1. |
132d60 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
132d80 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
132da0 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
132dc0 | 45 20 53 45 54 20 6e 3d 6e 3c 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n<1;.END;.CREATE.TRIGGER |
132de0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
132e00 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v<old.a. |
132e20 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
132e40 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
132e60 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
132e80 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
132ea0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
132ec0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
132ee0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
132f00 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
132f20 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
132f40 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
132f60 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
132f80 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
132fa0 | 20 61 3d 37 3b 0a 85 34 8f 4e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.N...mCREATE.TABLE.t1(a. |
132fc0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 | INT);.CREATE.TABLE.counts(v.INTE |
132fe0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 49 54 48 4f 55 54 20 52 | GER.PRIMARY.KEY,.n,INT)WITHOUT.R |
133000 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | OWID;.CREATE.TRIGGER.r1.AFTER.IN |
133020 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
133040 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
133060 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
133080 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
1330a0 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
1330c0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v<old.a.AND.n==1 |
1330e0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
133100 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
133120 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
133140 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 76 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.v=n+1;.E |
133160 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
133180 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
1331a0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
1331c0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
1331e0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
133200 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
133220 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
133240 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 | =4;.DELETE.FROM.t1.WHERE.a=7;..4 |
133260 | 8f 4d 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .M...mCREATE.TABLE.t1(a.INT);.CR |
133280 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
1332a0 | 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | ARY.KEY,.n,INT)WITHOUT.ROWID;.CR |
1332c0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
1332e0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
133300 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
133320 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
133340 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
133360 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
133380 | 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v<old.a.AND.n==1;...UPDA |
1333a0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
1333c0 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
1333e0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
133400 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
133420 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
133440 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
133460 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
133480 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
1334a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
1334c0 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
1334e0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 72 6f 75 6e 64 28 31 2c 31 29 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=.round(1,1);.DELE |
133500 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 4c 04 00 8a 6d 43 52 | TE.FROM.t1.WHERE.a=7;..4.L...mCR |
133520 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
133540 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v.INTEGER.PRIMARY.KEY, |
133560 | 20 6e 2c 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n,INT)WITHOUT.ROWID;.CREATE.TRI |
133580 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
1335a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
1335c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
1335e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
133600 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.UPDATE.ON.t1.B |
133620 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
133640 | 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v<old.a.AND.n==1;...UPDATE.count |
133660 | 73 20 53 45 54 20 6e 3d 20 6c 74 72 69 6d 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=.ltrim(1,1)=old.a;...INS |
133680 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
1336a0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
1336c0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
1336e0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
133700 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
133720 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
133740 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
133760 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
133780 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
1337a0 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
1337c0 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8f 4b 04 00 8a 75 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..8.K...uCREATE.TAB |
1337e0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
133800 | 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 | s(v.INTEGER.PRIMARY.KEY,.n,INT)W |
133820 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | ITHOUT.ROWID;.CREATE.TRIGGER.r1. |
133840 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
133860 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
133880 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
1338a0 | 45 20 53 45 54 20 6e 3d 6e 2b 20 31 3d 31 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | E.SET.n=n+.1=11;.END;.CREATE.TRI |
1338c0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
1338e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c | ...DELETE.FROM.counts.WHERE.v<ol |
133900 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
133920 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
133940 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
133960 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
133980 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
1339a0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
1339c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
1339e0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
133a00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
133a20 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
133a40 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
133a60 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
133a80 | 48 45 52 45 20 61 3d 37 3b 0a 85 37 8f 4a 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..7.J...sCREATE.TABLE.t |
133aa0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
133ac0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 49 54 48 4f | INTEGER.PRIMARY.KEY,.n,INT)WITHO |
133ae0 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | UT.ROWID;.CREATE.TRIGGER.r1.AFTE |
133b00 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
133b20 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 20 2d 31 | TO.counts(v,n).VALUES(new.a,1.-1 |
133b40 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
133b60 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
133b80 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
133ba0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v<old.a.A |
133bc0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
133be0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
133c00 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
133c20 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
133c40 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
133c60 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
133c80 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
133ca0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
133cc0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
133ce0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
133d00 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
133d20 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
133d40 | 61 3d 37 3b 0a 85 37 8f 49 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;..7.I...sCREATE.TABLE.t1(a.I |
133d60 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 | NT);.CREATE.TABLE.counts(v.INTEG |
133d80 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 49 54 48 4f 55 54 20 52 4f | ER.PRIMARY.KEY,.n,INT)WITHOUT.RO |
133da0 | 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | WID;.CREATE.TRIGGER.r1.AFTER.INS |
133dc0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
133de0 | 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 20 2d 31 2c 31 29 0a 20 20 20 | unts(v,n).VALUES(new.a.-1,1).... |
133e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
133e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
133e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
133e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
133e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
133ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
133ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
133ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
133f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
133f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
133f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
133f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
133f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
133fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
133fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
133fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
134000 | 0d 00 00 00 0b 02 68 00 1d 48 1a ac 17 f4 15 3c 12 84 0f e4 0d 2c 0a 74 07 d8 05 20 02 68 00 00 | ......h..H.....<.....,.t.....h.. |
134020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1340a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1340c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1340e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1341a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1341c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1341e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
134260 | 00 00 00 00 00 00 00 00 85 34 8f 5f 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .........4._...mCREATE.TABLE.t1( |
134280 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 63 68 | a.INT);.CREATE.TABLE.counts(v.ch |
1342a0 | 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | ar(1).PRIMARY.KEY,.n.INT)/*WUT.R |
1342c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
1342e0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
134300 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
134320 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
134340 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
134360 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
134380 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 76 3d | FROM.counts.WHERE.random()AND.v= |
1343a0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
1343c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
1343e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
134400 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
134420 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
134440 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
134460 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
134480 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
1344a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
1344c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
1344e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 6f 77 65 72 28 | (4),(7);.UPDATE.t1.SET.a=.lower( |
134500 | 31 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | 1)=4;.DELETE.FROM.t1.WHERE.a=7;. |
134520 | 85 34 8f 5e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.^...mCREATE.TABLE.t1(a.INT);. |
134540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 63 68 61 72 28 31 29 20 50 52 | CREATE.TABLE.counts(v.char(1).PR |
134560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
134580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
1345a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
1345c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
1345e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
134600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
134620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
134640 | 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.random()AND.n==1;...UP |
134660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
134680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
1346a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
1346c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
1346e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
134700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
134720 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
134740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
134760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
134780 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
1347a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 37 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=7.WHERE.a-4;.DE |
1347c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8f 5d 04 00 8a 35 | LETE.FROM.t1.WHERE.a=7;....]...5 |
1347e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
134800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v.blobGER.PRIMARY.KE |
134820 | 59 2c 20 6e 2c 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n,INT)/*WUT.ROWID*/;.CREATE.T |
134840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
134860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
134880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
1348a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1348c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
1348e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
134900 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
134920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c e4 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=ol..a;...I |
134940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
134960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
134980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1349a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1349c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
1349e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
134a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
134a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
134a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
134a60 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 34 8f 5c 04 00 8a 6d 43 52 45 41 | t1.SET.a=5.WHERE.a=4.4.\...mCREA |
134a80 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
134aa0 | 20 63 6f 75 6e 74 73 28 76 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.blobGER.PRIMARY.KEY,.n |
134ac0 | 2c 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ,INT)/*WUT.ROWID*/;.CREATE.TRIGG |
134ae0 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
134b00 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
134b20 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
134b40 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
134b60 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
134b80 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
134ba0 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
134bc0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v=old.a;...INSER |
134be0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
134c00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
134c20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
134c40 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
134c60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
134c80 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
134ca0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
134cc0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
134ce0 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
134d00 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
134d20 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 5b 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..4.[...mCREATE.TABLE |
134d40 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
134d60 | 76 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.blobGER.PRIMARY.KEY,.n.INT)/*W |
134d80 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
134da0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
134dc0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
134de0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
134e00 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
134e20 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
134e40 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
134e60 | 44 20 76 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.v==N;...UPDATE.counts.SET.n=n- |
134e80 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
134ea0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
134ec0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
134ee0 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
134f00 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
134f20 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
134f40 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
134f60 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
134f80 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
134fa0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
134fc0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
134fe0 | 3d 37 3b 0a 85 1c 8f 5a 04 00 8a 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;....Z...=CREATE.TABLE.t1(a.IN |
135000 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 62 6c 6f 62 47 45 | T);.CREATE.TABLE.counts(v.blobGE |
135020 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
135040 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
135060 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
135080 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
1350a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
1350c0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
1350e0 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
135100 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
135120 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
135140 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
135160 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
135180 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
1351a0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
1351c0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
1351e0 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
135200 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
135220 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
135240 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
135260 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 4d 41 54 43 48 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.MATCH.a=4 |
135280 | 3b 0a 44 45 85 34 8f 59 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | ;.DE.4.Y...mCREATE.TABLE.t1(a.IN |
1352a0 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 62 6c 6f 62 47 45 | T);.CREATE.TABLE.counts(v.blobGE |
1352c0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
1352e0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
135300 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
135320 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
135340 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
135360 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
135380 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
1353a0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v<old.a.AND.n==1;. |
1353c0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
1353e0 | 76 3c 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v<old.a;...INSERT.INTO.counts(v, |
135400 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
135420 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
135440 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
135460 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
135480 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
1354a0 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
1354c0 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
1354e0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
135500 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 41 | (7);.UPDATE.t1.SET.a=5.WHERE.a=A |
135520 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 58 | ;.DELETE.FROM.t1.WHERE.a=7;..4.X |
135540 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
135560 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.blobGER.PRIMAR |
135580 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
1355a0 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
1355c0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
1355e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
135600 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
135620 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
135640 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
135660 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.n==1;...UPDATE |
135680 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v<old.a; |
1356a0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
1356c0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
1356e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
135700 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
135720 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
135740 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
135760 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v<old.a;.END;. |
135780 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
1357a0 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
1357c0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
1357e0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 57 04 00 8a 6d 43 52 45 41 | .FROM.t1.WHERE.a=7;..4.W...mCREA |
135800 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
135820 | 20 63 6f 75 6e 74 73 28 76 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v.blobGER.PRIMARY.KEY,.n |
135840 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
135860 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
135880 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
1358a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
1358c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
1358e0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
135900 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
135920 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
135940 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v<old.a;...INSER |
135960 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
135980 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
1359a0 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
1359c0 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
1359e0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 36 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.6=old.a. |
135a00 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
135a20 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
135a40 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
135a60 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
135a80 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
135aa0 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 8f 56 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;....V...5CREATE.TABLE |
135ac0 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
135ae0 | 76 20 54 45 58 54 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v.TEXTGER.PRIMARY.KEY,.n.INT)/*W |
135b00 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
135b20 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
135b40 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
135b60 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
135b80 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
135ba0 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
135bc0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
135be0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
135c00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c e4 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=ol..a;...INSERT.INTO.c |
135c20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
135c40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
135c60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
135c80 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
135ca0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
135cc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
135ce0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
135d00 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
135d20 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
135d40 | 48 45 52 45 20 61 3d 34 85 34 8f 55 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | HERE.a=4.4.U...mCREATE.TABLE.t1( |
135d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e | a.INT);.CREATE.TABLE.counts(v.IN |
135d80 | 54 ff ff ff ff 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | T.....PRIMARY.KEY,.n.INT)/*WUT.R |
135da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
135dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
135de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
135e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
135e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
135e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
135e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 76 3c | FROM.counts.WHERE.random()AND.v< |
135e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
135ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
135ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
135ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
135f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
135f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
135f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
135f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
135f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
135fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
135fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
135fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 75 73 65 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FRuset1.WHERE.a=7;. |
136000 | 0d 00 00 00 0b 02 24 00 1d 48 1a 8a 17 d2 15 1a 12 54 0f 9c 0d 04 0a 49 07 8e 04 d6 02 24 00 00 | ......$..H.......T.....I.....$.. |
136020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1360a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1360c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1360e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1361a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1361c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1361e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
136200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 34 | ...............................4 |
136220 | 8f 6a 04 00 85 2e 8f 6a 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .j.....j...aCREATE.TABLE.t1(a.IN |
136240 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v..NTEGE |
136260 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
136280 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
1362a0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
1362c0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
1362e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
136300 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
136320 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
136340 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 6a 73 6f 6e 28 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 | .counts.WHERE.json(1)==1;...UPDA |
136360 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v>old. |
136380 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
1363a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
1363c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1363e0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
136400 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
136420 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
136440 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v>old.a;.END |
136460 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
136480 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
1364a0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
1364c0 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 69 04 00 8a 6d 43 52 | TE.FROM.t1.WHERE.a=7;..4.i...mCR |
1364e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 | EATE.TABLE.t1(a.INT);.CREATE.TAB |
136500 | 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | LE.counts(v..NTEGER.PRIMARY.KEY, |
136520 | 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 | .n.INT)/*WUT.ROWID*/;.CREATE.TRI |
136540 | 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r1.AFTER.INSERT.ON.t1.BEGIN |
136560 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
136580 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
1365a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
1365c0 | 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r2.AFTER.DELETE.ON.t1.B |
1365e0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
136600 | 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v>old.a.AND.n==1;...UPDATE.count |
136620 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v>old.a;...INS |
136640 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
136660 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
136680 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
1366a0 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
1366c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
1366e0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
136700 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v>old.a;.END;.INSERT |
136720 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
136740 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
136760 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a=4;.DELETE.FROM. |
136780 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 37 8f 68 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;..7.h...sCREATE.TAB |
1367a0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
1367c0 | 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v..NTEGER.PRIMARY.KEY,.n.INT)/ |
1367e0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
136800 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
136820 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
136840 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
136860 | 45 20 53 45 54 20 6e 3d 6e 20 2d 31 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | E.SET.n=n.-1+1;.END;.CREATE.TRIG |
136880 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
1368a0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v<old |
1368c0 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
1368e0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
136900 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
136920 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
136940 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
136960 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
136980 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
1369a0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
1369c0 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
1369e0 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
136a00 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
136a20 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
136a40 | 45 52 45 20 61 3d 37 3b 0a 85 37 8f 67 04 00 8a 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..7.g...sCREATE.TABLE.t1 |
136a60 | 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 | (a.INT);.CREATE.TABLE.counts(v.. |
136a80 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
136aa0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
136ac0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
136ae0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 20 2d 31 2c 31 29 | O.counts(v,n).VALUES(new.a.-1,1) |
136b00 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
136b20 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
136b40 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
136b60 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v<old.a.AN |
136b80 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
136ba0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
136bc0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
136be0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
136c00 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
136c20 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
136c40 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
136c60 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
136c80 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
136ca0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
136cc0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
136ce0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
136d00 | 3d 37 3b 0a 85 14 8f 66 04 00 8a 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;....f...-CREATE.TABLE.t1(a.IN |
136d20 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v..NTEGE |
136d40 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
136d60 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
136d80 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
136da0 | 6e 74 73 28 6e 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(n,n).VALUES(new.a,1).......O |
136dc0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
136de0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
136e00 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
136e20 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
136e40 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
136e60 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
136e80 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
136ea0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
136ec0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
136ee0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
136f00 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
136f20 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
136f40 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
136f60 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
136f80 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 30 20 41 4e 44 20 74 85 34 8f 65 | (7);.UPDATE.t1.SET.a=0.AND.t.4.e |
136fa0 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
136fc0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v..NTEGER.PRIMAR |
136fe0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
137000 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
137020 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 6e 2c 6e 29 | .BEGIN...INSERT.INTO.counts(n,n) |
137040 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
137060 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
137080 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
1370a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
1370c0 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 2e 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.v=.1;...UPDATE |
1370e0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
137100 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
137120 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
137140 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
137160 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
137180 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
1371a0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
1371c0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
1371e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
137200 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
137220 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
137240 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8f 64 04 00 8b 09 43 52 45 41 | .FROM.t1.WHERE.a=7;..B.d....CREA |
137260 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
137280 | 20 63 6f 75 6e 74 73 28 76 20 63 68 61 72 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 20 | .counts(v.char(1)COLLATE.nocase. |
1372a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
1372c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
1372e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
137300 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
137320 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
137340 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
137360 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
137380 | 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 76 3d 3d 31 3b 0a 20 20 | ounts.WHERE.random()AND.v==1;... |
1373a0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
1373c0 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
1373e0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
137400 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
137420 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
137440 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
137460 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
137480 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
1374a0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
1374c0 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
1374e0 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
137500 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 63 04 00 | DELETE.FROM.t1.WHERE.a=7;..4.c.. |
137520 | 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .mCREATE.TABLE.t1(a.INT);.CREATE |
137540 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v.char(1).PRIMARY. |
137560 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
137580 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
1375a0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
1375c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
1375e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
137600 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
137620 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
137640 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
137660 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
137680 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
1376a0 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
1376c0 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
1376e0 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
137700 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
137720 | 20 75 6e 69 63 6f 64 65 28 31 29 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | .unicode(1)==1;...UPDATE.counts. |
137740 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
137760 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
137780 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
1377a0 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
1377c0 | 52 4f 4d 20 74 31 20 4e 4f 54 20 49 4e 44 45 58 45 44 85 34 8f 62 04 00 8a 6d 43 52 45 41 54 45 | ROM.t1.NOT.INDEXED.4.b...mCREATE |
1377e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
137800 | 6f 75 6e 74 73 28 76 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v.char(1).PRIMARY.KEY,.n.I |
137820 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
137840 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
137860 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
137880 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
1378a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1378c0 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
1378e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 43 55 | ...DELETE.FROM.counts.WHERE.v=CU |
137900 | 52 52 45 4e 54 5f 54 49 4d 45 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | RRENT_TIME=1;...UPDATE.counts.SE |
137920 | 54 20 6e 3d 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=CURRENT_TIMESTAMP;...INSERT. |
137940 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
137960 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
137980 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
1379a0 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
1379c0 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
1379e0 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
137a00 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
137a20 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
137a40 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
137a60 | 20 61 3d 35 20 57 48 45 52 45 20 61 2b 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a+4;.DELETE.FROM.t1.W |
137a80 | 48 45 52 45 20 61 3d 37 3b 0a 85 3a 8f 61 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..:.a...yCREATE.TABLE.t |
137aa0 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
137ac0 | 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | char(1).PRIMARY.KEY,.n.INT)/*WUT |
137ae0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
137b00 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
137b20 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
137b40 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
137b60 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
137b80 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
137ba0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 | E.FROM.counts.WHERE.random()AND. |
137bc0 | 76 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | v==1;...UPDATE.counts.SET.n=n-1. |
137be0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
137c00 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
137c20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
137c40 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
137c60 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
137c80 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
137ca0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
137cc0 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
137ce0 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
137d00 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
137d20 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
137d40 | 3b 56 41 43 55 55 4d 0a 85 34 8f 60 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ;VACUUM..4.`...mCREATE.TABLE.t1( |
137d60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 63 68 | a.INT);.CREATE.TABLE.counts(v.ch |
137d80 | 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | ar(1).PRIMARY.KEY,.n.INT)/*WUT.R |
137da0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
137dc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
137de0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
137e00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
137e20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
137e40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
137e60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 72 61 6e 64 6f 6d 28 29 41 4e 44 20 76 3d | FROM.counts.WHERE.random()AND.v= |
137e80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
137ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
137ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
137ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
137f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
137f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
137f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
137f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
137f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
137fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
137fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 74 72 69 6d 28 | (4),(7);.UPDATE.t1.SET.a=.ltrim( |
137fe0 | 31 2c 31 29 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | 1,1);.DELETE.FROM.t1.WHERE.a=7;. |
138000 | 0d 1a 90 00 0b 02 03 00 1d 4e 1a 9c 17 d8 15 20 12 5a 0f a2 0c ea 0a 32 07 73 04 bb 02 03 00 00 | .........N.......Z.....2.s...... |
138020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1380a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1380c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1380e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1381a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1381c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1381e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
138200 | 00 00 00 85 34 8f 75 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | ....4.u...mCREATE.TABLE.t1(a.INT |
138220 | 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 | );.CREATE.TABLE.counts(v..NTEGER |
138240 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a | .PRIMARY.KEY,.n.INT)/*WUT.ROWID* |
138260 | 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | /;.CREATE.TRIGGER.r1.AFTER.INSER |
138280 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
1382a0 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
1382c0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
1382e0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
138300 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
138320 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v<old.a.AND.n==1;.. |
138340 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
138360 | 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | >old.a;...INSERT.INTO.counts(v,n |
138380 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
1383a0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
1383c0 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 | .CREATE.TRIGGER.r3.AFTER.DELETE. |
1383e0 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
138400 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
138420 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
138440 | 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 | ;.END;.INSERT.INTO.t1(a).VALUES( |
138460 | 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 | 1),(2),(1),(3),(1),(3),(2),(4),( |
138480 | 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 74 72 69 6d 28 31 2c 31 29 3b | 7);.UPDATE.t1.SET.a=.ltrim(1,1); |
1384a0 | 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 74 04 | .DELETE.FROM.t1.WHERE.a=7;..4.t. |
1384c0 | 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 | ..mCREATE.TABLE.t1(a.INT);.CREAT |
1384e0 | 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | E.TABLE.counts(v..NTEGER.PRIMARY |
138500 | 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .KEY,.n.INT)/*WUT.ROWID*/;.CREAT |
138520 | 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | E.TRIGGER.r1.AFTER.INSERT.ON.t1. |
138540 | 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | BEGIN...INSERT.INTO.counts(v,n). |
138560 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
138580 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
1385a0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e | REATE.TRIGGER.r2.AFTER.UPDATE.ON |
1385c0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
1385e0 | 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v<old.a.AND.n==1;...UPDATE. |
138600 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
138620 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
138640 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
138660 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
138680 | 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r3.AFTER.DELETE.ON.t1.BE |
1386a0 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
1386c0 | 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.a.AND.n==1;...UPDATE.counts |
1386e0 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 | .SET.n=n-1.WHERE.v=old.a;.END;.I |
138700 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 | NSERT.INTO.t1(a).VALUES(1),(2),( |
138720 | 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 37 29 2c 28 37 29 3b 0a 55 50 44 41 | 1),(3),(1),(3),(2),(7),(7);.UPDA |
138740 | 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 | TE.t1.SET.a=5.WHERE.a=4;.DELETE. |
138760 | 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3b 8f 73 04 00 8a 7b 43 52 45 41 54 | FROM.t1.WHERE.a=7;..;.s...{CREAT |
138780 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(a.INT);.CREATE.TABLE. |
1387a0 | 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v..NTEGER.PRIMARY.KEY,.n. |
1387c0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
1387e0 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
138800 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e | INSERT.INTO.counts(v,n).VALUES(n |
138820 | 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 | ew.a,1).......ON.CONFLICT(v).DO. |
138840 | 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 | UPDATE.SET.n=n+1;.END;.CREATE.TR |
138860 | 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r2.AFTER.UPDATE.ON.t1.BEGI |
138880 | 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f | N...DELETE.FROM.counts.WHERE.v<o |
1388a0 | 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 | ld.a.AND.n==1;...UPDATE.counts.S |
1388c0 | 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 | ET.n=n-1.WHERE.v=old.a;...INSERT |
1388e0 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
138900 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
138920 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
138940 | 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r3.AFTER.DELETE.ON.t1.BEGIN...DE |
138960 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
138980 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
1389a0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e | -1.WHERE.v=old.a;.END;.INSERT.IN |
1389c0 | 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 | TO.t1(a).VALUES(1),(2),(1),(3),( |
1389e0 | 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 | 1),(3),(2),(4),(7);.UPDATE.t1.SE |
138a00 | 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 | T.a=5.WHERE.a=4;.DELETE.FROM.t1. |
138a20 | 57 48 45 52 45 20 61 3d 37 3b 41 4e 41 4c 59 5a 45 0a 85 34 8f 72 04 00 8a 6d 43 52 45 41 54 45 | WHERE.a=7;ANALYZE..4.r...mCREATE |
138a40 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
138a60 | 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v..NTEGER.PRIMARY.KEY,.n.I |
138a80 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
138aa0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
138ac0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
138ae0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
138b00 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
138b20 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
138b40 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c | ...DELETE.FROM.counts.WHERE.v<ol |
138b60 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
138b80 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
138ba0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
138bc0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
138be0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
138c00 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
138c20 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
138c40 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
138c60 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
138c80 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
138ca0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
138cc0 | 20 61 3d 20 6c 6f 77 65 72 28 31 29 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=.lower(1)=4;.DELETE.FROM.t1.W |
138ce0 | 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 71 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;..4.q...mCREATE.TABLE.t |
138d00 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
138d20 | c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | .NTEGER.PRIMARY.KEY,.n.INT)/*WUT |
138d40 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
138d60 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
138d80 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
138da0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
138dc0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
138de0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
138e00 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v<old.a.AND. |
138e20 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
138e40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | WHERE.v=old.a;...INSERT.INTO.cou |
138e60 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
138e80 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
138ea0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
138ec0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
138ee0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
138f00 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
138f20 | 6e 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | n=old.a;.END;.INSERT.INTO.t1(a). |
138f40 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
138f60 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
138f80 | 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 | RE.a=4;.DELETE.FROM.t1.WHERE.a=7 |
138fa0 | 3b 0a 85 34 8f 70 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | ;..4.p...mCREATE.TABLE.t1(a.INT) |
138fc0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v..NTEGER. |
138fe0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
139000 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
139020 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
139040 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
139060 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
139080 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
1390a0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
1390c0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 3c 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3b 0a 20 20 | ounts.WHERE.v<<json_quote(1);... |
1390e0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
139100 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
139120 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
139140 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
139160 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
139180 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
1391a0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
1391c0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
1391e0 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
139200 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
139220 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a | );.UPDATE.t1.SET.a=5.WHERE.a=4;. |
139240 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 42 8f 6f 04 00 | DELETE.FROM.t1.WHERE.a=7;..B.o.. |
139260 | 8b 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | ..CREATE.TABLE.t1(a.INT);.CREATE |
139280 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v..NTEGER.PRIMARY. |
1392a0 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
1392c0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
1392e0 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
139300 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
139320 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
139340 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
139360 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
139380 | 45 52 45 20 76 3c 20 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 | ERE.v<.json_quote(1)COLLATE.noca |
1393a0 | 73 65 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | se;...UPDATE.counts.SET.n=n-1.WH |
1393c0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
1393e0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
139400 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
139420 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
139440 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
139460 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
139480 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
1394a0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
1394c0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
1394e0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
139500 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
139520 | 85 34 8f 6e 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.n...mCREATE.TABLE.t1(a.INT);. |
139540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v..NTEGER.PR |
139560 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
139580 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
1395a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
1395c0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
1395e0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
139600 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
139620 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
139640 | 6e 74 73 20 57 48 45 52 45 20 76 3c 20 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3b 0a 20 20 55 50 | nts.WHERE.v<.json_quote(1);...UP |
139660 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
139680 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
1396a0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
1396c0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
1396e0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
139700 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
139720 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
139740 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
139760 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
139780 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
1397a0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
1397c0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 6d 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.m...m |
1397e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
139800 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v..NTEGER.PRIMARY.KE |
139820 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
139840 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
139860 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
139880 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
1398a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
1398c0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
1398e0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
139900 | 45 20 76 3c 20 6a 73 6f 6e 5f 71 75 6f 74 65 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v<.json_quote(1);...UPDATE.cou |
139920 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
139940 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
139960 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
139980 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
1399a0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
1399c0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
1399e0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
139a00 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
139a20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
139a40 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
139a60 | 74 31 20 53 45 54 20 61 3d 20 69 6e 73 74 72 28 31 2c 31 29 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=.instr(1,1);.DELETE.FRO |
139a80 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 00 00 00 0c 04 00 8a 6d 43 52 45 41 85 2e 8f 6c | M.t1.WHERE.a=7;........mCREA...l |
139aa0 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
139ac0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v..NTEGER.PRIMAR |
139ae0 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
139b00 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
139b20 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
139b40 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
139b60 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
139b80 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
139ba0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
139bc0 | 57 48 45 52 45 20 76 3c 20 6a 73 6f 6e 28 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | WHERE.v<.json(1);...UPDATE.count |
139be0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 | s.SET.n=n-1.WHERE.v=old.a;...INS |
139c00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
139c20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
139c40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
139c60 | 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r3.AFTER.DELETE.ON.t1.BEGIN.. |
139c80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v=old. |
139ca0 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
139cc0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 | n=n-1.WHERE.v=old.a;.END;.INSERT |
139ce0 | 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 | .INTO.t1(a).VALUES(1),(2),(1),(3 |
139d00 | 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 | ),(1),(3),(2),(4),(7);.UPDATE.t1 |
139d20 | 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 | .SET.a=5.WHERE.a-4;.DELETE.FROM. |
139d40 | 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2e 8f 6b 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 | t1.WHERE.a=7;....k...aCREATE.TAB |
139d60 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
139d80 | 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v..NTEGER.PRIMARY.KEY,.n.INT)/ |
139da0 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
139dc0 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
139de0 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
139e00 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
139e20 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
139e40 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
139e60 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 20 6a 73 6f 6e 28 | ELETE.FROM.counts.WHERE.v<.json( |
139e80 | 31 29 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | 1);...UPDATE.counts.SET.n=n-1.WH |
139ea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
139ec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
139ee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
139f00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
139f20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
139f40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
139f60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
139f80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
139fa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
139fc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 00 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
139fe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
13a000 | 0d 00 00 00 0b 02 44 00 1d 48 1a a8 17 f0 15 50 12 98 0f e0 0d 28 0a 70 07 b4 04 fc 02 44 00 00 | ......D..H.....P.....(.p.....D.. |
13a020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13a240 | 00 00 00 00 85 34 90 00 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | .....4.....mCREATE.TABLE.t1(a.IN |
13a260 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v..NTEGE |
13a280 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
13a2a0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
13a2c0 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
13a2e0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
13a300 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
13a320 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
13a340 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
13a360 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 2e 31 3b 0a | .counts.WHERE.v<old.a.AND.v=.1;. |
13a380 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
13a3a0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
13a3c0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
13a3e0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
13a400 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
13a420 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
13a440 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
13a460 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
13a480 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
13a4a0 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
13a4c0 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3c 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a<4 |
13a4e0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 7f | ;.DELETE.FROM.t1.WHERE.a=7;..4.. |
13a500 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
13a520 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v..NTEGER.PRIMAR |
13a540 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
13a560 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
13a580 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
13a5a0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
13a5c0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
13a5e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
13a600 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
13a620 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 2e 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.v=.1;...UPDATE |
13a640 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
13a660 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
13a680 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
13a6a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
13a6c0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
13a6e0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
13a700 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
13a720 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
13a740 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
13a760 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
13a780 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 6c 6f 77 65 72 28 31 29 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=.lower(1)=4;.DELETE |
13a7a0 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 38 8f 7e 04 00 8a 75 43 52 45 41 | .FROM.t1.WHERE.a=7;..8.~...uCREA |
13a7c0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
13a7e0 | 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v..NTEGER.PRIMARY.KEY,.n |
13a800 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
13a820 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
13a840 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
13a860 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
13a880 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
13a8a0 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
13a8c0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
13a8e0 | 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 20 31 3d 31 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | old.a.AND.v=.1=1=1;...UPDATE.cou |
13a900 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.n=n-1.WHERE.v=old.a;...I |
13a920 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
13a940 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
13a960 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
13a980 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
13a9a0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
13a9c0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
13a9e0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
13aa00 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
13aa20 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
13aa40 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
13aa60 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 7d 04 00 8a 6d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;..4.}...mCREATE.T |
13aa80 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
13aaa0 | 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v..NTEGER.PRIMARY.KEY,.n.INT |
13aac0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
13aae0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
13ab00 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
13ab20 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
13ab40 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
13ab60 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
13ab80 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
13aba0 | 61 20 41 4e 44 20 76 26 2e 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.v&.1;...UPDATE.counts.SET. |
13abc0 | 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | n=n-1.WHERE.v=old.a;...INSERT.IN |
13abe0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
13ac00 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
13ac20 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
13ac40 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
13ac60 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
13ac80 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
13aca0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
13acc0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
13ace0 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
13ad00 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
13ad20 | 52 45 20 61 3d 37 3b 0a 85 34 8f 7c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.|...mCREATE.TABLE.t1( |
13ad40 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e | a.INT);.CREATE.TABLE.counts(v..N |
13ad60 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
13ad80 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
13ada0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
13adc0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
13ade0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
13ae00 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
13ae20 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
13ae40 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
13ae60 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.v=n-1.WH |
13ae80 | 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v>old.a;...INSERT.INTO.count |
13aea0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
13aec0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
13aee0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
13af00 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
13af20 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
13af40 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
13af60 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
13af80 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
13afa0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
13afc0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
13afe0 | 85 34 8f 7b 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.{...mCREATE.TABLE.t1(a.INT);. |
13b000 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v..NTEGER.PR |
13b020 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n.INT)/*WUT.ROWID*/;. |
13b040 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
13b060 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
13b080 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
13b0a0 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
13b0c0 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
13b0e0 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
13b100 | 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v<old.a.AND.n==1;...UP |
13b120 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.v=n-1.WHERE.v=ol |
13b140 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
13b160 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
13b180 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
13b1a0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
13b1c0 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
13b1e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
13b200 | 6f 75 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.v=n-1.WHERE.v=old.a;.E |
13b220 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
13b240 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
13b260 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
13b280 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 8f 7a 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.z...m |
13b2a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
13b2c0 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v..NTEGER.PRIMARY.KE |
13b2e0 | 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n.INT)/*WUT.ROWID*/;.CREATE.T |
13b300 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
13b320 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
13b340 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
13b360 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
13b380 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
13b3a0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
13b3c0 | 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v<old.a.AND.n==1;...UPDATE.cou |
13b3e0 | 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.v=n-1.WHERE.v=old.a;...I |
13b400 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
13b420 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
13b440 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
13b460 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
13b480 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
13b4a0 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
13b4c0 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
13b4e0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
13b500 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
13b520 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
13b540 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 1c 8f 79 04 00 8a 3d 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;....y...=CREATE.T |
13b560 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
13b580 | 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v..NTEGER.PRIMARY.KEY,.n.INT |
13b5a0 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
13b5c0 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
13b5e0 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
13b600 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
13b620 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
13b640 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
13b660 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
13b680 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
13b6a0 | 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | v=n-1.WHERE.v=old.a;...INSERT.IN |
13b6c0 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
13b6e0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
13b700 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
13b720 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
13b740 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
13b760 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
13b780 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
13b7a0 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 32 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(2),(1), |
13b7c0 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
13b7e0 | 3d 35 20 57 48 45 52 45 20 61 3d 32 3b 0a 44 45 85 34 8f 78 04 00 8a 6d 43 52 45 41 54 45 20 54 | =5.WHERE.a=2;.DE.4.x...mCREATE.T |
13b800 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
13b820 | 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v..NTEGER.PRIMARY.KEY,.n.INT |
13b840 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
13b860 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
13b880 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
13b8a0 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
13b8c0 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
13b8e0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
13b900 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e | .DELETE.FROM.counts.WHERE.v<old. |
13b920 | 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 | a.AND.n==1;...UPDATE.counts.SET. |
13b940 | 76 3d 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | v=.julianday(1,1,1);...INSERT.IN |
13b960 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
13b980 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
13b9a0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
13b9c0 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
13b9e0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
13ba00 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
13ba20 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
13ba40 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
13ba60 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
13ba80 | 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | =5.WHERE.a=4;.DELETE.FROM.t1.WHE |
13baa0 | 52 45 20 61 3d 37 3b 0a 85 1c 8f 77 04 00 8a 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;....w...=CREATE.TABLE.t1( |
13bac0 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e | a.INT);.CREATE.TABLE.counts(v..N |
13bae0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
13bb00 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
13bb20 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
13bb40 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
13bb60 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
13bb80 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
13bba0 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
13bbc0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
13bbe0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 76 3d 20 6a 75 6c 69 61 | =1;...UPDATE.counts.SET.v=.julia |
13bc00 | 6e 64 61 79 28 31 2c 31 2c 31 29 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | nday(1,1,1);...INSERT.INTO.count |
13bc20 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
13bc40 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
13bc60 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
13bc80 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
13bca0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
13bcc0 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
13bce0 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
13bd00 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
13bd20 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
13bd40 | 20 61 3d 32 3b 0a 44 45 85 34 8f 76 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .a=2;.DE.4.v...mCREATE.TABLE.t1( |
13bd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e | a.INT);.CREATE.TABLE.counts(v..N |
13bd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
13bda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
13bdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
13bde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
13be00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
13be20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
13be40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
13be60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
13be80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
13bea0 | 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v>old.a;...INSERT.INTO.count |
13bec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
13bee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
13bf00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
13bf20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
13bf40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
13bf60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
13bf80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
13bfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
13bfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
13bfe0 | 20 61 2d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a-4;.DELETE.FROM.t1.WHERE.a=7;. |
13c000 | 0d 00 00 00 0b 01 fc 00 1d 3e 1a 86 17 bc 15 04 12 4c 0f 94 0c dc 0a 1e 07 66 04 ae 01 fc 00 00 | .........>.......L.......f...... |
13c020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13c1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 2e 90 0b | ................................ |
13c200 | 04 00 8a 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...aCREATE.TABLE.t1(a.INT);.CREA |
13c220 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v..NTEGER.PRIMAR |
13c240 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
13c260 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
13c280 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
13c2a0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
13c2c0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
13c2e0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
13c300 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
13c320 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 67 6c 6f 62 28 31 2c 31 29 41 4e 44 20 74 72 75 65 20 | WHERE.v<old.a.glob(1,1)AND.true. |
13c340 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
13c360 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
13c380 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
13c3a0 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
13c3c0 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
13c3e0 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
13c400 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
13c420 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
13c440 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
13c460 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
13c480 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
13c4a0 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 3b 0a 85 34 90 0a 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 | .WHERE.a=4;.;..4.....mCREATE.TAB |
13c4c0 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
13c4e0 | 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f | s(v..NTEGER.PRIMARY.KEY,.n.INT)/ |
13c500 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
13c520 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
13c540 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
13c560 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
13c580 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
13c5a0 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
13c5c0 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v<old.a. |
13c5e0 | 41 4e 44 20 76 3e 3e 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.v>>1;...UPDATE.counts.SET.n= |
13c600 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
13c620 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
13c640 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
13c660 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
13c680 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
13c6a0 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
13c6c0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
13c6e0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
13c700 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
13c720 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
13c740 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
13c760 | 20 61 3d 37 3b 0a 85 34 90 09 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.....mCREATE.TABLE.t1(a. |
13c780 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 | INT);.CREATE.TABLE.counts(v..NTE |
13c7a0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
13c7c0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
13c7e0 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
13c800 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
13c820 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
13c840 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
13c860 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
13c880 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3e 3d 31 | OM.counts.WHERE.v<old.a.AND.v>=1 |
13c8a0 | 3b 0a 20 20 55 50 44 41 54 45 20 e3 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE..ounts.SET.n=n-1.WHER |
13c8c0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
13c8e0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
13c900 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
13c920 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
13c940 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
13c960 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
13c980 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
13c9a0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
13c9c0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
13c9e0 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
13ca00 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3a | =4;.DELETE.FROM.t1.WHERE.a=7;..: |
13ca20 | 90 08 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | .....yCREATE.TABLE.t1(a.INT);.CR |
13ca40 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v..NTEGER.PRIM |
13ca60 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
13ca80 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
13caa0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
13cac0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
13cae0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
13cb00 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
13cb20 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
13cb40 | 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3e 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v<old.a.AND.v>=1;...UPDA |
13cb60 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
13cb80 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
13cba0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
13cbc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
13cbe0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
13cc00 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
13cc20 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
13cc40 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
13cc60 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
13cc80 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
13cca0 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
13ccc0 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 34 90 07 | TE.FROM.t1.WHERE.a=7;VACUUM..4.. |
13cce0 | 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ...mCREATE.TABLE.t1(a.INT);.CREA |
13cd00 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v..NTEGER.PRIMAR |
13cd20 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
13cd40 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
13cd60 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
13cd80 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
13cda0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
13cdc0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
13cde0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
13ce00 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3e 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.v>=1;...UPDATE |
13ce20 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
13ce40 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
13ce60 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
13ce80 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
13cea0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
13cec0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
13cee0 | 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v<old.a.AND.n==1;...UPDATE.count |
13cf00 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
13cf20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
13cf40 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
13cf60 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 | ATE.t1.SET.a=5.WHERE.a=4;.DELETE |
13cf80 | 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 90 06 04 00 8a 6d 43 52 45 41 | .FROM.t1.WHERE.a=7;..4.....mCREA |
13cfa0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | TE.TABLE.t1(a.INT);.CREATE.TABLE |
13cfc0 | 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e | .counts(v..NTEGER.PRIMARY.KEY,.n |
13cfe0 | 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | .INT)/*WUT.ROWID*/;.CREATE.TRIGG |
13d000 | 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r1.AFTER.INSERT.ON.t1.BEGIN.. |
13d020 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
13d040 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
13d060 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
13d080 | 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r2.AFTER.UPDATE.ON.t1.BEG |
13d0a0 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c | IN...DELETE.FROM.counts.WHERE.v< |
13d0c0 | 6f 6c 64 2e 61 20 41 4e 44 20 76 3e 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.v>=1;...UPDATE.counts. |
13d0e0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 | SET.n=n-1.WHERE.v<old.a;...INSER |
13d100 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | T.INTO.counts(v,n).VALUES(new.a, |
13d120 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
13d140 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
13d160 | 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r3.AFTER.DELETE.ON.t1.BEGIN...D |
13d180 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
13d1a0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
13d1c0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 | n-1.WHERE.v=old.a;.END;.INSERT.I |
13d1e0 | 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c | NTO.t1(a).VALUES(1),(2),(1),(3), |
13d200 | 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 | (1),(3),(2),(4),(7);.UPDATE.t1.S |
13d220 | 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 | ET.a=5.WHERE.a=4;.DELETE.FROM.t1 |
13d240 | 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 90 05 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | .WHERE.a=7;..4.....mCREATE.TABLE |
13d260 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
13d280 | 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v..NTEGER.PRIMARY.KEY,.n.INT)/*W |
13d2a0 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
13d2c0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
13d2e0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
13d300 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
13d320 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
13d340 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
13d360 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v<old.a.AN |
13d380 | 44 20 76 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.v==1;...UPDATE.counts.SET.n=n- |
13d3a0 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v=old.a;...INSERT.INTO.c |
13d3c0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
13d3e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
13d400 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
13d420 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
13d440 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.v==1 |
13d460 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
13d480 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v=old.a;.END;.INSERT.INTO.t1(a |
13d4a0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
13d4c0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
13d4e0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
13d500 | 3d 37 3b 0a 85 34 90 04 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..4.....mCREATE.TABLE.t1(a.IN |
13d520 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v..NTEGE |
13d540 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
13d560 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
13d580 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
13d5a0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
13d5c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
13d5e0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
13d600 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
13d620 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 31 3b 0a | .counts.WHERE.v<old.a.AND.v==1;. |
13d640 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
13d660 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
13d680 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
13d6a0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
13d6c0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
13d6e0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
13d700 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
13d720 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
13d740 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
13d760 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
13d780 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 20 69 6e 73 74 72 28 31 2c 31 29 | (7);.UPDATE.t1.SET.a=.instr(1,1) |
13d7a0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 46 90 03 | ;.DELETE.FROM.t1.WHERE.a=7;..F.. |
13d7c0 | 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 | ....CREATE.TABLE.t1(a.INT);.CREA |
13d7e0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v..NTEGER.PRIMAR |
13d800 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
13d820 | 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
13d840 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
13d860 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
13d880 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
13d8a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
13d8c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
13d8e0 | 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v<old.a.AND.v==1;...UPDATE |
13d900 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
13d920 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
13d940 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
13d960 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
13d980 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
13d9a0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
13d9c0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 20 6a 73 6f 6e 5f 65 78 74 72 61 63 74 28 31 2c 31 29 | v=old.a.AND.n=.json_extract(1,1) |
13d9e0 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
13da00 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
13da20 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
13da40 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 | ),(2),(4),(7);.UPDATE.t1.SET.a=5 |
13da60 | 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 | .WHERE.a=4;.DELETE.FROM.t1.WHERE |
13da80 | 20 61 3d 37 3b 0a 85 34 90 02 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | .a=7;..4.....mCREATE.TABLE.t1(a. |
13daa0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 | INT);.CREATE.TABLE.counts(v..NTE |
13dac0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
13dae0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
13db00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
13db20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
13db40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
13db60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
13db80 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
13dba0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 31 | OM.counts.WHERE.v<old.a.AND.v==1 |
13dbc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
13dbe0 | 45 20 76 3c 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v<old.a;...INSERT.INTO.counts( |
13dc00 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
13dc20 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
13dc40 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
13dc60 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
13dc80 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
13dca0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
13dcc0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
13dce0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
13dd00 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 | ),(7);.UPDATE.t1.SET.a=5.WHERE.a |
13dd20 | 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 3e | =4;.DELETE.FROM.t1.WHERE.a=7;..> |
13dd40 | 90 01 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 | ......CREATE.TABLE.t1(a.INT);.CR |
13dd60 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v..NTEGER.PRIM |
13dd80 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
13dda0 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
13ddc0 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
13dde0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
13de00 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
13de20 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
13de40 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
13de60 | 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 32 30 30 31 2d 30 31 2d 30 31 | s.WHERE.v<old.a.AND.v=2001-01-01 |
13de80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
13dea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
13dec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
13dee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
13df00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
13df20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
13df40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
13df60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
13df80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
13dfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
13dfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
13dfe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
13e000 | 0d 00 00 00 0b 02 40 00 1d 48 1a 86 17 ea 15 32 12 7a 0f c2 0d 04 0a 4c 07 b0 04 f8 02 40 00 00 | ......@..H.....2.z.....L.....@.. |
13e020 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e1a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e1c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e1e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
13e240 | 85 34 90 16 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a | .4.....mCREATE.TABLE.t1(a.INT);. |
13e260 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 | CREATE.TABLE.counts(v..NTEGER.PR |
13e280 | 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a | IMARY.KEY,.n,INT)/*WUT.ROWID*/;. |
13e2a0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f | CREATE.TRIGGER.r1.AFTER.INSERT.O |
13e2c0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | N.t1.BEGIN...INSERT.INTO.counts( |
13e2e0 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
13e300 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
13e320 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
13e340 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
13e360 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 4e 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.v==N;...UP |
13e380 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
13e3a0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
13e3c0 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
13e3e0 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
13e400 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
13e420 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
13e440 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
13e460 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
13e480 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
13e4a0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
13e4c0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 | .UPDATE.t1.SET.a=5.WHERE.a=4;.DE |
13e4e0 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 90 15 04 00 8a 6d | LETE.FROM.t1.WHERE.a=7;..4.....m |
13e500 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 | CREATE.TABLE.t1(a.INT);.CREATE.T |
13e520 | 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | ABLE.counts(v..NTEGER.PRIMARY.KE |
13e540 | 59 2c 20 6e 2c 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | Y,.n,INT)/*WUT.ROWID*/;.CREATE.T |
13e560 | 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r1.AFTER.INSERT.ON.t1.BEG |
13e580 | 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | IN...INSERT.INTO.counts(v,n).VAL |
13e5a0 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
13e5c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
13e5e0 | 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r2.AFTER.UPDATE.ON.t1 |
13e600 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
13e620 | 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v<old.a.AND.n==1;...UPDATE.cou |
13e640 | 6e 74 73 20 53 45 54 20 76 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 | nts.SET.v=n-1.WHERE.v=old.a;...I |
13e660 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
13e680 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
13e6a0 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
13e6c0 | 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r3.AFTER.DELETE.ON.t1.BEGIN |
13e6e0 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
13e700 | 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.n==1;...UPDATE.counts.SE |
13e720 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 | T.n=n-1.WHERE.v=old.a;.END;.INSE |
13e740 | 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c | RT.INTO.t1(a).VALUES(1),(2),(1), |
13e760 | 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 | (3),(1),(3),(2),(4),(7);.UPDATE. |
13e780 | 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f | t1.SET.a=5.WHERE.a=4;.DELETE.FRO |
13e7a0 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 18 90 14 04 00 8a 35 43 52 45 41 54 45 20 54 | M.t1.WHERE.a=7;........5CREATE.T |
13e7c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 | ABLE.t1(a.INT);.CREATE.TABLE.cou |
13e7e0 | 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 | nts(v..NTEGER.PRIMARY.KEY,.n.INT |
13e800 | 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | )/*WUT.ROWID*/;.CREATE.TRIGGER.r |
13e820 | 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 | 1.AFTER.INSERT.ON.t1.BEGIN...INS |
13e840 | 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e | ERT.INTO.counts(v,n).VALUES(new. |
13e860 | 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 | a,1).......ON.CONFLICT(v).DO.UPD |
13e880 | 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 | ATE.SET.n=n+1;.END;.CREATE.TRIGG |
13e8a0 | 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | ER.r2.AFTER.UPDATE.ON.t1.BEGIN.. |
13e8c0 | 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 2b 76 3d 6f 6c 64 2e | .DELETE.FROM.counts.WHERE+v=old. |
13e8e0 | 61 20 41 4e 44 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 | a.AND.sqlite_compileoption_get(1 |
13e900 | 29 3d 6e 20 67 6c 6f 62 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e | )=n.glob(1,1)=old.a;...INSERT.IN |
13e920 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
13e940 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
13e960 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 | T.n=n+1;.END;.CREATE.TRIGGER.r3. |
13e980 | 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.DELETE.ON.t1.BEGIN...DELET |
13e9a0 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
13e9c0 | 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 | n==1;...UPDATE.counts.SET.n=n-1. |
13e9e0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | WHERE.v=old.a;.END;.INSERT.INTO. |
13ea00 | 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c | t1(a).VALUES(1),(2),(1),(3),(1), |
13ea20 | 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 | (3),(2),(4),(7);.UPDATE.t1.SET.a |
13ea40 | 3d 35 20 57 48 45 52 45 20 61 3d 34 85 34 90 13 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | =5.WHERE.a=4.4.....mCREATE.TABLE |
13ea60 | 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 | .t1(a.INT);.CREATE.TABLE.counts( |
13ea80 | 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 | v..NTEGER.PRIMARY.KEY,.n.INT)/*W |
13eaa0 | 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 | UT.ROWID*/;.CREATE.TRIGGER.r1.AF |
13eac0 | 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 | TER.INSERT.ON.t1.BEGIN...INSERT. |
13eae0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
13eb00 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
13eb20 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
13eb40 | 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 2.AFTER.UPDATE.ON.t1.BEGIN...DEL |
13eb60 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v>old.a.AN |
13eb80 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
13eba0 | 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | 1.WHERE.v>old.a;...INSERT.INTO.c |
13ebc0 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
13ebe0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
13ec00 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r3.AFTE |
13ec20 | 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.DELETE.ON.t1.BEGIN...DELETE.FR |
13ec40 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v>old.a.AND.n==1 |
13ec60 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
13ec80 | 45 20 76 3e 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | E.v>old.a;.END;.INSERT.INTO.t1(a |
13eca0 | 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c | ).VALUES(1),(2),(1),(3),(1),(3), |
13ecc0 | 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 | (2),(4),(7);.UPDATE.t1.SET.a=5.W |
13ece0 | 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 | HERE.a=4;.DELETE.FROM.t1.WHERE.a |
13ed00 | 3d 37 3b 0a 85 3a 90 12 04 00 8a 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | =7;..:.....yCREATE.TABLE.t1(a.IN |
13ed20 | 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 | T);.CREATE.TABLE.counts(v..NTEGE |
13ed40 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 | R.PRIMARY.KEY,.n.INT)/*WUT.ROWID |
13ed60 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 | */;.CREATE.TRIGGER.r1.AFTER.INSE |
13ed80 | 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | RT.ON.t1.BEGIN...INSERT.INTO.cou |
13eda0 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
13edc0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
13ede0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r2.AFTER. |
13ee00 | 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | UPDATE.ON.t1.BEGIN...DELETE.FROM |
13ee20 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v>old.a.AND.n==1;. |
13ee40 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
13ee60 | 76 3e 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v>old.a;...INSERT.INTO.counts(v, |
13ee80 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
13eea0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
13eec0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 | ;.CREATE.TRIGGER.r3.AFTER.DELETE |
13eee0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
13ef00 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
13ef20 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v>old. |
13ef40 | 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 | a;.END;.INSERT.INTO.t1(a).VALUES |
13ef60 | 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c | (1),(2),(1),(3),(1),(3),(2),(4), |
13ef80 | 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 | (7);.UPDATE.t1.SET.a=5.WHERE.a=4 |
13efa0 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 | ;.DELETE.FROM.t1.WHERE.a=7;VACUU |
13efc0 | 4d 0a 85 34 90 11 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 | M..4.....mCREATE.TABLE.t1(a.INT) |
13efe0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 | ;.CREATE.TABLE.counts(v..NTEGER. |
13f000 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f | PRIMARY.KEY,.n.INT)/*WUT.ROWID*/ |
13f020 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 | ;.CREATE.TRIGGER.r1.AFTER.INSERT |
13f040 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | .ON.t1.BEGIN...INSERT.INTO.count |
13f060 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
13f080 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
13f0a0 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 | .END;.CREATE.TRIGGER.r2.AFTER.UP |
13f0c0 | 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | DATE.ON.t1.BEGIN...DELETE.FROM.c |
13f0e0 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3e 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v>old.a.AND.n==1;... |
13f100 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3e | UPDATE.counts.SET.n=n-1.WHERE.v> |
13f120 | 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | old.a;...INSERT.INTO.counts(v,n) |
13f140 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
13f160 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
13f180 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f | CREATE.TRIGGER.r3.AFTER.DELETE.O |
13f1a0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
13f1c0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.a.AND.n==1;...UPDATE |
13f1e0 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
13f200 | 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 | .END;.INSERT.INTO.t1(a).VALUES(1 |
13f220 | 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 | ),(2),(1),(3),(1),(3),(2),(4),(7 |
13f240 | 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 32 30 30 31 2d 30 31 2d 30 31 34 3b 0a | );.UPDATE.t1.SET.a=2001-01-014;. |
13f260 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 90 10 04 00 | DELETE.FROM.t1.WHERE.a=7;..4.... |
13f280 | 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | .mCREATE.TABLE.t1(a.INT);.CREATE |
13f2a0 | 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | .TABLE.counts(v..NTEGER.PRIMARY. |
13f2c0 | 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | KEY,.n.INT)/*WUT.ROWID*/;.CREATE |
13f2e0 | 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 | .TRIGGER.r1.AFTER.INSERT.ON.t1.B |
13f300 | 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | EGIN...INSERT.INTO.counts(v,n).V |
13f320 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
13f340 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
13f360 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 | EATE.TRIGGER.r2.AFTER.UPDATE.ON. |
13f380 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
13f3a0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 76 3d 3d 56 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.v==V;...UPDATE.c |
13f3c0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 | ounts.SET.n=n-1.WHERE.v=old.a;.. |
13f3e0 | 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.counts(v,n).VALUES( |
13f400 | 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f | new.a,1).......ON.CONFLICT(v).DO |
13f420 | 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 | .UPDATE.SET.n=n+1;.END;.CREATE.T |
13f440 | 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 | RIGGER.r3.AFTER.DELETE.ON.t1.BEG |
13f460 | 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d | IN...DELETE.FROM.counts.WHERE.v= |
13f480 | 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 | old.a.AND.n==1;...UPDATE.counts. |
13f4a0 | 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e | SET.n=n-1.WHERE.v=old.a;.END;.IN |
13f4c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 | SERT.INTO.t1(a).VALUES(1),(2),(1 |
13f4e0 | 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 | ),(3),(1),(3),(2),(4),(7);.UPDAT |
13f500 | 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 | E.t1.SET.a=5.WHERE.a=4;.DELETE.F |
13f520 | 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 34 90 0f 04 00 8a 6d 43 52 45 41 54 45 | ROM.t1.WHERE.a=7;..4.....mCREATE |
13f540 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 | .TABLE.t1(a.INT);.CREATE.TABLE.c |
13f560 | 6f 75 6e 74 73 28 76 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 | ounts(v..NTEGER.PRIMARY.KEY,.n.I |
13f580 | 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | NT)/*WUT.ROWID*/;.CREATE.TRIGGER |
13f5a0 | 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 | .r1.AFTER.INSERT.ON.t1.BEGIN...I |
13f5c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 | NSERT.INTO.counts(v,n).VALUES(ne |
13f5e0 | 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 | w.a,1).......ON.CONFLICT(v).DO.U |
13f600 | 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 | PDATE.SET.n=n+1;.END;.CREATE.TRI |
13f620 | 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e | GGER.r2.AFTER.UPDATE.ON.t1.BEGIN |
13f640 | 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c | ...DELETE.FROM.counts.WHERE.v=ol |
13f660 | 64 2e 61 20 41 4e 44 20 76 3d 3d 4e 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 | d.a.AND.v==N;...UPDATE.counts.SE |
13f680 | 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 | T.n=n-1.WHERE.v=old.a;...INSERT. |
13f6a0 | 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 | INTO.counts(v,n).VALUES(new.a,1) |
13f6c0 | 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 | .......ON.CONFLICT(v).DO.UPDATE. |
13f6e0 | 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 | SET.n=n+1;.END;.CREATE.TRIGGER.r |
13f700 | 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c | 3.AFTER.DELETE.ON.t1.BEGIN...DEL |
13f720 | 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e | ETE.FROM.counts.WHERE.v=old.a.AN |
13f740 | 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d | D.n==1;...UPDATE.counts.SET.n=n- |
13f760 | 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1.WHERE.v=old.a;.END;.INSERT.INT |
13f780 | 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 | O.t1(a).VALUES(1),(2),(1),(3),(1 |
13f7a0 | 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 | ),(3),(2),(4),(7);.UPDATE.t1.SET |
13f7c0 | 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 | .a=5.WHERE.a=4;.DELETE.FROM.t1.W |
13f7e0 | 48 45 52 45 20 61 3d 37 3b 0a 85 18 90 0e 04 00 8a 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | HERE.a=7;........5CREATE.TABLE.t |
13f800 | 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 | 1(a.INT);.CREATE.TABLE.counts(v. |
13f820 | c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 | .NTEGER.PRIMARY.KEY,.n.INT)/*WUT |
13f840 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 | .ROWID*/;.CREATE.TRIGGER.r1.AFTE |
13f860 | 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e | R.INSERT.ON.t1.BEGIN...INSERT.IN |
13f880 | 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 | TO.counts(v,n).VALUES(new.a,1).. |
13f8a0 | 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .....ON.CONFLICT(v).DO.UPDATE.SE |
13f8c0 | 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 | T.n=n+1;.END;.CREATE.TRIGGER.r2. |
13f8e0 | 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 | AFTER.UPDATE.ON.t1.BEGIN...DELET |
13f900 | 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 | E.FROM.counts.WHERE.v=old.a.AND. |
13f920 | 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 3d 6e 20 67 6c | sqlite_compileoption_get(1)=n.gl |
13f940 | 6f 62 28 31 2c 31 29 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 | ob(1,1)=old.a;...INSERT.INTO.cou |
13f960 | 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f | nts(v,n).VALUES(new.a,1).......O |
13f980 | 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b | N.CONFLICT(v).DO.UPDATE.SET.n=n+ |
13f9a0 | 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | 1;.END;.CREATE.TRIGGER.r3.AFTER. |
13f9c0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
13f9e0 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
13fa00 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
13fa20 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
13fa40 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
13fa60 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
13fa80 | 52 45 20 61 3d 34 85 3e 90 0d 04 00 8b 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | RE.a=4.>......CREATE.TABLE.t1(a. |
13faa0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e 54 45 | INT);.CREATE.TABLE.counts(v..NTE |
13fac0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 | GER.PRIMARY.KEY,.n.INT)/*WUT.ROW |
13fae0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e | ID*/;.CREATE.TRIGGER.r1.AFTER.IN |
13fb00 | 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 | SERT.ON.t1.BEGIN...INSERT.INTO.c |
13fb20 | 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 | ounts(v,n).VALUES(new.a,1)...... |
13fb40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d | .ON.CONFLICT(v).DO.UPDATE.SET.n= |
13fb60 | 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 | n+1;.END;.CREATE.TRIGGER.r2.AFTE |
13fb80 | 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 | R.UPDATE.ON.t1.BEGIN...DELETE.FR |
13fba0 | 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 | OM.counts.WHERE.v=old.a.AND.n==1 |
13fbc0 | 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 | ;...UPDATE.counts.SET.n=n-1.WHER |
13fbe0 | 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 | E.v=old.a;...INSERT.INTO.counts( |
13fc00 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
13fc20 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
13fc40 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 | ND;.CREATE.TRIGGER.r3.AFTER.DELE |
13fc60 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
13fc80 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
13fca0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
13fcc0 | 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 | d.a;.END;.INSERT.INTO.t1(a).VALU |
13fce0 | 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 | ES(1),(2),(1),(3),(1),(3),(2),(4 |
13fd00 | 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 32 30 30 31 32 30 30 31 | ),(7);.UPDATE.t1.SET.a=520012001 |
13fd20 | 2d 30 31 2d 30 31 2d 30 31 2d 30 31 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 | -01-01-01-01;.DELETE.FROM.t1.WHE |
13fd40 | 52 45 20 61 3d 37 3b 0a 85 34 90 0c 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | RE.a=7;..4.....mCREATE.TABLE.t1( |
13fd60 | 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 c9 4e | a.INT);.CREATE.TABLE.counts(v..N |
13fd80 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 | TEGER.PRIMARY.KEY,.n.INT)/*WUT.R |
13fda0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | OWID*/;.CREATE.TRIGGER.r1.AFTER. |
13fdc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
13fde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
13fe00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
13fe20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
13fe40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
13fe60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
13fe80 | 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 4f 52 20 74 72 75 65 3d 4e 3b 0a | .json_object(1,1,1,1)OR.true=N;. |
13fea0 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
13fec0 | 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | v=old.a;...INSERT.INTO.counts(v, |
13fee0 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | n).VALUES(new.a,1)...ON.CONFLICT |
13ff00 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
13ff20 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
13ff40 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
13ff60 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
13ff80 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
13ffa0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
13ffc0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
13ffe0 | 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 0a | .UPDATE.t1.SET.a=5.WHERE.a=4;.D. |
140000 | 0d 00 00 00 13 00 a2 00 1d 77 1a ee 18 65 15 a6 12 f5 10 2b 0f 57 0e 83 0d af 0c db 0b 69 09 f3 | .........w...e.....+.W.......i.. |
140020 | 08 77 07 9c 06 20 04 a7 03 2b 02 22 00 a2 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .w.......+.".................... |
140040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
140060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
140080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1400a0 | 00 00 82 7c 90 29 04 00 85 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c | ...|.)...}CREATE.TABLE.t1(a.INT, |
1400c0 | 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 | b.INTEGER,.c.TEXT,.d.BLOB,.e.ANY |
1400e0 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f | ,.....UNIQUE(a).ON.CONFLICT.igno |
140100 | 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 | re,.....PRIMARY.KEY(b),.....UNIQ |
140120 | 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 | UE(c).ON.CONFLICT.fail.).WITHOUT |
140140 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 | .ROWID;.CREATE.INDEX.t1d.ON.t1(d |
140160 | 20 2d 31 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e | .-1);.CREATE.UNIQUE.INDEX.t1e.ON |
140180 | 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 | .t1(e);.INSERT.INTO.t1(a,b,c,d,e |
1401a0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e | ).VALUES(1,2,'abc','b3',3.5);.IN |
1401c0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 | SERT.INTO.t1.VALUES(2,2,'xyz',NU |
1401e0 | 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 | LL,4.25).ON.CONFLICT(b).DO.UPDAT |
140200 | 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 52 45 49 4e 44 45 | E.SET.e=max(e,excluded.e);REINDE |
140220 | 58 0a 82 05 90 28 04 00 84 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c | X....(....CREATE.TABLE.t1(a.INT, |
140240 | 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 | b.INTEGER,.c.TEXT,.d.BLOB,.e.ANY |
140260 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f | ,.....UNIQUE(a).ON.CONFLICT.igno |
140280 | 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 | re,.....PRIMARY.KEY(b),.....UNIQ |
1402a0 | 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 | UE(c).ON.CONFLICT.fail.).WITHOUT |
1402c0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 | .ROWID;.CREATE.INDEX.t1d.ON.t1(d |
1402e0 | 20 2d 31 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e | .-1);.CREATE.UNIQUE.INDEX.t1e.ON |
140300 | 20 74 31 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 2c 65 | .t1(.json_replace(1,1,1),b,c,d,e |
140320 | 29 20 56 41 4c 55 45 53 28 3b 0a 82 78 90 27 04 00 85 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ).VALUES(;..x.'...uCREATE.TABLE. |
140340 | 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c | t1(a.INT,b.INTEGER,.c.TEXT,.d.BL |
140360 | 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 | OB,.e.ANY,.....UNIQUE(a).ON.CONF |
140380 | 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c | LICT.ignore,.....PRIMARY.KEY(b), |
1403a0 | 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a | .....UNIQUE(c).ON.CONFLICT.fail. |
1403c0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 | ).WITHOUT.ROWID;.CREATE.INDEX.t1 |
1403e0 | 64 20 4f 4e 20 74 31 28 62 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | d.ON.t1(b);.CREATE.UNIQUE.INDEX. |
140400 | 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | t1e.ON.t1(e);.INSERT.INTO.t1(a,b |
140420 | 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e | ,c,d,e).VALUES(1,2,'abc','b3',3. |
140440 | 35 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 | 5);REPLACE.INTO.t1.VALUES(2,2,'x |
140460 | 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f | yz',NULL,4.25).ON.CONFLICT(b).DO |
140480 | 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b | .UPDATE.SET.e=max(e,excluded.e); |
1404a0 | 56 41 43 55 55 4d 0a 82 75 90 26 04 00 85 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | VACUUM..u.&...oCREATE.TABLE.t1(a |
1404c0 | 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 | .INT,b.INTEGER,.c.TEXT,.d.BLOB,. |
1404e0 | 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | e.ANY,.....UNIQUE(a).ON.CONFLICT |
140500 | 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 | .ignore,.....PRIMARY.KEY(b),.... |
140520 | 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 | .UNIQUE(c).ON.CONFLICT.fail.).WI |
140540 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 45 4e 44 64 | THOUT.ROWID;.CREATE.INDEX.t1ENDd |
140560 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
140580 | 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(e);.INSERT.INTO.t1(a,b, |
1405a0 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
1405c0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
1405e0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
140600 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | UPDATE.SET.e=max(e,excluded.e);. |
140620 | 82 78 90 25 04 00 85 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 | .x.%...uCREATE.TABLE.t1(a.INT,b. |
140640 | 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a | INTEGER,.c.TEXT,.d.BLOB,.e.ANY,. |
140660 | 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 | ....UNIQUE(a).ON.CONFLICT.ignore |
140680 | 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 | ,.....PRIMARY.KEY(b),.....UNIQUE |
1406a0 | 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 | (c).ON.CONFLICT.fail.).WITHOUT.R |
1406c0 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 41 53 64 20 4f 4e 20 74 31 28 64 29 3b | OWID;.CREATE.INDEX.ASd.ON.t1(d); |
1406e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 | .CREATE.UNIQUE.INDEX.t1e.ON.t1(e |
140700 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c | );.INSERT.INTO.t1(a,b,c,d,e).VAL |
140720 | 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 | UES(1,2,'abc','b3',3.5);.INSERT. |
140740 | 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e | INTO.t1.VALUES(2,2,'xyz',NULL,4. |
140760 | 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | 25).ON.CONFLICT(b).DO.UPDATE.SET |
140780 | 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 81 57 90 24 | .b=max(e,excluded.e);VACUUM..W.$ |
1407a0 | 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...3CREATE.TABLE.t1(a.INT,b.INTE |
1407c0 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
1407e0 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
140800 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
140820 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
140840 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 41 4e 41 4c 59 5a 45 74 31 64 20 4f 4e 20 74 31 28 | ;.CREATE.INDEX.ANALYZEt1d.ON.t1( |
140860 | 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 82 78 90 23 04 00 85 75 43 | d);ANALYZE.TEMP;VACUUM..x.#...uC |
140880 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 | REATE.TABLE.t1(a.INT,b.INTEGER,. |
1408a0 | 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 | c.TEXT,.d.BLOB,.e.ANY,.....UNIQU |
1408c0 | 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 | E(a).ON.CONFLICT.ignore,.....PRI |
1408e0 | 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f | MARY.KEY(b),.....UNIQUE(b).ON.CO |
140900 | 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | NFLICT.fail.).WITHOUT.ROWID;.CRE |
140920 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 | ATE.INDEX.t1d.ON.t1(d);.CREATE.U |
140940 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 | NIQUE.INDEX.t1e.ON.t1(e);.INSERT |
140960 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 | .INTO.t1(a,b,c,d,e).VALUES(1,2,' |
140980 | 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 | abc','b3',3.5);.INSERT.INTO.t1.V |
1409a0 | 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f | ALUES(2,2,'xyz',NULL,4.25).ON.CO |
1409c0 | 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c | NFLICT(b).DO.UPDATE.SET.e=max(e, |
1409e0 | 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 82 72 90 22 04 00 85 69 43 52 45 41 54 | excluded.e);VACUUM..r."...iCREAT |
140a00 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 | E.TABLE.t1(a.INT,b.INTEGER,.c.TE |
140a20 | 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 | XT,.d.BLOB,.e.ANY,.....UNIQUE(a) |
140a40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 4f 4c 4c 42 41 43 4b 20 20 20 20 50 52 49 4d 41 52 59 | .ON.CONFLICT.ROLLBACK....PRIMARY |
140a60 | 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .KEY(b),.....UNIQUE(c).ON.CONFLI |
140a80 | 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | CT.fail.).WITHOUT.ROWID;.CREATE. |
140aa0 | 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | INDEX.t1d.ON.t1(d);.CREATE.UNIQU |
140ac0 | 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | E.INDEX.t1e.ON.t1(e);.INSERT.INT |
140ae0 | 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 61 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 | O.t1(a,b,c,d,a).VALUES(1,2,'abc' |
140b00 | 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 | ,'b3',3.5);.INSERT.INTO.t1.VALUE |
140b20 | 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 | S(2,2,'xyz',NULL,4.25).ON.CONFLI |
140b40 | 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c | CT(b).DO.UPDATE.SET.b=max(e,excl |
140b60 | 75 64 65 64 2e 65 29 3b 0a 82 6e 90 21 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | uded.e);..n.!...aCREATE.TABLE.t1 |
140b80 | 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a.INT,b.INTEGER,.c.TEXT,.d.BLOB |
140ba0 | 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 | ,.e.ANY,.....UNIQUE(a).ON.CONFLI |
140bc0 | 43 54 20 52 45 50 4c 41 43 45 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 65 29 2c 0a 20 | CT.REPLACE.....PRIMARY.KEY(e),.. |
140be0 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
140c00 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 | WITHOUT.ROWID;.CREATE.INDEX.t1d. |
140c20 | 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ON.t1(d);.CREATE.UNIQUE.INDEX.t1 |
140c40 | 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | e.ON.t1(e);.INSERT.INTO.t1(a,b,c |
140c60 | 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 | ,d,e).VALUES(1,2,'abc','b3',3.5) |
140c80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a | ;.INSERT.INTO.t1.VALUES(2,2,'xyz |
140ca0 | 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 | ',NULL,4.25).ON.CONFLICT(b).DO.U |
140cc0 | 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 81 50 90 20 04 | PDATE.SET.e=max(e,excd.e);..P... |
140ce0 | 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 | ..%CREATE.TABLE.t1(a.INT,b.INTEG |
140d00 | 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 | ER,.c.TEXT,.d.BLOB,.e.ANY,.....U |
140d20 | 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 45 50 4c 41 43 45 0a 20 20 20 | NIQUE(a).ON.CONFLICT.REPLACE.... |
140d40 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(b),.....UNIQUE(c).O |
140d60 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
140d80 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 | .CREATE.INDEX.t1d.ON.t1(d);ANALY |
140da0 | 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 81 50 90 1f 04 00 83 25 43 52 45 41 54 45 20 54 41 | ZE.TEMP;VACUUM..P.....%CREATE.TA |
140dc0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 | BLE.t1(a.INT,b.INTEGER,.c.TEXT,. |
140de0 | 64 20 42 4c 4f 42 2c 20 65 20 41 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 4f 4e 20 | d.BLOB,.e.AEXPLAIN.QUERY.PLANON. |
140e00 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
140e20 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
140e40 | 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 | ail.).WITHOUT.ROWID;.CREATE.INDE |
140e60 | 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 | X.t1d.ON.t1(d);ANALYZE.TEMP;VACU |
140e80 | 55 4d 0a 81 50 90 1e 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | UM..P.....%CREATE.TABLE.t1(a.INT |
140ea0 | 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 45 | ,b.INTEGER,.c.TEXT,.d.BLOB,.e.AE |
140ec0 | 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | XPLAIN.QUERY.PLANON.CONFLICT.ign |
140ee0 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
140f00 | 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c).ON.CONFLICT.fail.).WITHOU |
140f20 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | T.ROWID;.CREATE.INDEX.t1d.ON.t1( |
140f40 | 64 29 3b 41 4e 41 4c 59 5a 45 00 54 45 4d 50 3b 56 41 43 55 55 4d 0a 81 50 90 1d 04 00 83 25 43 | d);ANALYZE.TEMP;VACUUM..P.....%C |
140f60 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 09 4e 54 45 47 45 52 2c 20 | REATE.TABLE.t1(a.INT,b..NTEGER,. |
140f80 | 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 45 58 50 4c 41 49 4e 20 51 55 45 52 59 | c.TEXT,.d.BLOB,.e.AEXPLAIN.QUERY |
140fa0 | 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 | .PLANON.CONFLICT.ignore,.....PRI |
140fc0 | 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f | MARY.KEY(b),.....UNIQUE(c).ON.CO |
140fe0 | 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | NFLICT.fail.).WITHOUT.ROWID;.CRE |
141000 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 | ATE.INDEX.t1d.ON.t1(d);ANALYZE.T |
141020 | 45 4d 50 3b 56 41 43 55 55 4d 0a 85 46 90 1c 04 00 8b 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 | EMP;VACUUM..F......CREATE.TABLE. |
141040 | 74 31 28 61 20 49 4e 54 29 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 43 52 45 | t1(a.INT);EXPLAIN.QUERY.PLAN.CRE |
141060 | 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ATE.TABLE.counts(v.INTEGER.PRIMA |
141080 | 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | RY.KEY,.n.INT)/*WUT.ROWID*/;.CRE |
1410a0 | 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 | ATE.TRIGGER.r1.AFTER.INSERT.ON.t |
1410c0 | 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | 1.BEGIN...INSERT.INTO.counts(v,n |
1410e0 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
141100 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
141120 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 | .CREATE.TRIGGER.r2.AFTER.UPDATE. |
141140 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...DELETE.FROM.counts |
141160 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 | .WHERE.v=old.a.AND.n==1;...UPDAT |
141180 | 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | E.counts.SET.n=n-1.WHERE.v=old.a |
1411a0 | 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | ;...INSERT.INTO.counts(v,n).VALU |
1411c0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
1411e0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
141200 | 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r3.AFTER.DELETE.ON.t1. |
141220 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
141240 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
141260 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b | ts.SET.n=n-1.WHERE.v=old.a;.END; |
141280 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 | .INSERT.INTO.t1(a).VALUES(1),(2) |
1412a0 | 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 | ,(1),(3),(1),(3),(2),(4),(7);.UP |
1412c0 | 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 | DATE.t1.SET.a=5.WHERE.a=4;.DELET |
1412e0 | 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 85 2d 90 1b 04 00 8a 5f 43 52 45 | E.FROM.t1.WHERE.a=7;..-....._CRE |
141300 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 | ATE.TABLE.t1(a.INT);EXPLAIN.CREA |
141320 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
141340 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 45 58 50 4c 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;EXPLA |
141360 | 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 | IN.CREATE.TRIGGER.r1.AFTER.INSER |
141380 | 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | T.ON.t1.BEGIN...INSERT.INTO.coun |
1413a0 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
1413c0 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
1413e0 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 | ;.END;.CREATE.TRIGGER.r2.AFTER.U |
141400 | 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | PDATE.ON.t1.BEGIN...DELETE.FROM. |
141420 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
141440 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
141460 | 3d 6f 6c e4 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e | =ol..a;...INSERT.INTO.counts(v,n |
141480 | 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | ).VALUES(new.a,1).......ON.CONFL |
1414a0 | 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b | ICT(v).DO.UPDATE.SET.n=n+1;.END; |
1414c0 | 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 | EXPLAIN.CREATE.TRIGGER.r3.AFTER. |
1414e0 | 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d | DELETE.ON.t1.BEGIN...DELETE.FROM |
141500 | 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a | .counts.WHERE.v=old.a.AND.n==1;. |
141520 | 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 | ..UPDATE.counts.SET.n=n-1.WHERE. |
141540 | 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 | v=old.a;.END;.INSERT.INTO.t1(a). |
141560 | 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 | VALUES(1),(2),(1),(3),(1),(3),(2 |
141580 | 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 | ),(4),(7);.UPDATE.t1.SET.a=5.WHE |
1415a0 | 52 45 20 61 3d 34 85 3b 90 1a 04 00 8a 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | RE.a=4.;.....{CREATE.TABLE.t1(a. |
1415c0 | 49 4e 54 29 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 | INT);EXPLAIN.CREATE.TABLE.counts |
1415e0 | 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a | (v.INTEGER.PRIMARY.KEY,.n.INT)/* |
141600 | 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 | WUT.ROWID*/;.CREATE.TRIGGER.r1.A |
141620 | 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 | FTER.INSERT.ON.t1.BEGIN...INSERT |
141640 | 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | .INTO.counts(v,n).VALUES(new.a,1 |
141660 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
141680 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
1416a0 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
1416c0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
1416e0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
141700 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
141720 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
141740 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
141760 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
141780 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
1417a0 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
1417c0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
1417e0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
141800 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
141820 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 | ,(2),(4),(7);.UPDATE.t1.SET.a=5. |
141840 | 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 | WHERE.a=4;.DELETE.FROM.t1.WHERE. |
141860 | 61 3d 37 3b 0a 85 05 90 19 04 00 8a 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | a=7;.........CREATE.TABLE.t1(a.I |
141880 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 2c 49 4e 54 45 52 | NT);.CREATE.TABLE.counts(v,INTER |
1418a0 | 53 45 43 54 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 | SECTRIMARY.KEY,.n.INT)/*WUT.ROWI |
1418c0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 | D*/;.CREATE.TRIGGER.r1.AFTER.INS |
1418e0 | 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f | ERT.ON.t1.BEGIN...INSERT.INTO.co |
141900 | 75 6e 74 73 28 49 4e 54 45 52 53 45 43 54 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c | unts(INTERSECTv,n).VALUES(new.a, |
141920 | 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 | 1).......ON.CONFLICT(v).DO.UPDAT |
141940 | 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | E.SET.n=n+1;.END;.CREATE.TRIGGER |
141960 | 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 | .r2.AFTER.UPDATE.ON.t1.BEGIN...D |
141980 | 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 | ELETE.FROM.counts.WHERE.v=old.a. |
1419a0 | 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d | AND.n==1;...UPDATE.counts.SET.n= |
1419c0 | 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | n-1.WHERE.v=old.a;...INSERT.INTO |
1419e0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
141a00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
141a20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r3.AF |
141a40 | 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.DELETE.ON.t1.BEGIN...DELETE. |
141a60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v=old.a.AND.n= |
141a80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
141aa0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ERE.v=old.a;.END;.INSERT.INTO.t1 |
141ac0 | 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 | (a).VALUES(1),(2),(1),(3),(1),(3 |
141ae0 | 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 05 90 18 04 00 8a 0f 43 52 45 41 54 45 20 54 41 42 | ),(2),(4),(7);........CREATE.TAB |
141b00 | 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 | LE.t1(a.INT);.CREATE.TABLE.count |
141b20 | 73 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 2f | s(v,INTEGER.PRIMARY.KEY,.n,INT)/ |
141b40 | 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 | *WUT.ROWID*/;.CREATE.TRIGGER.r1. |
141b60 | 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 | AFTER.INSERT.ON.t1.BEGIN...INSER |
141b80 | 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 49 4e 54 45 52 53 45 43 54 76 2c 6e 29 20 56 41 4c 55 | T.INTO.counts(INTERSECTv,n).VALU |
141ba0 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
141bc0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
141be0 | 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
141c00 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
141c20 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
141c40 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
141c60 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
141c80 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
141ca0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
141cc0 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
141ce0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
141d00 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
141d20 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
141d40 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
141d60 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 85 05 90 17 04 00 8a 0f 43 | 3),(1),(3),(2),(4),(7);........C |
141d80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a.INT);.CREATE.TA |
141da0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v,INTEGER.PRIMARY.KEY |
141dc0 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
141de0 | 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
141e00 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 49 4e 54 45 52 53 45 43 54 | N...INSERT.INTO.counts(INTERSECT |
141e20 | 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f | v,n).VALUES(new.a,1).......ON.CO |
141e40 | 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 | NFLICT(v).DO.UPDATE.SET.n=n+1;.E |
141e60 | 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 | ND;.CREATE.TRIGGER.r2.AFTER.UPDA |
141e80 | 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 | TE.ON.t1.BEGIN...DELETE.FROM.cou |
141ea0 | 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 | nts.WHERE.v=old.a.AND.n==1;...UP |
141ec0 | 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c | DATE.counts.SET.n=n-1.WHERE.v=ol |
141ee0 | 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 | d.a;...INSERT.INTO.counts(v,n).V |
141f00 | 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ALUES(new.a,1).......ON.CONFLICT |
141f20 | 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 | (v).DO.UPDATE.SET.n=n+1;.END;.CR |
141f40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 | EATE.TRIGGER.r3.AFTER.DELETE.ON. |
141f60 | 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 | t1.BEGIN...DELETE.FROM.counts.WH |
141f80 | 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 | ERE.v=old.a.AND.n==1;...UPDATE.c |
141fa0 | 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 | ounts.SET.n=n-1.WHERE.v=old.a;.E |
141fc0 | 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c | ND;.INSERT.INTO.t1(a).VALUES(1), |
141fe0 | 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b | (2),(1),(3),(1),(3),(2),(4),(7); |
142000 | 0d 00 00 00 17 01 78 00 1f 29 1d ad 1c a3 1b 9d 1a 9b 19 83 18 6f 17 5f 16 59 14 d9 13 5c 11 e2 | ......x..)...........o._.Y...\.. |
142020 | 10 5f 0e da 0d 5a 0b e4 0a 68 08 eb 07 6f 05 f2 04 7c 02 f4 01 78 00 00 00 00 00 00 00 00 00 00 | ._...Z...h...o...|...x.......... |
142040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
142060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
142080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1420a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1420c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1420e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
142100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
142120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
142140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
142160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 78 90 40 04 00 85 75 | .........................x.@...u |
142180 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c | CREATE.TABLE.t1(a.INT,b.INTEGER, |
1421a0 | 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 | .c.TEXT,.d.BLOB,.e.ANY,.....UNIQ |
1421c0 | 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 | UE(a).ON.CONFLICT.ignore,.....PR |
1421e0 | 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 | IMARY.KEY(b),.....UNIQUE(c).ON.C |
142200 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | ONFLICT.fail.).WITHOUT.ROWID;.CR |
142220 | 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 | EATE.INDEX.t1d.ON.t1(d);.CREATE. |
142240 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 | UNIQUE.INDEX.t1e.ON.t1(e);.INSER |
142260 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | T.INTO.t1(a,b,c,d,e).VALUES(1,2, |
142280 | 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | 'abc','b3',3.5);.INSERT.INTO.t1. |
1422a0 | 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 | VALUES(2,2,'xyz',NULL,4.25).ON.C |
1422c0 | 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | ONFLICT(b).DO.UPDATE.SET.e=max(e |
1422e0 | 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 83 04 90 3f 04 00 86 0d 43 52 45 41 | ,excluded.e);VACUUM....?....CREA |
142300 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 | TE.TABLE.t1(a.INT,b.INTEGER,.c.T |
142320 | 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 | EXT,.d.BLOB,.e.ANY,.....UNIQUE(a |
142340 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 | ).ON.CONFLICT.ignore,.....PRIMAR |
142360 | 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c | Y.KEY(b),.....UNIQUE(c).ON.CONFL |
142380 | 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ICT.fail.).WITHOUT.ROWID;.CREATE |
1423a0 | 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .INDEX.t1d.ON.t1(d);.CREATE.UNIQ |
1423c0 | 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e | UE.INDEX.t1e.ON.t1(e);.INSERT.IN |
1423e0 | 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 | TO.t1(a,b,c,d,e).VALUES(1,2,'abc |
142400 | 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 | ','b3',3.5);.INSERT.INTO.t1.VALU |
142420 | 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c | ES(2,2,'xyz',NULL,4.25).ON.CONFL |
142440 | 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 | ICT(b).DO.UPDATE.SET.e=max(e,exc |
142460 | 6c 75 64 65 64 2e 65 29 3b 52 45 49 4e 44 45 58 20 72 74 72 69 6d 28 31 2c 31 29 0a 82 72 90 3e | luded.e);REINDEX.rtrim(1,1)..r.> |
142480 | 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...iCREATE.TABLE.t1(a.INT,b.INTE |
1424a0 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
1424c0 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
1424e0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
142500 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
142520 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
142540 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 | ATE.UNIQUE.INDEX.t1e.ON.t1(e);.I |
142560 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1(a,b,c,d,e).VALUES( |
142580 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,2,'abc','b3',3.5);.INSERT.INTO |
1425a0 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
1425c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 20 | ON.CONFLICT(b).DO.UPDATE.SET.e=. |
1425e0 | 6a 73 6f 6e 5f 65 78 74 72 61 63 74 28 31 2c 31 29 0a 82 79 90 3d 04 00 85 77 43 52 45 41 54 45 | json_extract(1,1)..y.=...wCREATE |
142600 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 | .TABLE.t1(a.INT,b.INTEGER,.c.TEX |
142620 | 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 | T,.d.BLOB,.e.ANY,.....UNIQUE(a). |
142640 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 | ON.CONFLICT.ignore,.....PRIMARY. |
142660 | 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | KEY(b),.....UNIQUE(c).ON.CONFLIC |
142680 | 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 | T.fail.).WITHOUT.ROWID;.CREATE.I |
1426a0 | 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | NDEX.t1d.ON.t1(d);.CREATE.UNIQUE |
1426c0 | 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .INDEX.t1e.ON.t1(e);.INSERT.INTO |
1426e0 | 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c | .t1(a,b,c,d,e).VALUES(1,2,'abc', |
142700 | 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 | 'b3',3.5);.INSERT.INTO.t1.VALUES |
142720 | 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | (2,2,'xyz',NULL,4.25).ON.CONFLIC |
142740 | 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 | T(b).DO.UPDATE.SET.b=max(e,exclu |
142760 | 64 65 64 2e 65 29 3b 52 45 49 4e 44 45 58 0a 82 78 90 3c 04 00 85 75 43 52 45 41 54 45 20 54 41 | ded.e);REINDEX..x.<...uCREATE.TA |
142780 | 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 | BLE.t1(a.INT,b.INTEGER,.c.TEXT,. |
1427a0 | 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 | d.BLOB,.e.ANY,.....UNIQUE(a).ON. |
1427c0 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
1427e0 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
142800 | 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 | ail.).WITHOUT.ROWID;.CREATE.INDE |
142820 | 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | X.t1d.ON.t1(d);.CREATE.UNIQUE.IN |
142840 | 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | DEX.t1e.ON.t1(e);.INSERT.INTO.t1 |
142860 | 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 | (a,b,c,d,e).VALUES(1,2,'abc','b3 |
142880 | 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c | ',3.5);.INSERT.INTO.t1.VALUES(2, |
1428a0 | 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 | 2,'xyz',NULL,4.25).ON.CONFLICT(b |
1428c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 20 6c 69 6b 65 6c 79 28 | ).DO.UPDATE.SET.b=max(e,.likely( |
1428e0 | 31 29 29 3b 56 41 43 55 55 4d 0a 82 79 90 3b 04 00 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 | 1));VACUUM..y.;...wCREATE.TABLE. |
142900 | 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c | t1(a.INT,b.INTEGER,.c.TEXT,.d.BL |
142920 | 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 | OB,.e.ANY,.....UNIQUE(a).ON.CONF |
142940 | 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c | LICT.ignore,.....PRIMARY.KEY(b), |
142960 | 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a | .....UNIQUE(c).ON.CONFLICT.fail. |
142980 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 | ).WITHOUT.ROWID;.CREATE.INDEX.t1 |
1429a0 | 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | d.ON.t1(d);.CREATE.UNIQUE.INDEX. |
1429c0 | 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | t1e.ON.t1(e);.INSERT.INTO.t1(a,b |
1429e0 | 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e | ,c,d,e).VALUES(1,2,'abc','b3',3. |
142a00 | 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 | 5);.INSERT.INTO.t1.VALUES(2,2,'x |
142a20 | 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 2f 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f | yz',NULL,4./5).ON.CONFLICT(b).DO |
142a40 | 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 4f | .UPDATE.SET.e=max(e,excluded.e)O |
142a60 | 52 20 74 72 75 65 3b 0a 82 78 90 3a 04 00 85 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | R.true;..x.:...uCREATE.TABLE.t1( |
142a80 | 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c | a.INT,b.INTEGER,.c.TEXT,.d.BLOB, |
142aa0 | 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .e.ANY,.....UNIQUE(a).ON.CONFLIC |
142ac0 | 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 | T.ignore,.....PRIMARY.KEY(b),... |
142ae0 | 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 | ..UNIQUE(c).ON.CONFLICT.fail.).W |
142b00 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f | ITHOUT.ROWID;.CREATE.INDEX.t1d.O |
142b20 | 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 | N.t1(d);.CREATE.UNIQUE.INDEX.t1e |
142b40 | 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c | .ON.t1(e);.INSERT.INTO.t1(a,b,c, |
142b60 | 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b | d,e).VALUES(1,2,'abc','b3',3.5); |
142b80 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 | .INSERT.INTO.t1.VALUES(2,2,'xyz' |
142ba0 | 2c 4e 55 4c 4c 2c 34 2e 26 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 | ,NULL,4.&5).ON.CONFLICT(b).DO.UP |
142bc0 | 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 | DATE.SET.e=max(e,excluded.e);VAC |
142be0 | 55 55 4d 0a 82 72 90 39 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | UUM..r.9...iCREATE.TABLE.t1(a.IN |
142c00 | 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 | T,b.INTEGER,.c.TEXT,.d.BLOB,.e.A |
142c20 | 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 | NY,.....UNIQUE(a).ON.CONFLICT.ig |
142c40 | 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e | nore,.....PRIMARY.KEY(b),.....UN |
142c60 | 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f | IQUE(c).ON.CONFLICT.fail.).WITHO |
142c80 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 | UT.ROWID;.CREATE.INDEX.t1d.ON.t1 |
142ca0 | 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 | (d);.CREATE.UNIQUE.INDEX.t1e.ON. |
142cc0 | 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 | t1(e);.INSERT.INTO.t1(a,b,c,d,e) |
142ce0 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 | .VALUES(1,2,'abc','b3',3.5);.INS |
142d00 | 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c | ERT.INTO.t1.VALUES(2,2,'xyz',NUL |
142d20 | 4c 2c 34 2e 25 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 | L,4.%5).ON.CONFLICT(b).DO.UPDATE |
142d40 | 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 7c 90 38 04 00 | .SET.e=max(e,excluded.e);..|.8.. |
142d60 | 85 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 | .}CREATE.TABLE.t1(a.INT,b.INTEGE |
142d80 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e.ANY,.....UN |
142da0 | 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 | IQUE(a).ON.CONFLICT.ignore,..... |
142dc0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e | PRIMARY.KEY(b),.....UNIQUE(c).ON |
142de0 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | .CONFLICT.fail.).WITHOUT.ROWID;. |
142e00 | 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 | CREATE.INDEX.t1d.ON.t1(d);.CREAT |
142e20 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 | E.UNIQUE.INDEX.t1e.ON.t1(e);.INS |
142e40 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1(a,b,c,d,e).VALUES(1, |
142e60 | 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 20 7c 7c 20 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 2,'abc','b3',3.||..5);.INSERT.IN |
142e80 | 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | TO.t1.VALUES(2,2,'xyz',NULL,4.25 |
142ea0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 | ).ON.CONFLICT(b).DO.UPDATE.SET.e |
142ec0 | 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 83 01 90 37 04 00 | =max(e,excluded.e);VACUUM....7.. |
142ee0 | 86 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 | ..CREATE.TABLE.t1(a.INT,b.INTEGE |
142f00 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e.ANY,.....UN |
142f20 | 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 | IQUE(a).ON.CONFLICT.ignore,..... |
142f40 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e | PRIMARY.KEY(b),.....UNIQUE(c).ON |
142f60 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | .CONFLICT.fail.).WITHOUT.ROWID;. |
142f80 | 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 | CREATE.INDEX.t1d.ON.t1(d);.CREAT |
142fa0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 | E.UNIQUE.INDEX.t1e.ON.t1(e);.INS |
142fc0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1(a,b,c,d,e).VALUES(1, |
142fe0 | 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 20 7c 20 72 6f 75 6e 64 28 31 2c 31 29 7c 20 2e 35 29 | 2,'abc','b3',3.|.round(1,1)|..5) |
143000 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a | ;.INSERT.INTO.t1.VALUES(2,2,'xyz |
143020 | 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 | ',NULL,4.25).ON.CONFLICT(b).DO.U |
143040 | 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 | PDATE.SET.e=max(e,excluded.e);.. |
143060 | 7f 90 36 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | ..6....CREATE.TABLE.t1(a.INT,b.I |
143080 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
1430a0 | 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(a).ON.CONFLICT.ignore, |
1430c0 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(b),.....UNIQUE( |
1430e0 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
143100 | 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a | WID;.CREATE.INDEX.t1d.ON.t1(d);. |
143120 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 | CREATE.UNIQUE.INDEX.t1e.ON.t1(e) |
143140 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 | ;.INSERT.INTO.t1(a,b,c,d,e).VALU |
143160 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 20 7c 20 72 61 6e 64 6f 6d 28 29 7c 20 | ES(1,2,'abc','b3',3.|.random()|. |
143180 | 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 | .5);.INSERT.INTO.t1.VALUES(2,2,' |
1431a0 | 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 | xyz',NULL,4.25).ON.CONFLICT(b).D |
1431c0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 | O.UPDATE.SET.e=max(e,excluded.e) |
1431e0 | 3b 0a 82 76 90 35 04 00 85 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c | ;..v.5...qCREATE.TABLE.t1(a.INT, |
143200 | 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 | b.INTEGER,.c.TEXT,.d.BLOB,.e.ANY |
143220 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f | ,.....UNIQUE(a).ON.CONFLICT.igno |
143240 | 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 | re,.....PRIMARY.KEY(b),.....UNIQ |
143260 | 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 | UE(c).ON.CONFLICT.fail.).WITHOUT |
143280 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 | .ROWID;.CREATE.INDEX.t1d.ON.t1(d |
1432a0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 | );.CREATE.UNIQUE.INDEX.t1e.ON.t1 |
1432c0 | 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 | (e);.INSERT.INTO.t1(a,b,c,d,e).V |
1432e0 | 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 20 4f 52 20 2e 35 29 3b 0a 49 | ALUES(1,2,'abc','b3',3.OR..5);.I |
143300 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e | NSERT.INTO.t1.VALUES(2,2,'xyz',N |
143320 | 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 | ULL,4.25).ON.CONFLICT(b).DO.UPDA |
143340 | 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 79 90 34 | TE.SET.e=max(e,excluded.e);..y.4 |
143360 | 04 00 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...wCREATE.TABLE.t1(a.INT,b.INTE |
143380 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
1433a0 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
1433c0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
1433e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
143400 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
143420 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 | ATE.UNIQUE.INDEX.t1e.ON.t1(e);.I |
143440 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1(a,b,c,d,e).VALUES( |
143460 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 20 2d 2e 33 20 7c 7c 20 2e 35 29 3b 0a 49 4e 53 45 | 1,2,'abc','b3',.-.3.||..5);.INSE |
143480 | 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c | RT.INTO.t1.VALUES(2,2,'xyz',NULL |
1434a0 | 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,4.25).ON.CONFLICT(b).DO.UPDATE. |
1434c0 | 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 7c 90 33 04 00 85 | SET.e=max(e,excluded.e);..|.3... |
1434e0 | 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 | }CREATE.TABLE.t1(a.INT,b.INTEGER |
143500 | 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 | ,.c.TEXT,.d.BLOB,.e.ANY,.....UNI |
143520 | 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 | QUE(a).ON.CONFLICT.ignore,.....P |
143540 | 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 | RIMARY.KEY(b),.....UNIQUE(c).ON. |
143560 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | CONFLICT.fail.).WITHOUT.ROWID;.C |
143580 | 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 | REATE.INDEX.t1d.ON.t1(d);.CREATE |
1435a0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 2d 31 29 3b 0a 49 | .UNIQUE.INDEX.t1e.ON.t1(e.-1);.I |
1435c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1(a,b,c,d,e).VALUES( |
1435e0 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,2,'abc','b3',3.5);.INSERT.INTO |
143600 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
143620 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d | ON.CONFLICT(b).DO.UPDATE.SET.e=m |
143640 | 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 52 45 49 4e 44 45 58 0a 82 02 90 32 04 00 84 | ax(e,excluded.e);REINDEX....2... |
143660 | 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 | .CREATE.TABLE.t1(a.INT,b.INTEGER |
143680 | 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 | ,.c.TEXT,.d.BLOB,.e.ANY,.....UNI |
1436a0 | 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 | QUE(a).ON.CONFLICT.ignore,.....P |
1436c0 | 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 | RIMARY.KEY(b),.....UNIQUE(c).ON. |
1436e0 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | CONFLICT.fail.).WITHOUT.ROWID;.C |
143700 | 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 | REATE.INDEX.t1d.ON.t1(d);.CREATE |
143720 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 6a 73 6f 6e 5f 72 65 | .UNIQUE.INDEX.t1e.ON.t1(.json_re |
143740 | 70 6c 61 63 65 28 29 2c 31 2c 31 29 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 3b 0a 82 | place(),1,1),b,c,d,e).VALUES(;.. |
143760 | 0c 90 31 04 00 84 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | ..1....CREATE.TABLE.t1(a.INT,b.I |
143780 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
1437a0 | 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(a).ON.CONFLICT.ignore, |
1437c0 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(b),.....UNIQUE( |
1437e0 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
143800 | 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a | WID;.CREATE.INDEX.t1d.ON.t1(d);. |
143820 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 6a | CREATE.UNIQUE.INDEX.t1e.ON.t1(.j |
143840 | 73 6f 6e 5f 72 65 70 2c 61 63 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 65 2c 62 2c 63 | son_rep,ace(1,1,1)COLLATE.ne,b,c |
143860 | 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 3b 0a 82 10 90 30 04 00 84 25 43 52 45 41 54 45 20 54 41 | ,d,e).VALUES(;....0...%CREATE.TA |
143880 | 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 | BLE.t1(a.INT,b.INTEGER,.c.TEXT,. |
1438a0 | 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 | d.BLOB,.e.ANY,.....UNIQUE(a).ON. |
1438c0 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
1438e0 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
143900 | 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 | ail.).WITHOUT.ROWID;.CREATE.INDE |
143920 | 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | X.t1d.ON.t1(d);.CREATE.UNIQUE.IN |
143940 | 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 6a 73 6f 6e 5f 72 65 70 2c 61 63 65 28 31 2c 31 2c | DEX.t1e.ON.t1(.json_rep,ace(1,1, |
143960 | 31 29 43 4f 4c 4c 41 54 45 20 20 61 2c 62 6e 65 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 | 1)COLLATE..a,bne,b,c,d,e).VALUES |
143980 | 28 3b 0a 82 14 90 2f 04 00 84 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | (;..../...-CREATE.TABLE.t1(a.INT |
1439a0 | 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e | ,b.INTEGER,.c.TEXT,.d.BLOB,.e.AN |
1439c0 | 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | Y,.....UNIQUE(a).ON.CONFLICT.ign |
1439e0 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
143a00 | 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c).ON.CONFLICT.fail.).WITHOU |
143a20 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | T.ROWID;.CREATE.INDEX.t1d.ON.t1( |
143a40 | 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 | d);.CREATE.UNIQUE.INDEX.t1e.ON.t |
143a60 | 31 28 20 6a 73 6f 6e 5f 72 65 70 2c 61 63 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 20 20 | 1(.json_rep,ace(1,1,1)COLLATE... |
143a80 | 61 2c 62 61 2c 62 6e 65 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 3b 0a 81 7e 90 2e 04 | a,ba,bne,b,c,d,e).VALUES(;..~... |
143aa0 | 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 | ...CREATE.TABLE.t1(a.INT,b.INTEG |
143ac0 | 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 | ER,.c.TEXT,.d.BLOB,.e.ANY,.....U |
143ae0 | 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 | NIQUE(a).ON.CONFLICT.ignore,.... |
143b00 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(b),.....UNIQUE(c).O |
143b20 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
143b40 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 | .CREATE.INDEX.t1d.ON.t1(d);.CREA |
143b60 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 61 2c 20 2f 2a | TE.UNIQUE.INDEX.t1e.ON.t1(.a,./* |
143b80 | 20 2a 2f 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 3b 0a 82 02 90 | .*/(1,1,1),b,c,d,e).VALUES(;.... |
143ba0 | 2d 04 00 84 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 | -....CREATE.TABLE.t1(a.INT,b.INT |
143bc0 | 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 | EGER,.c.TEXT,.d.BLOB,.e.ANY,.... |
143be0 | 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 | .UNIQUE(a).ON.CONFLICT.ignore,.. |
143c00 | 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 | ...PRIMARY.KEY(b),.....UNIQUE(c) |
143c20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .ON.CONFLICT.fail.).WITHOUT.ROWI |
143c40 | 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 | D;.CREATE.INDEX.t1d.ON.t1(d);.CR |
143c60 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 20 61 2c | EATE.UNIQUE.INDEX.t1e.ON.t1(..a, |
143c80 | 62 61 2c 62 6e 2c 61 63 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 | ba,bn,ace(1,1,1),b,c,d,e).VALUES |
143ca0 | 28 3b 0a 82 06 90 2c 04 00 84 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 | (;....,....CREATE.TABLE.t1(a.INT |
143cc0 | 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e | ,b.INTEGER,.c.TEXT,.d.BLOB,.e.AN |
143ce0 | 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | Y,.....UNIQUE(a).ON.CONFLICT.ign |
143d00 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
143d20 | 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c).ON.CONFLICT.fail.).WITHOU |
143d40 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | T.ROWID;.CREATE.INDEX.t1d.ON.t1( |
143d60 | 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 | d);.CREATE.UNIQUE.INDEX.t1e.ON.t |
143d80 | 31 28 20 20 20 61 2c 62 61 2c 62 61 2c 62 6e 2c 61 63 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 | 1(...a,ba,ba,bn,ace(1,1,1),b,c,d |
143da0 | 2c 65 29 20 56 41 4c 55 45 53 28 3b 0a 82 78 90 2b 04 00 85 75 43 52 45 41 54 45 20 54 41 42 4c | ,e).VALUES(;..x.+...uCREATE.TABL |
143dc0 | 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 | E.t1(a.INT,b.INTEGER,.c.TEXT,.d. |
143de0 | 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f | BLOB,.e.ANY,.....UNIQUE(a).ON.CO |
143e00 | 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | NFLICT.ignore,.....PRIMARY.KEY(b |
143e20 | 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 | ),.....UNIQUE(c).ON.CONFLICT.fai |
143e40 | 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 | l.).WITHOUT.ROWID;.CREATE.INDEX. |
143e60 | 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 20 2f 2a 20 2a 2f 20 49 4e 44 45 | t1d.ON.t1(d);.CREATE../*.*/.INDE |
143e80 | 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | X.t1e.ON.t1(e);.INSERT.INTO.t1(a |
143ea0 | 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c | ,b,c,d,e).VALUES(1,2,'abc','b3', |
143ec0 | 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c | 3.5);.INSERT.INTO.t1.VALUES(2,2, |
143ee0 | 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 | 'xyz',NULL,4.25).ON.CONFLICT(b). |
143f00 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 | DO.UPDATE.SET.b=max(e,excluded.e |
143f20 | 29 3b 56 41 43 55 55 4d 0a 81 53 90 2a 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | );VACUUM..S.*...+CREATE.TABLE.t1 |
143f40 | 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a.INT,b.INTEGER,.c.TEXT,.d.BLOB |
143f60 | 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 | ,.e.ANY,.....UNIQUE(a).ON.CONFLI |
143f80 | 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 | CT.ignore,.....PRIMARY.KEY(b),.. |
143fa0 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
143fc0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 | WITHOUT.ROWID;.CREATE.INDEX.t1d. |
143fe0 | 4f 4e 20 74 31 28 64 20 2d 31 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a | ON.t1(d.-1);ANALYZE.TEMP;VACUUM. |
144000 | 0d 00 00 00 18 01 0d 00 1e 8a 1d 07 1b 7f 1a 09 18 93 17 11 15 9b 14 1e 12 7c 10 f8 0f 7c 0e a8 | .........................|...|.. |
144020 | 0d d3 0d 02 0c 2d 0b 20 09 9f 08 1c 07 41 06 3b 04 c5 03 f1 02 7f 01 0d 00 00 00 00 00 00 00 00 | .....-.......A.;................ |
144040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
144060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
144080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1440a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1440c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1440e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
144100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 82 6e 90 58 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c | ..............n.X...aCREATE.TABL |
144120 | 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 | E.t1(a.INT,b.INTEGER,.c.TEXT,.d. |
144140 | 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f | BLOB,.e.ANY,.....UNIQUE(a).ON.CO |
144160 | 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | NFLICT.ignore,.....PRIMARY.KEY(d |
144180 | 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 | ),.....UNIQUE(c).ON.CONFLICT.fai |
1441a0 | 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 | l.).WITHOUT.ROWID;.CREATE.INDEX. |
1441c0 | 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | t1d.ON.t1(d);.CREATE.UNIQUE.INDE |
1441e0 | 58 20 74 31 65 20 4f 4e 20 74 31 28 64 29 3b 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 74 31 28 61 | X.t1e.ON.t1(d);REINDEX.INTO.t1(a |
144200 | 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c | ,b,c,d,e).VALUES(1,2,'abc','b3', |
144220 | 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c | 3.5);.INSERT.INTO.t1.VALUES(2,2, |
144240 | 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 | 'xyz',NULL,4.25).ON.CONFLICT(b). |
144260 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 | DO.UPDATE.SET.e=max(e,excd.e);.. |
144280 | 6e 90 57 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | n.W...aCREATE.TABLE.t1(a.INT,b.I |
1442a0 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
1442c0 | 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(a).ON.CONFLICT.ignore, |
1442e0 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(d),.....UNIQUE( |
144300 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
144320 | 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a | WID;.CREATE.INDEX.t1d.ON.t1(d);. |
144340 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 64 29 | CREATE.UNIQUE.INDEX.t1e.ON.t1(d) |
144360 | 3b 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 | ;ANALYZE.INTO.t1(a,b,c,d,e).VALU |
144380 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 | ES(1,2,'abc','b3',3.5);.INSERT.I |
1443a0 | 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 | NTO.t1.VALUES(2,2,'xyz',NULL,4.2 |
1443c0 | 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 5).ON.CONFLICT(b).DO.UPDATE.SET. |
1443e0 | 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 81 50 90 56 04 00 83 25 43 52 45 41 54 45 20 | e=max(e,excd.e);..P.V...%CREATE. |
144400 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 | TABLE.t1(a.INT,b.INTEGER,.c.TEXT |
144420 | 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f | ,.d.BLOB,.e.ANY,.....UNIQUE(a).O |
144440 | 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b | N.CONFLICT.ignore,.....PRIMARY.K |
144460 | 45 59 28 63 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | EY(c),.....UNIQUE(c).ON.CONFLICT |
144480 | 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e | .fail.).WITHOUT.ROWID;.CREATE.IN |
1444a0 | 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 | DEX.t1d.ON.t1(d);ANALYZE.TEMP;VA |
1444c0 | 43 55 55 4d 0a 82 72 90 55 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | CUUM..r.U...iCREATE.TABLE.t1(a.I |
1444e0 | 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 | NT,b.INTEGER,.c.TEXT,.d.BLOB,.e. |
144500 | 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 | ANY,.....UNIQUE(a).ON.CONFLICT.i |
144520 | 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 63 29 2c 0a 20 20 20 20 55 | gnore,.....PRIMARY.KEY(c),.....U |
144540 | 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 | NIQUE(c).ON.CONFLICT.fail.).WITH |
144560 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 | OUT.ROWID;.CREATE.INDEX.t1d.ON.t |
144580 | 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e | 1(d);.CREATE.UNIQUE.INDEX.t1e.ON |
1445a0 | 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 | .t1(e);.INSERT.INTO.t1(a,b,c,d,e |
1445c0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e | ).VALUES(1,2,'abc','b3',3.5);.IN |
1445e0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 | SERT.INTO.t1.VALUES(2,2,'xyz',NU |
144600 | 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 | LL,4.25).ON.CONFLICT(b).DO.UPDAT |
144620 | 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 02 90 54 04 | E.SET.e=max(e,excluded.e);....T. |
144640 | 00 84 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 | ...CREATE.TABLE.t1(a.INT,b.INTEG |
144660 | 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 | ER,.c.TEXT,.d.BLOB,.e.ANY,.....U |
144680 | 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 | NIQUE(a).ON.CONFLICT.ignore,.... |
1446a0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 63 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(c),.....UNIQUE(c).O |
1446c0 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
1446e0 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 | .CREATE.INDEX.t1d.ON.t1(d);.CREA |
144700 | 54 45 20 20 2f 2a 20 2a 2f 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 6a 73 6f 6e 5f | TE../*.*/.INDEX.t1e.ON.t1(.json_ |
144720 | 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 3b | replace(1,1,1),b,c,d,e).VALUES(; |
144740 | 0a 81 57 90 53 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 | ..W.S...3CREATE.TABLE.t1(a.INT,b |
144760 | 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c | .INTEGER,.c.TEXT,.d.BLOB,.e.ANY, |
144780 | 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 | .....UNIQUE(a).ON.CONFLICT.ignor |
1447a0 | 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 | e,.....PRIMARY.KEY(b),.....UNIQU |
1447c0 | 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 | E(c).ON.CONFLICT.fail.).WITHOUT. |
1447e0 | 52 4f 57 49 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f | ROWID;EXPLAIN.CREATE.INDEX.t1d.O |
144800 | 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 82 7f 90 52 | N.t1(d);ANALYZE.TEMP;VACUUM....R |
144820 | 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ....CREATE.TABLE.t1(a.INT,b.INTE |
144840 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
144860 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
144880 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
1448a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
1448c0 | 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | ;EXPLAIN.CREATE.INDEX.t1d.ON.t1( |
1448e0 | 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 | d);.CREATE.UNIQUE.INDEX.t1e.ON.t |
144900 | 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 | 1(e);.INSERT.INTO.t1(a,b,c,d,e). |
144920 | 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 | VALUES(1,2,'abc','b3',3.5);.INSE |
144940 | 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c | RT.INTO.t1.VALUES(2,2,'xyz',NULL |
144960 | 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,4.25).ON.CONFLICT(b).DO.UPDATE. |
144980 | 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 82 | SET.b=max(e,excluded.e);VACUUM.. |
1449a0 | 7d 90 51 04 00 85 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | }.Q....CREATE.TABLE.t1(a.INT,b.I |
1449c0 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
1449e0 | 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(a).ON.CONFLICT.ignore, |
144a00 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(b),.....UNIQUE( |
144a20 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
144a40 | 57 49 44 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 | WID;EXPLAIN.CREATE.INDEX.t1d.ON. |
144a60 | 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f | t1(d);.CREATE.UNIQUE.INDEX.t1e.O |
144a80 | 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c | N.t1(e);.INSERT.INTO.t1(a,b,c,d, |
144aa0 | 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 20 7c 7c 20 2e 35 | e).VALUES(1,2,'abc','b3',3.||..5 |
144ac0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
144ae0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
144b00 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | UPDATE.SET.e=max(e,excluded.e);. |
144b20 | 82 09 90 50 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 | ...P....CREATE.TABLE.t1(a.INT,b. |
144b40 | 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a | INTEGER,.c.TEXT,.d.BLOB,.e.ANY,. |
144b60 | 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 | ....UNIQUE(a).ON.CONFLICT.ignore |
144b80 | 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 | ,.....PRIMARY.KEY(b),.....UNIQUE |
144ba0 | 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 | (c).ON.CONFLICT.fail.).WITHOUT.R |
144bc0 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b | OWID;.CREATE.INDEX.t1d.ON.t1(d); |
144be0 | 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 | EXPLAIN.CREATE.UNIQUE.INDEX.t1e. |
144c00 | 4f 4e 20 74 31 28 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 | ON.t1(.json_replace(1,1,1),b,c,d |
144c20 | 2c 65 29 20 56 41 4c 55 45 53 28 3b 0a 81 51 90 4f 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c | ,e).VALUES(;..Q.O...'CREATE.TABL |
144c40 | 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 | E.t1(a.INT,b.INTEGER,.c.TEXT,.d. |
144c60 | 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f | BLOB,.e.ANY,.....UNIQUE(a).ON.CO |
144c80 | 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | NFLICT.ignore,.....PRIMARY.KEY(b |
144ca0 | 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 | ),.....UNIQUE(c).ON.CONFLICT.fai |
144cc0 | 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 | l.).WITHOUT.ROWID;.CREATE.INDEX. |
144ce0 | 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 52 45 49 4e 44 45 | t1d.ON.t1(d);ANALYZE.TEMP;REINDE |
144d00 | 58 0a 81 4d 90 4e 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c | X..M.N....CREATE.TABLE.t1(a.INT, |
144d20 | 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 | b.INTEGER,.c.TEXT,.d.BLOB,.e.ANY |
144d40 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f | ,.....UNIQUE(a).ON.CONFLICT.igno |
144d60 | 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 | re,.....PRIMARY.KEY(b),.....UNIQ |
144d80 | 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 | UE(c).ON.CONFLICT.fail.).WITHOUT |
144da0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 | .ROWID;.CREATE.INDEX.t1d.ON.t1(d |
144dc0 | 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 45 4e 44 0a 81 51 90 4d 04 00 83 27 43 52 45 41 54 | );ANALYZE.TEMP;END..Q.M...'CREAT |
144de0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 | E.TABLE.t1(a.INT,b.INTEGER,.c.TE |
144e00 | 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 | XT,.d.BLOB,.e.ANY,.....UNIQUE(a) |
144e20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 | .ON.CONFLICT.ignore,.....PRIMARY |
144e40 | 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .KEY(b),.....UNIQUE(c).ON.CONFLI |
144e60 | 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | CT.fail.).WITHOUT.ROWID;.CREATE. |
144e80 | 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b | INDEX.t1d.ON.t1(d);ANALYZE.TEMP; |
144ea0 | 41 4e 41 4c 59 5a 45 0a 81 50 90 4c 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ANALYZE..P.L...%CREATE.TABLE.t1( |
144ec0 | 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c | a.INT,b.INTEGER,.c.TEXT,.d.BLOB, |
144ee0 | 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .e.ANY,.....UNIQUE(a).ON.CONFLIC |
144f00 | 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 | T.ignore,.....PRIMARY.KEY(b),... |
144f20 | 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 | ..UNIQUE(c).ON.CONFLICT.fail.).W |
144f40 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f | ITHOUT.ROWID;.CREATE.INDEX.t1d.O |
144f60 | 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 2e 56 41 43 55 55 4d 0a 82 78 90 4b | N.t1(d);ANALYZE.TEMP.VACUUM..x.K |
144f80 | 04 00 85 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...uCREATE.TABLE.t1(a.INT,b.INTE |
144fa0 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
144fc0 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
144fe0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
145000 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
145020 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
145040 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 | ATE.UNIQUE.INDEX.t1e.ON.t1(e);RE |
145060 | 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | PLACE.INTO.t1(a,b,c,d,e).VALUES( |
145080 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,2,'abc','b3',3.5);.INSERT.INTO |
1450a0 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
1450c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d | ON.CONFLICT(b).DO.UPDATE.SET.b=m |
1450e0 | 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 83 00 90 4a 04 00 86 05 | ax(e,excluded.e);VACUUM....J.... |
145100 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c | CREATE.TABLE.t1(a.INT,b.INTEGER, |
145120 | 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 | .c.TEXT,.d.BLOB,.e.ANY,.....UNIQ |
145140 | 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 | UE(a).ON.CONFLICT.ignore,.....PR |
145160 | 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 | IMARY.KEY(b),.....UNIQUE(c).ON.C |
145180 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | ONFLICT.fail.).WITHOUT.ROWID;.CR |
1451a0 | 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 | EATE.INDEX.t1d.ON.t1(d);.CREATE. |
1451c0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 45 58 50 4c 41 49 | UNIQUE.INDEX.t1e.ON.t1(e);EXPLAI |
1451e0 | 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 | N.INSERT.INTO.t1(a,b,c,d,e).VALU |
145200 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 | ES(1,2,'abc','b3',3.5);.INSERT.I |
145220 | 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 | NTO.t1.VALUES(2,2,'xyz',NULL,4.2 |
145240 | 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 5).ON.CONFLICT(b).DO.UPDATE.SET. |
145260 | 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 52 45 49 4e 44 45 58 0a 83 1e 90 49 | e=max(e,excluded.e);REINDEX....I |
145280 | 04 00 86 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...ACREATE.TABLE.t1(a.INT,b.INTE |
1452a0 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
1452c0 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
1452e0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
145300 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
145320 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
145340 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 20 57 | ATE.UNIQUE.INDEX.t1e.ON.t1(e);.W |
145360 | 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 49 4e 53 45 52 54 20 | ITH.c(x).AS.(values(1))..INSERT. |
145380 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 | INTO.t1(a,b,c,d,e).VALUES(1,2,'a |
1453a0 | 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e | bc','b3',3.5);EXPLAIN.QUERY.PLAN |
1453c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 | .INSERT.INTO.t1.VALUES(2,2,'xyz' |
1453e0 | 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 | ,NULL,4.25).ON.CONFLICT(b).DO.UP |
145400 | 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 79 | DATE.SET.b=max(e,excluded.e);..y |
145420 | 90 48 04 00 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e | .H...wCREATE.TABLE.t1(a.INT,b.IN |
145440 | 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 | TEGER,.c.TEXT,.d.BLOB,.e.ANY,... |
145460 | 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a | ..UNIQUE(a).ON.CONFLICT.ignore,. |
145480 | 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 | ....PRIMARY.KEY(b),.....UNIQUE(c |
1454a0 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ).ON.CONFLICT.fail.).WITHOUT.ROW |
1454c0 | 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 | ID;.CREATE.INDEX.t1d.ON.t1(d);.C |
1454e0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b | REATE.UNIQUE.INDEX.t1e.ON.t1(e); |
145500 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 62 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 | .INSERT.INTO.t1(b,b,c,d,e).VALUE |
145520 | 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | S(1,2,'abc','b3',3.5);.INSERT.IN |
145540 | 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | TO.t1.VALUES(2,2,'xyz',NULL,4.25 |
145560 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 | ).ON.CONFLICT(b).DO.UPDATE.SET.e |
145580 | 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 52 45 49 4e 44 45 58 0a 82 72 90 47 04 | =max(e,excluded.e);REINDEX..r.G. |
1455a0 | 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 | ..iCREATE.TABLE.t1(a.INT,b.INTEG |
1455c0 | 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 | ER,.c.TEXT,.d.BLOB,.e.ANY,.....U |
1455e0 | 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 | NIQUE(a).ON.CONFLICT.ignore,.... |
145600 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(b),.....UNIQUE(c).O |
145620 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
145640 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 | .CREATE.INDEX.t1d.ON.t1(d);.CREA |
145660 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e | TE.UNIQUE.INDEX.t1e.ON.t1(e);.IN |
145680 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 a0 56 41 4c 55 45 53 28 31 | SERT.INTO.t1(a,b,c,d,e).VALUES(1 |
1456a0 | 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,2,'abc','b3',3.5);.INSERT.INTO. |
1456c0 | 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f | t1.VALUES(2,2,'xyz',NULL,4.25).O |
1456e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 | N.CONFLICT(b).DO.UPDATE.SET.e=ma |
145700 | 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 7e 90 46 04 00 86 01 43 52 45 41 54 45 20 | x(e,excluded.e);..~.F....CREATE. |
145720 | 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 | TABLE.t1(a.INT,b.INTEGER,.c.TEXT |
145740 | 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f | ,.d.BLOB,.e.ANY,.....UNIQUE(a).O |
145760 | 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b | N.CONFLICT.ignore,.....PRIMARY.K |
145780 | 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | EY(b),.....UNIQUE(c).ON.CONFLICT |
1457a0 | 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e | .fail.).WITHOUT.ROWID;.CREATE.IN |
1457c0 | 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | DEX.t1d.ON.t1(d);.CREATE.UNIQUE. |
1457e0 | 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | INDEX.t1e.ON.t1(e);.INSERT.INTO. |
145800 | 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 49 53 | t1(a,b,c,d,e).VALUES(1,2,'abc'IS |
145820 | 4e 55 4c 4c 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 | NULL,'b3',3.5);.INSERT.INTO.t1.V |
145840 | 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f | ALUES(2,2,'xyz',NULL,4.25).ON.CO |
145860 | 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c | NFLICT(b).DO.UPDATE.SET.b=max(e, |
145880 | 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 82 72 90 45 04 00 85 69 43 52 45 41 54 | excluded.e);VACUUM..r.E...iCREAT |
1458a0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 | E.TABLE.t1(a.INT,b.INTEGER,.c.TE |
1458c0 | 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 | XT,.d.BLOB,.e.ANY,.....UNIQUE(a) |
1458e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 | .ON.CONFLICT.ignore,.....PRIMARY |
145900 | 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .KEY(b),.....UNIQUE(c).ON.CONFLI |
145920 | 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | CT.fail.).WITHOUT.ROWID;.CREATE. |
145940 | 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | INDEX.t1d.ON.t1(d);.CREATE.UNIQU |
145960 | 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | E.INDEX.t1e.ON.t1(e);.INSERT.INT |
145980 | 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 | O.t1(a,b,c,d,e).VALUES(1,2,'abc' |
1459a0 | 2c 27 62 33 27 2c 33 45 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 | ,'b3',3E5);.INSERT.INTO.t1.VALUE |
1459c0 | 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 45 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 | S(2,2,'xyz',NULL,4.E5).ON.CONFLI |
1459e0 | 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c | CT(b).DO.UPDATE.SET.e=max(e,excl |
145a00 | 75 64 65 64 2e 65 29 3b 0a 82 72 90 44 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | uded.e);..r.D...iCREATE.TABLE.t1 |
145a20 | 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a.INT,b.INTEGER,.c.TEXT,.d.BLOB |
145a40 | 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 | ,.e.ANY,.....UNIQUE(a).ON.CONFLI |
145a60 | 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 | CT.ignore,.....PRIMARY.KEY(b),.. |
145a80 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
145aa0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 | WITHOUT.ROWID;.CREATE.INDEX.t1d. |
145ac0 | 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ON.t1(d);.CREATE.UNIQUE.INDEX.t1 |
145ae0 | 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | e.ON.t1(e);.INSERT.INTO.t1(a,b,c |
145b00 | 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 | ,d,e).VALUES(1,2,'abc','b3',3.5) |
145b20 | 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a | ;REPLACE.INTO.t1.VALUES(2,2,'xyz |
145b40 | 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 | ',NULL,4.25).ON.CONFLICT(b).DO.U |
145b60 | 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 83 | PDATE.SET.b=max(e,excluded.e);.. |
145b80 | 04 90 43 04 00 86 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | ..C....CREATE.TABLE.t1(a.INT,b.I |
145ba0 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
145bc0 | 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(a).ON.CONFLICT.ignore, |
145be0 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(b),.....UNIQUE( |
145c00 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
145c20 | 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a | WID;.CREATE.INDEX.t1d.ON.t1(d);. |
145c40 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 | CREATE.UNIQUE.INDEX.t1e.ON.t1(e) |
145c60 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 | ;.INSERT.INTO.t1(a,b,c,d,e).VALU |
145c80 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 45 58 50 4c 41 49 4e 20 51 | ES(1,2,'abc','b3',3.5);EXPLAIN.Q |
145ca0 | 55 45 52 59 20 50 4c 41 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 | UERY.PLAN.INSERT.INTO.t1.VALUES( |
145cc0 | 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2,2,'xyz',NULL,4.25).ON.CONFLICT |
145ce0 | 28 63 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 | (c).DO.UPDATE.SET.b=max(e,exclud |
145d00 | 65 64 2e 65 29 3b 0a 82 7f 90 42 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ed.e);....B....CREATE.TABLE.t1(a |
145d20 | 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 | .INT,b.INTEGER,.c.TEXT,.d.BLOB,. |
145d40 | 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | e.ANY,.....UNIQUE(a).ON.CONFLICT |
145d60 | 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 | .ignore,.....PRIMARY.KEY(b),.... |
145d80 | 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 | .UNIQUE(c).ON.CONFLICT.fail.).WI |
145da0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e | THOUT.ROWID;.CREATE.INDEX.t1d.ON |
145dc0 | 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 | .t1(d);.CREATE.UNIQUE.INDEX.t1e. |
145de0 | 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | ON.t1(e);.INSERT.INTO.t1(a,b,c,d |
145e00 | 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 45 | ,e).VALUES(1,2,'abc','b3',3.5);E |
145e20 | 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 | XPLAIN.INSERT.INTO.t1.VALUES(2,2 |
145e40 | 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 | ,'xyz',NULL,4.25).ON.CONFLICT(b) |
145e60 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e | .DO.UPDATE.SET.b=max(e,excluded. |
145e80 | 65 29 3b 56 41 43 55 55 4d 0a 82 72 90 41 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | e);VACUUM..r.A...iCREATE.TABLE.t |
145ea0 | 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f | 1(a.INT,b.INTEGER,.c.TEXT,.d.BLO |
145ec0 | 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c | B,.e.ANY,.....UNIQUE(a).ON.CONFL |
145ee0 | 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a | ICT.ignore,.....PRIMARY.KEY(b),. |
145f00 | 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 | ....UNIQUE(c).ON.CONFLICT.fail.) |
145f20 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .WITHOUT.ROWID;.CREATE.INDEX.t1d |
145f40 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
145f60 | 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(e);.INSERT.INTO.t1(a,b, |
145f80 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
145fa0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
145fc0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 45 39 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.E9).ON.CONFLICT(b).DO. |
145fe0 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | UPDATE.SET.e=max(e,excluded.e);. |
146000 | 0d 00 00 00 17 00 da 00 1e 8e 1d 1c 1b aa 1a 38 19 aa 19 1a 17 a4 16 27 14 ab 13 35 11 bf 10 49 | ...............8.......'...5...I |
146020 | 0f af 0e 32 0c b6 0b 3d 09 c4 08 47 06 ce 05 55 03 d4 02 57 00 da 00 00 00 00 00 00 00 00 00 00 | ...2...=...G...U...W............ |
146040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
146060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
146080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1460a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1460c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 79 90 6f 04 00 | ...........................y.o.. |
1460e0 | 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 | .wCREATE.TABLE.t1(a.INT,b.INTEGE |
146100 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e.ANY,.....UN |
146120 | 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 | IQUE(e).ON.CONFLICT.ignore,..... |
146140 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e | PRIMARY.KEY(b),.....UNIQUE(c).ON |
146160 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | .CONFLICT.fail.).WITHOUT.ROWID;. |
146180 | 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 | CREATE.INDEX.t1d.ON.t1(d);.CREAT |
1461a0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 47 4c 4f 42 2d | E.UNIQUE.INDEX.t1e.ON.t1(e.GLOB- |
1461c0 | 45 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 | E);REPLACE.INTO.t1(a,b,c,d,e).VA |
1461e0 | 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 | LUES(1,2,'abc','b3',3.5);.INSERT |
146200 | 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 | .INTO.t1.VALUES(2,2,'xyz',NULL,4 |
146220 | 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .25).ON.CONFLICT(b).DO.UPDATE.SE |
146240 | 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 79 90 6e 04 00 85 77 43 | T.e=max(e,excluded.e);..y.n...wC |
146260 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 | REATE.TABLE.t1(a.INT,b.INTEGER,. |
146280 | 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 | c.TEXT,.d.BLOB,.e.ANY,.....UNIQU |
1462a0 | 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 | E(e).ON.CONFLICT.ignore,.....PRI |
1462c0 | 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f | MARY.KEY(b),.....UNIQUE(c).ON.CO |
1462e0 | 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | NFLICT.fail.).WITHOUT.ROWID;.CRE |
146300 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 | ATE.INDEX.t1d.ON.t1(d);.CREATE.U |
146320 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 47 4c 4f 42 2d 45 29 3b | NIQUE.INDEX.t1e.ON.t1(e.GLOB-E); |
146340 | 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 | ANALYZE.INTO.t1(a,b,c,d,e).VALUE |
146360 | 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | S(1,2,'abc','b3',3.5);.INSERT.IN |
146380 | 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | TO.t1.VALUES(2,2,'xyz',NULL,4.25 |
1463a0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 | ).ON.CONFLICT(b).DO.UPDATE.SET.e |
1463c0 | 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 7d 90 6d 04 00 85 7f 43 52 45 41 | =max(e,excluded.e);..}.m....CREA |
1463e0 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 | TE.TABLE.t1(a.INT,b.INTEGER,.c.T |
146400 | 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 | EXT,.d.BLOB,.e.ANY,.....UNIQUE(e |
146420 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 | ).ON.CONFLICT.ignore,.....PRIMAR |
146440 | 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c | Y.KEY(b),.....UNIQUE(c).ON.CONFL |
146460 | 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ICT.fail.).WITHOUT.ROWID;.CREATE |
146480 | 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .INDEX.t1d.ON.t1(d);.CREATE.UNIQ |
1464a0 | 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 47 4c 4f 42 20 61 2c 62 2d 45 29 | UE.INDEX.t1e.ON.t1(e.GLOB.a,b-E) |
1464c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 | ;.INSERT.INTO.t1(a,b,c,d,e).VALU |
1464e0 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 | ES(1,2,'abc','b3',3.5);.INSERT.I |
146500 | 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 | NTO.t1.VALUES(2,2,'xyz',NULL,4.2 |
146520 | 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 5).ON.CONFLICT(b).DO.UPDATE.SET. |
146540 | 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 75 90 6c 04 00 85 6f 43 52 45 | e=max(e,excluded.e);..u.l...oCRE |
146560 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 | ATE.TABLE.t1(a.INT,b.INTEGER,.c. |
146580 | 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | TEXT,.d.BLOB,.e.ANY,.....UNIQUE( |
1465a0 | 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 | e).ON.CONFLICT.ignore,.....PRIMA |
1465c0 | 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 | RY.KEY(b),.....UNIQUE(c).ON.CONF |
1465e0 | 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | LICT.fail.).WITHOUT.ROWID;.CREAT |
146600 | 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | E.INDEX.t1d.ON.t1(d);.CREATE.UNI |
146620 | 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 2d 45 29 3b 52 45 50 4c 41 43 | QUE.INDEX.t1e.ON.t1(e.-E);REPLAC |
146640 | 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | E.INTO.t1(a,b,c,d,e).VALUES(1,2, |
146660 | 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | 'abc','b3',3.5);.INSERT.INTO.t1. |
146680 | 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 | VALUES(2,2,'xyz',NULL,4.25).ON.C |
1466a0 | 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | ONFLICT(b).DO.UPDATE.SET.e=max(e |
1466c0 | 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 75 90 6b 04 00 85 6f 43 52 45 41 54 45 20 54 41 42 | ,excluded.e);..u.k...oCREATE.TAB |
1466e0 | 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 | LE.t1(a.INT,b.INTEGER,.c.TEXT,.d |
146700 | 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 | .BLOB,.e.ANY,.....UNIQUE(e).ON.C |
146720 | 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | ONFLICT.ignore,.....PRIMARY.KEY( |
146740 | 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | b),.....UNIQUE(c).ON.CONFLICT.fa |
146760 | 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 | il.).WITHOUT.ROWID;.CREATE.INDEX |
146780 | 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .t1d.ON.t1(d);.CREATE.UNIQUE.IND |
1467a0 | 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 2d 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t1e.ON.t1(e.-1);.INSERT.INTO. |
1467c0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 | t1(a,b,c,d,e).VALUES(1,2,'abc',' |
1467e0 | 62 33 27 2c 33 2e 35 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 | b3',3.5);REPLACE.INTO.t1.VALUES( |
146800 | 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2,2,'xyz',NULL,4.25).ON.CONFLICT |
146820 | 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 | (b).DO.UPDATE.SET.e=max(e,exclud |
146840 | 65 64 2e 65 29 3b 0a 82 79 90 6a 04 00 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | ed.e);..y.j...wCREATE.TABLE.t1(a |
146860 | 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 | .INT,b.INTEGER,.c.TEXT,.d.BLOB,. |
146880 | 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | e.ANY,.....UNIQUE(e).ON.CONFLICT |
1468a0 | 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 | .ignore,.....PRIMARY.KEY(b),.... |
1468c0 | 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 | .UNIQUE(c).ON.CONFLICT.fail.).WI |
1468e0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e | THOUT.ROWID;.CREATE.INDEX.t1d.ON |
146900 | 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 | .t1(d);.CREATE.UNIQUE.INDEX.t1e. |
146920 | 4f 4e 20 74 31 28 20 6a 73 6f 6e 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ON.t1(.json(1));.INSERT.INTO.t1( |
146940 | 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 | a,b,c,d,e).VALUES(1,2,'abc','b3' |
146960 | 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 | ,3.5);.INSERT.INTO.t1.VALUES(2,2 |
146980 | 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 | ,'xyz',NULL,4.25).ON.CONFLICT(b) |
1469a0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e | .DO.UPDATE.SET.e=max(e,excluded. |
1469c0 | 65 29 3b 0a 82 75 90 69 04 00 85 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | e);..u.i...oCREATE.TABLE.t1(a.IN |
1469e0 | 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 | T,b.INTEGER,.c.TEXT,.d.BLOB,.e.A |
146a00 | 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 | NY,.....UNIQUE(e).ON.CONFLICT.ig |
146a20 | 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e | nore,.....PRIMARY.KEY(b),.....UN |
146a40 | 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f | IQUE(c).ON.CONFLICT.fail.).WITHO |
146a60 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 | UT.ROWID;.CREATE.INDEX.t1d.ON.t1 |
146a80 | 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 | (d);.CREATE.UNIQUE.INDEX.t1e.ON. |
146aa0 | 74 31 28 20 31 3d 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | t1(.1=1);.INSERT.INTO.t1(a,b,c,d |
146ac0 | 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a | ,e).VALUES(1,2,'abc','b3',3.5);. |
146ae0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c | INSERT.INTO.t1.VALUES(2,2,'xyz', |
146b00 | 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 | NULL,4.25).ON.CONFLICT(b).DO.UPD |
146b20 | 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 75 90 | ATE.SET.e=max(e,excluded.e);..u. |
146b40 | 68 04 00 85 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 | h...oCREATE.TABLE.t1(a.INT,b.INT |
146b60 | 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 | EGER,.c.TEXT,.d.BLOB,.e.ANY,.... |
146b80 | 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 | .UNIQUE(e).ON.CONFLICT.ignore,.. |
146ba0 | 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 | ...PRIMARY.KEY(b),.....UNIQUE(c) |
146bc0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .ON.CONFLICT.fail.).WITHOUT.ROWI |
146be0 | 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 | D;.CREATE.INDEX.t1d.ON.t1(d);.CR |
146c00 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 27 61 27 | EATE.UNIQUE.INDEX.t1e.ON.t1(.'a' |
146c20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c | );.INSERT.INTO.t1(a,b,c,d,e).VAL |
146c40 | 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 | UES(1,2,'abc','b3',3.5);.INSERT. |
146c60 | 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e | INTO.t1.VALUES(2,2,'xyz',NULL,4. |
146c80 | 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | 25).ON.CONFLICT(b).DO.UPDATE.SET |
146ca0 | 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 78 90 67 04 00 85 75 43 52 | .e=max(e,excluded.e);..x.g...uCR |
146cc0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 | EATE.TABLE.t1(a.INT,b.INTEGER,.c |
146ce0 | 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 | .TEXT,.d.BLOB,.e.ANY,.....UNIQUE |
146d00 | 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d | (e).ON.CONFLICT.ignore,.....PRIM |
146d20 | 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e | ARY.KEY(b),.....UNIQUE(c).ON.CON |
146d40 | 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | FLICT.fail.).WITHOUT.ROWID;.CREA |
146d60 | 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 20 2d 31 29 3b 0a 43 52 45 41 54 45 | TE.INDEX.t1d.ON.t1(d.-1);.CREATE |
146d80 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 2d 45 29 3b 0a 49 | .UNIQUE.INDEX.t1e.ON.t1(e.-E);.I |
146da0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1(a,b,c,d,e).VALUES( |
146dc0 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,2,'abc','b3',3.5);.INSERT.INTO |
146de0 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
146e00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d | ON.CONFLICT(b).DO.UPDATE.SET.e=m |
146e20 | 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 79 90 66 04 00 85 77 43 52 45 41 54 45 | ax(e,excluded.e);..y.f...wCREATE |
146e40 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 | .TABLE.t1(a.INT,b.INTEGER,.c.TEX |
146e60 | 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 | T,.d.BLOB,.e.ANY,.....UNIQUE(e). |
146e80 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 45 50 4c 41 43 45 0a 20 20 20 20 50 52 49 4d 41 52 59 20 | ON.CONFLICT.REPLACE.....PRIMARY. |
146ea0 | 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | KEY(b),.....UNIQUE(c).ON.CONFLIC |
146ec0 | 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 | T.fail.).WITHOUT.ROWID;.CREATE.I |
146ee0 | 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | NDEX.t1d.ON.t1(d);.CREATE.UNIQUE |
146f00 | 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 47 4c 4f 42 2d 45 29 3b 0a 49 4e 53 45 | .INDEX.t1e.ON.t1(e.GLOB-E);.INSE |
146f20 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 | RT.INTO.t1(a,b,c,d,e).VALUES(1,2 |
146f40 | 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,'abc','b3',3.5);.INSERT.INTO.t1 |
146f60 | 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 | .VALUES(2,2,'xyz',NULL,4.25).ON. |
146f80 | 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 | CONFLICT(b).DO.UPDATE.SET.e=max( |
146fa0 | 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 81 16 90 65 04 00 82 31 43 52 45 41 54 45 20 54 41 | e,excluded.e);....e...1CREATE.TA |
146fc0 | 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 | BLE.t1(a.INT,b.INTEGER,.c.TEXT,. |
146fe0 | 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 | d.BLOB,.e.ANY,.....UNIQUE(c).ON. |
147000 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
147020 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
147040 | 61 69 6c 0a 29 20 57 3b 0a 82 72 90 64 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ail.).W;..r.d...iCREATE.TABLE.t1 |
147060 | 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a.INT,b.INTEGER,.c.TEXT,.d.BLOB |
147080 | 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f 4e 46 4c 49 | ,.e.ANY,.....UNIQUE(b).ON.CONFLI |
1470a0 | 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 65 29 2c 0a 20 | CT.ignore,.....PRIMARY.KEY(e),.. |
1470c0 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
1470e0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 | WITHOUT.ROWID;.CREATE.INDEX.t1d. |
147100 | 4f 4e 20 74 31 28 65 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ON.t1(e);.CREATE.UNIQUE.INDEX.t1 |
147120 | 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | e.ON.t1(e);.INSERT.INTO.t1(a,b,c |
147140 | 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 | ,d,e).VALUES(1,2,'abc','b3',3.5) |
147160 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a | ;.INSERT.INTO.t1.VALUES(2,2,'xyz |
147180 | 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 | ',NULL,4.25).ON.CONFLICT(b).DO.U |
1471a0 | 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 | PDATE.SET.e=max(e,excluded.e);.. |
1471c0 | 72 90 63 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | r.c...iCREATE.TABLE.t1(a.INT,b.I |
1471e0 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
147200 | 20 20 20 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(b).ON.CONFLICT.ignore, |
147220 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 65 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(e),.....UNIQUE( |
147240 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
147260 | 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a | WID;.CREATE.INDEX.t1d.ON.t1(d);. |
147280 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 | CREATE.UNIQUE.INDEX.t1e.ON.t1(e) |
1472a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 | ;.INSERT.INTO.t1(a,b,c,d,e).VALU |
1472c0 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 | ES(1,2,'abc','b3',3.5);.INSERT.I |
1472e0 | 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 | NTO.t1.VALUES(2,2,'xyz',NULL,4.2 |
147300 | 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 5).ON.CONFLICT(b).DO.UPDATE.SET. |
147320 | 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 72 90 62 04 00 85 69 43 52 45 | e=max(e,excluded.e);..r.b...iCRE |
147340 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 | ATE.TABLE.t1(a.INT,b.INTEGER,.c. |
147360 | 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | TEXT,.d.BLOB,.e.ANY,.....UNIQUE( |
147380 | 62 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 | b).ON.CONFLICT.ignore,.....PRIMA |
1473a0 | 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 | RY.KEY(b),.....UNIQUE(c).ON.CONF |
1473c0 | 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | LICT.fail.).WITHOUT.ROWID;.CREAT |
1473e0 | 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 65 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | E.INDEX.t1d.ON.t1(e);.CREATE.UNI |
147400 | 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 | QUE.INDEX.t1e.ON.t1(e);.INSERT.I |
147420 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 | NTO.t1(a,b,c,d,e).VALUES(1,2,'ab |
147440 | 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c | c','b3',3.5);.INSERT.INTO.t1.VAL |
147460 | 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 | UES(2,2,'xyz',NULL,4.25).ON.CONF |
147480 | 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 | LICT(b).DO.UPDATE.SET.e=max(e,ex |
1474a0 | 63 6c 75 64 65 64 2e 65 29 3b 0a 82 78 90 61 04 00 85 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 | cluded.e);..x.a...uCREATE.TABLE. |
1474c0 | 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c | t1(a.INT,b.INTEGER,.c.TEXT,.d.BL |
1474e0 | 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f 4e 46 | OB,.e.ANY,.....UNIQUE(b).ON.CONF |
147500 | 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c | LICT.ignore,.....PRIMARY.KEY(b), |
147520 | 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a | .....UNIQUE(c).ON.CONFLICT.fail. |
147540 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 | ).WITHOUT.ROWID;.CREATE.INDEX.t1 |
147560 | 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | d.ON.t1(d);.CREATE.UNIQUE.INDEX. |
147580 | 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | t1e.ON.t1(e);.INSERT.INTO.t1(a,b |
1475a0 | 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e | ,c,d,e).VALUES(1,2,'abc','b3',3. |
1475c0 | 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 | 5);.INSERT.INTO.t1.VALUES(2,2,'x |
1475e0 | 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f | yz',NULL,4.25).ON.CONFLICT(b).DO |
147600 | 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b | .UPDATE.SET.e=max(e,excluded.e); |
147620 | 56 41 43 55 55 4d 0a 82 79 90 60 04 00 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | VACUUM..y.`...wCREATE.TABLE.t1(a |
147640 | 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 | .INT,b.INTEGER,.c.TEXT,.d.BLOB,. |
147660 | 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | e.ANY,.....UNIQUE(b).ON.CONFLICT |
147680 | 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 | .ignore,.....PRIMARY.KEY(b),.... |
1476a0 | 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 | .UNIQUE(c).ON.CONFLICT.fail.).WI |
1476c0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e | THOUT.ROWID;.CREATE.INDEX.t1d.ON |
1476e0 | 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 | .t1(d);.CREATE.UNIQUE.INDEX.t1e. |
147700 | 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | ON.t1(e);.INSERT.INTO.t1(a,b,c,d |
147720 | 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a | ,e).VALUES(1,2,'abc','b3',3.5);. |
147740 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c | INSERT.INTO.t1.VALUES(2,2,'xyz', |
147760 | 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 | NULL,4.25).ON.CONFLICT(b).DO.UPD |
147780 | 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 41 4e 41 4c | ATE.SET.e=max(e,excluded.e);ANAL |
1477a0 | 59 5a 45 0a 82 72 90 5f 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | YZE..r._...iCREATE.TABLE.t1(a.IN |
1477c0 | 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 | T,b.INTEGER,.c.TEXT,.d.BLOB,.e.A |
1477e0 | 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 | NY,.....UNIQUE(b).ON.CONFLICT.ig |
147800 | 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e | nore,.....PRIMARY.KEY(b),.....UN |
147820 | 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f | IQUE(c).ON.CONFLICT.fail.).WITHO |
147840 | 55 54 20 52 4f 57 49 44 2b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 | UT.ROWID+.CREATE.INDEX.t1d.ON.t1 |
147860 | 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 | (d);.CREATE.UNIQUE.INDEX.t1e.ON. |
147880 | 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 | t1(e);.INSERT.INTO.t1(a,b,c,d,e) |
1478a0 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 | .VALUES(1,2,'abc','b3',3.5);.INS |
1478c0 | 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c | ERT.INTO.t1.VALUES(2,2,'xyz',NUL |
1478e0 | 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 | L,4.25).ON.CONFLICT(b).DO.UPDATE |
147900 | 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 81 0c 90 5e 04 00 | .SET.e=max(e,excluded.e);....^.. |
147920 | 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 | ..CREATE.TABLE.t1(a.INT,b.INTEGE |
147940 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e.ANY,.....UN |
147960 | 49 51 55 45 28 61 2c 27 62 33 27 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 33 2e 35 29 3b 0a | IQUE(a,'b3'COLLATE.nocase,3.5);. |
147980 | 26 35 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | &5FLICT(b).DO.UPDATE.SET.e=max(e |
1479a0 | 2c 65 78 63 6c 75 64 65 64 2e 81 0a 90 5d 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ,excluded....]....CREATE.TABLE.t |
1479c0 | 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f | 1(a.INT,b.INTEGER,.c.TEXT,.d.BLO |
1479e0 | 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 2c 27 62 33 27 2c 33 2e 35 29 | B,.e.ANY,.....UNIQUE(a,'b3',3.5) |
147a00 | 3b 0a 26 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ;.&5).ON.CONFLICT(b).DO.UPDATE.S |
147a20 | 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 6e 90 5c 04 00 85 61 | ET.e=max(e,excluded.e);..n.\...a |
147a40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c | CREATE.TABLE.t1(a.INT,b.INTEGER, |
147a60 | 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 | .c.TEXT,.d.BLOB,.e.ANY,.....UNIQ |
147a80 | 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 | UE(a).ON.CONFLICT.ignore,.....PR |
147aa0 | 49 4d 41 52 59 20 4b 45 59 28 64 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 | IMARY.KEY(d),.....UNIQUE(c).ON.C |
147ac0 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | ONFLICT.fail.).WITHOUT.ROWID;.CR |
147ae0 | 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 | EATE.INDEX.t1d.ON.t1(d);.CREATE. |
147b00 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 50 4c 41 43 | UNIQUE.INDEX.t1e.ON.t1(e);REPLAC |
147b20 | 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | E.INTO.t1(a,b,c,d,e).VALUES(1,2, |
147b40 | 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 20 | 'abc','b3',3.5);REPLACE.INTO.t1. |
147b60 | 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 | VALUES(2,2,'xyz',NULL,4.25).ON.C |
147b80 | 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | ONFLICT(b).DO.UPDATE.SET.e=max(e |
147ba0 | 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 90 5b 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ,excd.e);..n.[...aCREATE.TABLE.t |
147bc0 | 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f | 1(a.INT,b.INTEGER,.c.TEXT,.d.BLO |
147be0 | 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c | B,.e.ANY,.....UNIQUE(a).ON.CONFL |
147c00 | 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 2c 0a | ICT.ignore,.....PRIMARY.KEY(d),. |
147c20 | 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 | ....UNIQUE(c).ON.CONFLICT.fail.) |
147c40 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .WITHOUT.ROWID;.CREATE.INDEX.t1d |
147c60 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
147c80 | 31 65 20 4f 4e 20 74 31 28 64 29 bb 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(d).REPLACE.INTO.t1(a,b, |
147ca0 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
147cc0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
147ce0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
147d00 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 90 5a | UPDATE.SET.e=max(e,excd.e);..n.Z |
147d20 | 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...aCREATE.TABLE.t1(a.INT,b.INTE |
147d40 | 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT,.d.BLOB,.e.ANY,..... |
147d60 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
147d80 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(d),.....UNIQUE(c). |
147da0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
147dc0 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
147de0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 64 29 3b 52 45 | ATE.UNIQUE.INDEX.t1e.ON.t1(d);RE |
147e00 | 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | PLACE.INTO.t1(a,b,c,d,e).VALUES( |
147e20 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f | 1,2,'abc','b3',3.5);REPLACE.INTO |
147e40 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
147e60 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d | ON.CONFLICT(b).DO.UPDATE.SET.e=m |
147e80 | 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 90 59 04 00 85 61 43 52 45 41 54 45 20 54 41 42 | ax(e,excd.e);..n.Y...aCREATE.TAB |
147ea0 | 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 | LE.t1(a.INT,b.INTEGER,.c.TEXT,.d |
147ec0 | 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 | .BLOB,.e.ANY,.....UNIQUE(a).ON.C |
147ee0 | 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | ONFLICT.ignore,.....PRIMARY.KEY( |
147f00 | 64 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | d),.....UNIQUE(c).ON.CONFLICT.fa |
147f20 | 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 | il.).WITHOUT.ROWID;.CREATE.INDEX |
147f40 | 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .t1d.ON.t1(d);.CREATE.UNIQUE.IND |
147f60 | 45 58 20 74 31 65 20 4f 4e 20 74 31 28 64 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 | EX.t1e.ON.t1(d);REPLACE.INTO.t1( |
147f80 | 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 | a,b,c,d,e).VALUES(1,2,'abc','b3' |
147fa0 | 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 | ,3.5);.INSERT.INTO.t1.VALUES(2,2 |
147fc0 | 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 | ,'xyz',NULL,4.25).ON.CONFLICT(b) |
147fe0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a | .DO.UPDATE.SET.e=max(e,excd.e);. |
148000 | 0d 00 00 00 16 01 5c 00 1e 85 1d 06 1b 8b 1a 0e 18 95 17 1f 15 a2 14 2c 12 b3 11 3a 0f ba 0e 48 | ......\................,...:...H |
148020 | 0c d6 0b 64 09 f2 08 98 07 26 06 52 04 d6 03 60 02 d2 01 5c 00 00 00 00 00 00 00 00 00 00 00 00 | ...d.....&.R...`...\............ |
148040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
148060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
148080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1480a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1480c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1480e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
148100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
148120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
148140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 72 91 05 | .............................r.. |
148160 | 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 | ...iCREATE.TABLE.t1(a.INT,b.INTE |
148180 | 47 45 52 2c 20 63 20 54 45 58 54 ac 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 | GER,.c.TEXT..d.BLOB,.e.ANY,..... |
1481a0 | 55 4e 49 51 55 45 28 62 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(b).ON.CONFLICT.ignore,... |
1481c0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
1481e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
148200 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
148220 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 | ATE.UNIQUE.INDEX.t1e.ON.t1(e);.I |
148240 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1(a,b,c,d,e).VALUES( |
148260 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,2,'abc','b3',3.5);.INSERT.INTO |
148280 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
1482a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d | ON.CONFLICT(b).DO.UPDATE.SET.e=m |
1482c0 | 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 81 0a 91 04 04 00 82 19 43 52 45 41 54 45 | ax(e,excluded.e);.........CREATE |
1482e0 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 | .TABLE.t1(a.INT,b.INTEGER,.c.TEX |
148300 | 54 2c 20 64 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 | T,.d.PRIMARY.KEY,.....UNIQUE(a). |
148320 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 | ON.CONFLICT.ignore,.....PRIMARY. |
148340 | 4b 45 59 28 62 29 2c 0a 20 20 28 63 29 20 4f 4e 20 43 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | KEY(b),...(c).ON.C,excluded.e);. |
148360 | 82 72 91 03 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 | .r.....iCREATE.TABLE.t1(a.INT,b. |
148380 | 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 44 45 46 41 55 4c 54 20 41 4e 59 2c 0a | INTEGER,.c.TEXT,.d.DEFAULT.ANY,. |
1483a0 | 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 | ....UNIQUE(a).ON.CONFLICT.ignore |
1483c0 | 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 | ,.....PRIMARY.KEY(b),.....UNIQUE |
1483e0 | 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 | (c).ON.CONFLICT.fail.).WITHOUT.R |
148400 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b | OWID;.CREATE.INDEX.t1d.ON.t1(d); |
148420 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 | .CREATE.UNIQUE.INDEX.t1e.ON.t1(e |
148440 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c | );.INSERT.INTO.t1(a,b,c,d,e).VAL |
148460 | 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 | UES(1,2,'abc','b3',3.5);.INSERT. |
148480 | 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e | INTO.t1.VALUES(2,2,'xyz',NULL,4. |
1484a0 | 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | 25).ON.CONFLICT(b).DO.UPDATE.SET |
1484c0 | 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 78 91 02 04 00 85 75 43 52 | .e=max(e,excluded.e);..x.....uCR |
1484e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 | EATE.TABLE.t1(a.INT,b.INTEGER,.c |
148500 | 20 54 45 58 54 2c 20 64 20 43 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 | .TEXT,.d.CLOB,.e.ANY,.....UNIQUE |
148520 | 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d | (a).ON.CONFLICT.ignore,.....PRIM |
148540 | 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e | ARY.KEY(b),.....UNIQUE(c).ON.CON |
148560 | 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | FLICT.fail.).WITHOUT.ROWID;.CREA |
148580 | 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e | TE.INDEX.t1d.ON.t1(d);.CREATE.UN |
1485a0 | 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 | IQUE.INDEX.t1e.ON.t1(e);.INSERT. |
1485c0 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 | INTO.t1(a,b,c,d,e).VALUES(1,2,'a |
1485e0 | 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 | bc','b3',3.5);.INSERT.INTO.t1.VA |
148600 | 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e | LUES(2,2,'xyz',NULL,4.25).ON.CON |
148620 | 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 | FLICT(b).DO.UPDATE.SET.b=max(e,e |
148640 | 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 81 50 91 01 04 00 83 25 43 52 45 41 54 45 | xcluded.e);VACUUM..P.....%CREATE |
148660 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 | .TABLE.t1(a.INT,b.INTEGER,.c.TEX |
148680 | 54 2c 20 64 20 42 4c 4f 43 ac 20 65 20 41 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e | T,.d.BLOC..e.AEXPLAIN.QUERY.PLAN |
1486a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 | ON.CONFLICT.ignore,.....PRIMARY. |
1486c0 | 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | KEY(b),.....UNIQUE(c).ON.CONFLIC |
1486e0 | 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 | T.fail.).WITHOUT.ROWID;.CREATE.I |
148700 | 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 | NDEX.t1d.ON.t1(d);ANALYZE.TEMP;V |
148720 | 41 43 55 55 4d 0a 82 6e 91 00 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | ACUUM..n.....aCREATE.TABLE.t1(a. |
148740 | 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c a0 65 | INT,b.INTEGER,.c.TEXT,.d.BLOB,.e |
148760 | 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ,ANY,.....UNIQUE(a).ON.CONFLICT. |
148780 | 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 | ignore,.....PRIMARY.KEY(b),..... |
1487a0 | 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 | UNIQUE(c).ON.CONFLICT.fail.).WIT |
1487c0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 | HOUT.ROWID;.CREATE.INDEX.t1d.ON. |
1487e0 | 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f | t1(d);.CREATE.UNIQUE.INDEX.t1e.O |
148800 | 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c | N.t1(e);.INSERT.INTO.t1(a,b,c,d, |
148820 | 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 | e).VALUES(1,2,'abc','b3',3.5);.I |
148840 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e | NSERT.INTO.t1.VALUES(2,2,'xyz',N |
148860 | 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 | ULL,4.25).ON.CONFLICT(b).DO.UPDA |
148880 | 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 56 90 7f 04 00 85 31 | TE.SET.e=max(e,excd.e);..V.....1 |
1488a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c | CREATE.TABLE.t1(a.INT,b.INTEGER, |
1488c0 | 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 | .c.TEXT,.d.BLOB,.e,ANY,.....UNIQ |
1488e0 | 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 | UE(a).ON.CONFLICT.ignore,.....PR |
148900 | 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 | IMARY.KEY(b),.....UNIQUE(c).ON.C |
148920 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 52 45 49 | ONFLICT.fail.).WITHOUT.ROWID;REI |
148940 | 4e 44 45 58 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 | NDEX.INDEX.t1d.ONDEX.t1e.ON.t1(e |
148960 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c | );.INSERT.INTO.t1(a,b,c,d,e).VAL |
148980 | 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 | UES(1,2,'abc','b3',3.5);.INSERT. |
1489a0 | 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e | INTO.t1.VALUES(2,2,'xyz',NULL,4. |
1489c0 | 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | 25).ON.CONFLICT(b).DO.UPDATE.SET |
1489e0 | 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 90 7e 04 00 85 61 43 52 45 41 54 45 | .e=max(e,excd.e);..n.~...aCREATE |
148a00 | 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 | .TABLE.t1(a.INT,b.INTEGER,.c.TEX |
148a20 | 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 | T,.d.BLOB,.e,ANY,.....UNIQUE(a). |
148a40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 | ON.CONFLICT.ignore,.....PRIMARY. |
148a60 | 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | KEY(b),.....UNIQUE(c).ON.CONFLIC |
148a80 | 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 | T.fail.).WITHOUT.ROWID;.CREATE.I |
148aa0 | 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | NDEX.t1d.ON.t1(d);.CREATE.UNIQUE |
148ac0 | 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f | .INDEX.t1e.ON.t1(e);REPLACE.INTO |
148ae0 | 20 74 31 28 63 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c | .t1(c,b,c,d,e).VALUES(1,2,'abc', |
148b00 | 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 | 'b3',3.5);.INSERT.INTO.t1.VALUES |
148b20 | 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | (2,2,'xyz',NULL,4.25).ON.CONFLIC |
148b40 | 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e | T(b).DO.UPDATE.SET.e=max(e,excd. |
148b60 | 65 29 3b 0a 82 6e 90 7d 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e | e);..n.}...aCREATE.TABLE.t1(a.IN |
148b80 | 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 | T,b.INTEGER,.c.TEXT,.d.BLOB,.e,A |
148ba0 | 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 | NY,.....UNIQUE(a).ON.CONFLICT.ig |
148bc0 | 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e | nore,.....PRIMARY.KEY(b),.....UN |
148be0 | 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f | IQUE(c).ON.CONFLICT.fail.).WITHO |
148c00 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 | UT.ROWID;.CREATE.INDEX.t1d.ON.t1 |
148c20 | 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 | (d);.CREATE.UNIQUE.INDEX.t1e.ON. |
148c40 | 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 | t1(e);.INSERT.INTO.t1(a,b,c,d,e) |
148c60 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 | .VALUES(1,2,'abc','b3',3.5);.INS |
148c80 | 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c | ERT.INTO.t1.VALUES(2,2,'xyz',NUL |
148ca0 | 4c 2c 34 2c 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 | L,4,25).ON.CONFLICT(b).DO.UPDATE |
148cc0 | 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 90 7c 04 00 85 61 43 52 | .SET.e=max(e,excd.e);..n.|...aCR |
148ce0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 | EATE.TABLE.t1(a.INT,b.INTEGER,.c |
148d00 | 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 | .TEXT,.d.BLOB,.e,ANY,.....UNIQUE |
148d20 | 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d | (a).ON.CONFLICT.ignore,.....PRIM |
148d40 | 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e | ARY.KEY(b),.....UNIQUE(c).ON.CON |
148d60 | 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | FLICT.fail.).WITHOUT.ROWID;.CREA |
148d80 | 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e | TE.INDEX.t1d.ON.t1(d);.CREATE.UN |
148da0 | 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 20 57 49 54 48 20 63 | IQUE.INDEX.t1e.ON.t1(e);..WITH.c |
148dc0 | 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 | (x).AS.(values(1)).VALUES(1,2,'a |
148de0 | 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 | bc','b3',3.5);.INSERT.INTO.t1.VA |
148e00 | 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e | LUES(2,2,'xyz',NULL,4.25).ON.CON |
148e20 | 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 | FLICT(b).DO.UPDATE.SET.e=max(e,e |
148e40 | 78 63 64 2e 65 29 3b 0a 82 6e 90 7b 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | xcd.e);..n.{...aCREATE.TABLE.t1( |
148e60 | 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c | a.INT,b.INTEGER,.c.TEXT,.d.BLOB, |
148e80 | 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .e,ANY,.....UNIQUE(a).ON.CONFLIC |
148ea0 | 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 | T.ignore,.....PRIMARY.KEY(b),... |
148ec0 | 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 | ..UNIQUE(c).ON.CONFLICT.fail.).W |
148ee0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f | ITHOUT.ROWID+.CREATE.INDEX.t1d.O |
148f00 | 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 | N.t1(d);.CREATE.UNIQUE.INDEX.t1e |
148f20 | 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c | .ON.t1(e);.INSERT.INTO.t1(a,b,c, |
148f40 | 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b | d,e).VALUES(1,2,'abc','b3',3.5); |
148f60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 | .INSERT.INTO.t1.VALUES(2,2,'xyz' |
148f80 | 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 | ,NULL,4.25).ON.CONFLICT(b).DO.UP |
148fa0 | 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 7c 90 7a 04 00 | DATE.SET.e=max(e,excd.e);..|.z.. |
148fc0 | 85 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 | .}CREATE.TABLE.t1(a.INT,b.INTEGE |
148fe0 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 43 41 53 45 41 4e 59 2c 0a 20 20 | R,.c.TEXT,.d.BLOB,.e.CASEANY,... |
149000 | 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a | ..UNIQUE(a).ON.CONFLICT.ignore,. |
149020 | 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 | ....PRIMARY.KEY(b),.....UNIQUE(c |
149040 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ).ON.CONFLICT.fail.).WITHOUT.ROW |
149060 | 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 | ID;.CREATE.INDEX.t1d.ON.t1(d);.C |
149080 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b | REATE.UNIQUE.INDEX.t1e.ON.t1(e); |
1490a0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 | .INSERT.INTO.t1(a,b,c,d,e).VALUE |
1490c0 | 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | S(1,2,'abc','b3',3.5);.INSERT.IN |
1490e0 | 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | TO.t1.VALUES(2,2,'xyz',NULL,4.25 |
149100 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ).ON.CONFLICT(b).DO.UPDATE.SET.b |
149120 | 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 56 41 43 55 55 4d 0a 82 75 90 79 04 00 | =max(e,excluded.e);VACUUM..u.y.. |
149140 | 85 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 | .oCREATE.TABLE.t1(a.INT,b.INTEGE |
149160 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e.ANY,.....UN |
149180 | 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 | IQUE(e).ON.CONFLICT.ignore,..... |
1491a0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e | PRIMARY.KEY(b),.....UNIQUE(c).ON |
1491c0 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | .CONFLICT.fail.).WITHOUT.ROWID;. |
1491e0 | 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 65 29 3b 0a 43 52 45 41 54 | CREATE.INDEX.t1d.ON.t1(e);.CREAT |
149200 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 2d 31 29 3b 0a | E.UNIQUE.INDEX.t1e.ON.t1(e.-1);. |
149220 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 | INSERT.INTO.t1(a,b,c,d,e).VALUES |
149240 | 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | (1,2,'abc','b3',3.5);.INSERT.INT |
149260 | 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 | O.t1.VALUES(2,2,'xyz',NULL,4.25) |
149280 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d | .ON.CONFLICT(b).DO.UPDATE.SET.e= |
1492a0 | 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 75 90 78 04 00 85 6f 43 52 45 41 54 | max(e,excluded.e);..u.x...oCREAT |
1492c0 | 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 | E.TABLE.t1(a.INT,b.INTEGER,.c.TE |
1492e0 | 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 | XT,.d.BLOB,.e.ANY,.....UNIQUE(e) |
149300 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 | .ON.CONFLICT.ignore,.....PRIMARY |
149320 | 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .KEY(b),.....UNIQUE(c).ON.CONFLI |
149340 | 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | CT.fail.).WITHOUT.ROWID;.CREATE. |
149360 | 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | INDEX.t1d.ON.t1(d);.CREATE.UNIQU |
149380 | 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 7e 20 2d 31 29 3b 0a 49 4e 53 45 52 54 20 | E.INDEX.t1e.ON.t1(~.-1);.INSERT. |
1493a0 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 | INTO.t1(a,b,c,d,e).VALUES(1,2,'a |
1493c0 | 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 | bc','b3',3.5);.INSERT.INTO.t1.VA |
1493e0 | 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e | LUES(2,2,'xyz',NULL,4.25).ON.CON |
149400 | 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 | FLICT(b).DO.UPDATE.SET.e=max(e,e |
149420 | 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 72 90 77 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 | xcluded.e);..r.w...iCREATE.TABLE |
149440 | 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 | .t1(a.INT,b.INTEGER,.c.TEXT,.d.B |
149460 | 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e | LOB,.e.ANY,.....UNIQUE(e).ON.CON |
149480 | 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 | FLICT.ignore,.....PRIMARY.KEY(b) |
1494a0 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c | ,.....UNIQUE(c).ON.CONFLICT.fail |
1494c0 | 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 | .).WITHOUT.ROWID;.CREATE.INDEX.t |
1494e0 | 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | 1d.ON.t1(d);.CREATE.UNIQUE.INDEX |
149500 | 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | .t1e.ON.t1(e);.INSERT.INTO.t1(a, |
149520 | 62 2c 63 2c 65 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 | b,c,e,e).VALUES(1,2,'abc','b3',3 |
149540 | 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 | .5);.INSERT.INTO.t1.VALUES(2,2,' |
149560 | 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 | xyz',NULL,4.25).ON.CONFLICT(b).D |
149580 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 | O.UPDATE.SET.e=max(e,excluded.e) |
1495a0 | 3b 0a 82 79 90 76 04 00 85 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c | ;..y.v...wCREATE.TABLE.t1(a.INT, |
1495c0 | 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 | b.INTEGER,.c.TEXT,.d.BLOB,.e.ANY |
1495e0 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f | ,.....UNIQUE(e).ON.CONFLICT.igno |
149600 | 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 | re,.....PRIMARY.KEY(b),.....UNIQ |
149620 | 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 | UE(c).ON.CONFLICT.fail.).WITHOUT |
149640 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 | .ROWID;.CREATE.INDEX.t1d.ON.t1(d |
149660 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 | );.CREATE.UNIQUE.INDEX.t1e.ON.t1 |
149680 | 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 | (e);.INSERT.INTO.t1(a,b,c,d,e).V |
1496a0 | 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 | ALUES(1,2,'abc','b3',3.5);.INSER |
1496c0 | 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c | T.INTO.t1.VALUES(2,2,'xyz',NULL, |
1496e0 | 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 4.25).ON.CONFLICT(b).DO.UPDATE.S |
149700 | 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 41 4e 41 4c 59 5a 45 0a 82 | ET.e=max(e,excluded.e);ANALYZE.. |
149720 | 72 90 75 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 | r.u...iCREATE.TABLE.t1(a.INT,b.I |
149740 | 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 | NTEGER,.c.TEXT,.d.BLOB,.e.ANY,.. |
149760 | 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c | ...UNIQUE(e).ON.CONFLICT.ignore, |
149780 | 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | .....PRIMARY.KEY(b),.....UNIQUE( |
1497a0 | 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f | c).ON.CONFLICT.fail.).WITHOUT.RO |
1497c0 | 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a | WID;.CREATE.INDEX.t1d.ON.t1(d);. |
1497e0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 | CREATE.UNIQUE.INDEX.t1e.ON.t1(e) |
149800 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 61 29 20 56 41 4c 55 | ;.INSERT.INTO.t1(a,b,c,d,a).VALU |
149820 | 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 | ES(1,2,'abc','b3',3.5);.INSERT.I |
149840 | 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 | NTO.t1.VALUES(2,2,'xyz',NULL,4.2 |
149860 | 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | 5).ON.CONFLICT(b).DO.UPDATE.SET. |
149880 | 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 75 90 74 04 00 85 6f 43 52 45 | e=max(e,excluded.e);..u.t...oCRE |
1498a0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 | ATE.TABLE.t1(a.INT,b.INTEGER,.c. |
1498c0 | 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | TEXT,.d.BLOB,.e.ANY,.....UNIQUE( |
1498e0 | 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 | e).ON.CONFLICT.ignore,.....PRIMA |
149900 | 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 | RY.KEY(b),.....UNIQUE(c).ON.CONF |
149920 | 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | LICT.fail.).WITHOUT.ROWID;.CREAT |
149940 | 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | E.INDEX.t1d.ON.t1(d);.CREATE.UNI |
149960 | 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 26 2d 45 29 3b 0a 49 4e 53 45 52 | QUE.INDEX.t1e.ON.t1(e&-E);.INSER |
149980 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | T.INTO.t1(a,b,c,d,e).VALUES(1,2, |
1499a0 | 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | 'abc','b3',3.5);.INSERT.INTO.t1. |
1499c0 | 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 | VALUES(2,2,'xyz',NULL,4.25).ON.C |
1499e0 | 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | ONFLICT(b).DO.UPDATE.SET.e=max(e |
149a00 | 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 79 90 73 04 00 85 77 43 52 45 41 54 45 20 54 41 42 | ,excluded.e);..y.s...wCREATE.TAB |
149a20 | 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 | LE.t1(a.INT,b.INTEGER,.c.TEXT,.d |
149a40 | 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 | .BLOB,.e.ANY,.....UNIQUE(e).ON.C |
149a60 | 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | ONFLICT.ignore,.....PRIMARY.KEY( |
149a80 | 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | b),.....UNIQUE(c).ON.CONFLICT.fa |
149aa0 | 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 | il.).WITHOUT.ROWID;.CREATE.INDEX |
149ac0 | 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .t1d.ON.t1(d);.CREATE.UNIQUE.IND |
149ae0 | 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 20 7c 7c 20 42 2d 45 29 3b 0a 49 4e 53 45 52 54 20 49 | EX.t1e.ON.t1(e.||.B-E);.INSERT.I |
149b00 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 | NTO.t1(a,b,c,d,e).VALUES(1,2,'ab |
149b20 | 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c | c','b3',3.5);.INSERT.INTO.t1.VAL |
149b40 | 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 | UES(2,2,'xyz',NULL,4.25).ON.CONF |
149b60 | 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 | LICT(b).DO.UPDATE.SET.e=max(e,ex |
149b80 | 63 6c 75 64 65 64 2e 65 29 3b 0a 82 77 90 72 04 00 85 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 | cluded.e);..w.r...sCREATE.TABLE. |
149ba0 | 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c | t1(a.INT,b.INTEGER,.c.TEXT,.d.BL |
149bc0 | 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 | OB,.e.ANY,.....UNIQUE(e).ON.CONF |
149be0 | 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c | LICT.ignore,.....PRIMARY.KEY(b), |
149c00 | 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a | .....UNIQUE(c).ON.CONFLICT.fail. |
149c20 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 | ).WITHOUT.ROWID;.CREATE.INDEX.t1 |
149c40 | 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | d.ON.t1(d);.CREATE.UNIQUE.INDEX. |
149c60 | 74 31 65 20 4f 4e 20 74 31 28 65 20 4f 52 2d 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | t1e.ON.t1(e.OR-1);.INSERT.INTO.t |
149c80 | 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 | 1(a,b,c,d,e).VALUES(1,2,'abc','b |
149ca0 | 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 | 3',3.5);.INSERT.INTO.t1.VALUES(2 |
149cc0 | 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,2,'xyz',NULL,4.25).ON.CONFLICT( |
149ce0 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 | b).DO.UPDATE.SET.e=max(e,exclude |
149d00 | 64 2e 65 29 3b 0a 82 7b 90 71 04 00 85 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | d.e);..{.q...{CREATE.TABLE.t1(a. |
149d20 | 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 | INT,b.INTEGER,.c.TEXT,.d.BLOB,.e |
149d40 | 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | .ANY,.....UNIQUE(e).ON.CONFLICT. |
149d60 | 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 | ignore,.....PRIMARY.KEY(b),..... |
149d80 | 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 | UNIQUE(c).ON.CONFLICT.fail.).WIT |
149da0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 | HOUT.ROWID;.CREATE.INDEX.t1d.ON. |
149dc0 | 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f | t1(d);.CREATE.UNIQUE.INDEX.t1e.O |
149de0 | 4e 20 74 31 28 65 20 49 53 4e 55 4c 4c 2d 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | N.t1(e.ISNULL-E);.INSERT.INTO.t1 |
149e00 | 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 | (a,b,c,d,e).VALUES(1,2,'abc','b3 |
149e20 | 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c | ',3.5);.INSERT.INTO.t1.VALUES(2, |
149e40 | 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 | 2,'xyz',NULL,4.25).ON.CONFLICT(b |
149e60 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 | ).DO.UPDATE.SET.e=max(e,excluded |
149e80 | 2e 65 29 3b 0a 82 77 90 70 04 00 85 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 | .e);..w.p...sCREATE.TABLE.t1(a.I |
149ea0 | 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 | NT,b.INTEGER,.c.TEXT,.d.BLOB,.e. |
149ec0 | 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 | ANY,.....UNIQUE(e).ON.CONFLICT.i |
149ee0 | 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 | gnore,.....PRIMARY.KEY(b),.....U |
149f00 | 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 | NIQUE(c).ON.CONFLICT.fail.).WITH |
149f20 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 | OUT.ROWID;.CREATE.INDEX.t1d.ON.t |
149f40 | 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e | 1(d);.CREATE.UNIQUE.INDEX.t1e.ON |
149f60 | 20 74 31 28 65 20 49 53 2d 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | .t1(e.IS-1);.INSERT.INTO.t1(a,b, |
149f80 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
149fa0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
149fc0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
149fe0 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | UPDATE.SET.e=max(e,excluded.e);. |
14a000 | 0d 00 00 00 13 00 77 00 1e 8a 1d 30 1b d6 1a 60 18 ea 17 6e 16 61 13 fd 12 6f 11 96 0e d6 0e 46 | ......w....0...`...n.a...o.....F |
14a020 | 0d 44 0c b3 0b 41 08 89 05 d1 03 35 00 77 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .D...A.....5.w.................. |
14a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
14a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 85 3a 91 18 04 00 8a 79 43 | ........................:.....yC |
14a080 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 | REATE.TABLE.t1(a,INT);.CREATE.TA |
14a0a0 | 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | BLE.counts(v.INTEGER.PRIMARY.KEY |
14a0c0 | 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 | ,.n.INT)/*WUT.ROWID*/;.CREATE.TR |
14a0e0 | 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 | IGGER.r1.AFTER.INSERT.ON.t1.BEGI |
14a100 | 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 | N...INSERT.INTO.counts(v,n).VALU |
14a120 | 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 | ES(new.a,1).......ON.CONFLICT(v) |
14a140 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 | .DO.UPDATE.SET.n=n+1;.END;.CREAT |
14a160 | 45 20 54 52 49 47 47 45 52 20 72 32 a0 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 | E.TRIGGER.r2.AFTER.UPDATE.ON.t1. |
14a180 | 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 | BEGIN...DELETE.FROM.counts.WHERE |
14a1a0 | 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e | .v=old.a.AND.n==1;...UPDATE.coun |
14a1c0 | 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e | ts.SET.n=n-1.WHERE.v=old.a;...IN |
14a1e0 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
14a200 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
14a220 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
14a240 | 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r3.AFTER.DELETE.ON.t1.BEGIN. |
14a260 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
14a280 | 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .a.AND.n==1;...UPDATE.counts.SET |
14a2a0 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 | .n=n-1.WHERE.v=old.a;.END;.INSER |
14a2c0 | 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 | T.INTO.t1(a).VALUES(1),(2),(1),( |
14a2e0 | 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 | 3),(1),(3),(2),(4),(7);.UPDATE.t |
14a300 | 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | 1.SET.a=5.WHERE.a=4;.DELETE.FROM |
14a320 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 56 41 43 55 55 4d 0a 85 18 91 17 04 00 8a 35 43 52 45 | .t1.WHERE.a=7;VACUUM........5CRE |
14a340 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ATE.TABLE.t1(a,INT);.CREATE.TABL |
14a360 | 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | E.counts(v.INTEGER.PRIMARY.KEY,. |
14a380 | 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | n.INT)/*WUT.ROWID*/;.CREATE.TRIG |
14a3a0 | 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r1.AFTER.INSERT.ON.t1.BEGIN. |
14a3c0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 | ..INSERT.INTO.counts(v,n).VALUES |
14a3e0 | 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 | (new.a,1).......ON.CONFLICT(v).D |
14a400 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 | O.UPDATE.SET.n=n+1;.END;.CREATE. |
14a420 | 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 | TRIGGER.r2.AFTER.UPDATE.ON.t1.BE |
14a440 | 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 | GIN...DELETE.FROM.counts.WHERE.v |
14a460 | 3d 6f 6c 64 2e 49 4e 54 45 52 53 45 43 54 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 | =old.INTERSECT1;...UPDATE.counts |
14a480 | 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 | .SET.n=n-1.WHERE.v=old.a;...INSE |
14a4a0 | 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 | RT.INTO.counts(v,n).VALUES(new.a |
14a4c0 | 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 | ,1).......ON.CONFLICT(v).DO.UPDA |
14a4e0 | 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | TE.SET.n=n+1;.END;.CREATE.TRIGGE |
14a500 | 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r3.AFTER.DELETE.ON.t1.BEGIN... |
14a520 | 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 | DELETE.FROM.counts.WHERE.v=old.a |
14a540 | 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e | .AND.n==1;...UPDATE.counts.SET.n |
14a560 | 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 | =n-1.WHERE.v=old.a;.END;.INSERT. |
14a580 | 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 | INTO.t1(a).VALUES(1),(2),(1),(3) |
14a5a0 | 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 | ,(1),(3),(2),(4),(7);.UPDATE.t1. |
14a5c0 | 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 34 91 16 04 00 8a 6d 43 52 45 41 54 45 20 | SET.a=5.WHERE.a=4.4.....mCREATE. |
14a5e0 | 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f | TABLE.t1(a,INT);.CREATE.TABLE.co |
14a600 | 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e | unts(v.INTEGER.PRIMARY.KEY,.n.IN |
14a620 | 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | T)/*WUT.ROWID*/;.CREATE.TRIGGER. |
14a640 | 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e | r1.AFTER.INSERT.ON.t1.BEGIN...IN |
14a660 | 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 | SERT.INTO.counts(v,n).VALUES(new |
14a680 | 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 | .a,1).......ON.CONFLICT(v).DO.UP |
14a6a0 | 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 | DATE.SET.n=n+1;.END;.CREATE.TRIG |
14a6c0 | 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a | GER.r2.AFTER.UPDATE.ON.t1.BEGIN. |
14a6e0 | 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 | ..DELETE.FROM.counts.WHERE.v=old |
14a700 | 2e 49 4e 44 45 58 45 44 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 | .INDEXED==1;...UPDATE.counts.SET |
14a720 | 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 | .n=n-1.WHERE.v=old.a;...INSERT.I |
14a740 | 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a | NTO.counts(v,n).VALUES(new.a,1). |
14a760 | 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ......ON.CONFLICT(v).DO.UPDATE.S |
14a780 | 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 | ET.n=n+1;.END;.CREATE.TRIGGER.r3 |
14a7a0 | 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 | .AFTER.DELETE.ON.t1.BEGIN...DELE |
14a7c0 | 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 | TE.FROM.counts.WHERE.v=old.a.AND |
14a7e0 | 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 | .n==1;...UPDATE.counts.SET.n=n-1 |
14a800 | 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .WHERE.v=old.a;.END;.INSERT.INTO |
14a820 | 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 | .t1(a).VALUES(1),(2),(1),(3),(1) |
14a840 | 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 | ,(3),(2),(4),(7);.UPDATE.t1.SET. |
14a860 | 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | a=5.WHERE.a=4;.DELETE.FROM.t1.WH |
14a880 | 45 52 45 20 61 3d 37 3b 0a 85 34 91 15 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..4.....mCREATE.TABLE.t1 |
14a8a0 | 28 61 2c 49 2c 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (a,I,T);.CREATE.TABLE.counts(v.I |
14a8c0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
14a8e0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
14a900 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
14a920 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 | O.counts(v,n).VALUES(new.a,1)... |
14a940 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(v).DO.UPDATE.SET |
14a960 | 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 | .n=n+1;.END;.CREATE.TRIGGER.r2.A |
14a980 | 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 | FTER.UPDATE.ON.t1.BEGIN...DELETE |
14a9a0 | 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e | .FROM.counts.WHERE.v=old.a.AND.n |
14a9c0 | 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 | ==1;...UPDATE.counts.SET.n=n-1.W |
14a9e0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e | HERE.v=old.a;...INSERT.INTO.coun |
14aa00 | 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e | ts(v,n).VALUES(new.a,1).......ON |
14aa20 | 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 | .CONFLICT(v).DO.UPDATE.SET.n=n+1 |
14aa40 | 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 | ;.END;.CREATE.TRIGGER.r3.AFTER.D |
14aa60 | 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 | ELETE.ON.t1.BEGIN...DELETE.FROM. |
14aa80 | 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 | counts.WHERE.v=old.a.AND.n==1;.. |
14aaa0 | 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 | .UPDATE.counts.SET.n=n-1.WHERE.v |
14aac0 | 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 | =old.a;.END;.INSERT.INTO.t1(a).V |
14aae0 | 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 | ALUES(1),(2),(1),(3),(1),(3),(2) |
14ab00 | 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 | ,(4),(7);.UPDATE.t1.SET.a=5.WHER |
14ab20 | 45 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b | E.a=4;.DELETE.FROM.t1.WHERE.a=7; |
14ab40 | 0a 82 6e 91 14 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 20 54 2c 62 | ..n.....aCREATE.TABLE.t1(a,I.T,b |
14ab60 | 2c 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c | ,INTEGER,.c,TEXT,.d.BLOB,.e,ANY, |
14ab80 | 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 | .....UNIQUE(a).ON.CONFLICT.ignor |
14aba0 | 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 | e,.....PRIMARY.KEY(b),.....UNIQU |
14abc0 | 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 | E(c).ON.CONFLICT.fail.).WITHOUT. |
14abe0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 | ROWID;.CREATE.INDEX.t1d.ON.t1(d) |
14ac00 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 | ;.CREATE.UNIQUE.INDEX.t1e.ON.t1( |
14ac20 | 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 | e);.INSERT.INTO.t1(a,b,c,d,e).VA |
14ac40 | 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 | LUES(1,2,'abc','b3',3.5);.INSERT |
14ac60 | 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 | .INTO.t1.VALUES(2,2,'xyz',NULL,4 |
14ac80 | 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | .25).ON.CONFLICT(b).DO.UPDATE.SE |
14aca0 | 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 81 0d 91 13 04 00 82 1f 43 52 45 41 54 | T.e=max(e,excd.e);.........CREAT |
14acc0 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 44 4f 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t1(a,DOb,c,d,PRIMARY.KEY |
14ace0 | 28 64 2c 64 29 29 3b 56 41 43 55 55 4d 0a 3b 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 49 4e 53 | (d,d));VACUUM.;ITH.data(a,b,cINS |
14ad00 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 | ERT.INTO.t1(a,b,c,d).SELECT.*.FR |
14ad20 | 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 | OM.data.ON.CONFLICT(b,d).UPDATE. |
14ad40 | 53 45 54 0a 81 7e 91 12 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 27 27 | SET..~......CREATE.TABLE.t1(a,'' |
14ad60 | 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | ''''''''''''''''''b,c,d,PRIMARY. |
14ad80 | 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 80 20 55 | KEY(d,c))WITHOUT.ROWID;.CREAT..U |
14ada0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 5c 31 28 63 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t1bc.ON.\1(c,c);.INS |
14adc0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 20 67 6c 6f 20 61 3d 61 2b 31 30 30 30 3b 0a 41 4e 41 4c 59 | ERT.INTO.t1(.glo.a=a+1000;.ANALY |
14ade0 | 5a 45 2a 2c 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 00 00 03 e8 6e 5f 67 72 6f 75 70 | ZE*,S(1,2,3,4),(5,6,7....n_group |
14ae00 | 5f 6f 62 6a 65 63 74 28 31 29 2c 36 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | _object(1),63,14).ON.CONFLICT(c, |
14ae20 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 41 4e 41 4c 59 | b).DO.UPDATE.SET.a=a+1000;.ANALY |
14ae40 | 5a 45 2a 2c 20 27 81 0c 91 11 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 | ZE*,.'........CREATE.TABLE.t1(a. |
14ae60 | 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 2c 31 29 29 3b 52 45 49 4e 44 45 58 20 | json_array_length(1,1));REINDEX. |
14ae80 | 72 74 72 69 6d 28 31 2c 31 29 61 2c 62 2c 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | rtrim(1,1)a,b,.INSERT.INTO.t1(a, |
14aea0 | 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e | b,c,d).SELECT.*.FROM.data.ON.CON |
14aec0 | 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 85 3c 91 10 04 00 8a 7d 43 52 | FLICT(b,d).UPDATE.SET..<.....}CR |
14aee0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 63 68 61 72 28 31 29 2c 49 4e 54 29 3b 0a 43 52 | EATE.TABLE.t1(a.char(1),INT);.CR |
14af00 | 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d | EATE.TABLE.counts(v.INTEGER.PRIM |
14af20 | 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ARY.KEY,.n.INT)/*WUT.ROWID*/;.CR |
14af40 | 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 | EATE.TRIGGER.r1.AFTER.INSERT.ON. |
14af60 | 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c | t1.BEGIN...INSERT.INTO.counts(v, |
14af80 | 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 | n).VALUES(new.a,1).......ON.CONF |
14afa0 | 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 | LICT(v).DO.UPDATE.SET.n=n+1;.END |
14afc0 | 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 | ;.CREATE.TRIGGER.r2.AFTER.UPDATE |
14afe0 | 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 | .ON.t1.BEGIN...DELETE.FROM.count |
14b000 | 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 | s.WHERE.v=old.a.AND.n==1;...UPDA |
14b020 | 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e | TE.counts.SET.n=n-1.WHERE.v=old. |
14b040 | 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c | a;...INSERT.INTO.counts(v,n).VAL |
14b060 | 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 | UES(new.a,1).......ON.CONFLICT(v |
14b080 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 | ).DO.UPDATE.SET.n=n+1;.END;.CREA |
14b0a0 | 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 | TE.TRIGGER.r3.AFTER.DELETE.ON.t1 |
14b0c0 | 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 | .BEGIN...DELETE.FROM.counts.WHER |
14b0e0 | 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 | E.v=old.a.AND.n==1;...UPDATE.cou |
14b100 | 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 | nts.SET.n=n-1.WHERE.v=old.a;.END |
14b120 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 | ;.INSERT.INTO.t1(a).VALUES(1),(2 |
14b140 | 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 | ),(1),(3),(1),(3),(2),(4),(7);.U |
14b160 | 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 3b 0a 44 45 4c 45 | PDATE.t1.SET.a=5.WHERE.a=4;.DELE |
14b180 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 81 55 91 0f 04 00 83 2f 43 52 | TE.FROM.t1.WHERE.a=7;..U...../CR |
14b1a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 62 6c 6f 62 20 49 4e 54 2c 62 20 49 4e 54 45 47 | EATE.TABLE.t1(a.blob.INT,b.INTEG |
14b1c0 | 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 45 58 50 4c 41 49 4e 20 51 | ER,.c.TEXT,.d.BLOB,.e.AEXPLAIN.Q |
14b1e0 | 55 45 52 59 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 | UERY.PLANON.CONFLICT.ignore,.... |
14b200 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(b),.....UNIQUE(c).O |
14b220 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
14b240 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 | .CREATE.INDEX.t1d.ON.t1(d);ANALY |
14b260 | 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 83 0a 91 0e 04 00 86 19 43 52 45 41 54 45 20 54 41 | ZE.TEMP;VACUUM.........CREATE.TA |
14b280 | 42 4c 45 20 74 31 28 61 20 49 4e 54 45 58 43 45 50 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 | BLE.t1(a.INTEXCEPT,b.INTEGER,.c. |
14b2a0 | 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | TEXT,.d.BLOB,.e.ANY,.....UNIQUE( |
14b2c0 | 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 | a).ON.CONFLICT.ignore,.....PRIMA |
14b2e0 | 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 | RY.KEY(b),.....UNIQUE(c).ON.CONF |
14b300 | 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | LICT.fail.).WITHOUT.ROWID;.CREAT |
14b320 | 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | E.INDEX.t1d.ON.t1(d);.CREATE.UNI |
14b340 | 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 | QUE.INDEX.t1e.ON.t1(e);.INSERT.I |
14b360 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 | NTO.t1(a,b,c,d,e).VALUES(1,2,'ab |
14b380 | 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a | c','b3',3.5);EXPLAIN.QUERY.PLAN. |
14b3a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c | INSERT.INTO.t1.VALUES(2,2,'xyz', |
14b3c0 | 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 | NULL,4.25).ON.CONFLICT(b).DO.UPD |
14b3e0 | 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 84 60 91 | ATE.SET.b=max(e,excluded.e);..`. |
14b400 | 0d 04 00 89 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | ....ECREATE.TABLE.t1(a.INTEGER.P |
14b420 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b | RIMARY.KEY,.n.INT)/*WUT.ROWID*/; |
14b440 | 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 | .CREATE.TRIGGER.r1.AFTER.INSERT. |
14b460 | 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | ON.t1.BEGIN...INSERT.INTO.counts |
14b480 | 28 95 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (.,n).VALUES(new.a,1).......ON.C |
14b4a0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
14b4c0 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 | END;.CREATE.TRIGGER.r2.AFTER.UPD |
14b4e0 | 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ATE.ON.t1.BEGIN...DELETE.FROM.co |
14b500 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
14b520 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
14b540 | 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 | ld.a;...INSERT.INTO.counts(v,n). |
14b560 | 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | VALUES(new.a,1).......ON.CONFLIC |
14b580 | 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 | T(v).DO.UPDATE.SET.n=n+1;.END;.C |
14b5a0 | 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e | REATE.TRIGGER.r3.AFTER.DELETE.ON |
14b5c0 | 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 | .t1.BEGIN...DELETE.FROM.counts.W |
14b5e0 | 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 | HERE.v=old.a.AND.n==1;...UPDATE. |
14b600 | 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a | counts.SET.n=n-1.WHERE.v=old.a;. |
14b620 | 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 | END;.INSERT.INTO.t1(a).VALUES(1) |
14b640 | 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 | ,(2),(1),(3),(1),(3),(2),(4),(7) |
14b660 | 3b 82 09 91 0c 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 | ;........CREATE.TABLE.t1(a.INTEG |
14b680 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 29 20 2d 2d 20 57 49 54 48 4f 55 54 20 52 4f | ER.PRIMARY.KEY,.b).--.WITHOUT.RO |
14b6a0 | 57 49 44 0a 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | WID.;.INSERT.INTO.t1(a,b).VALUES |
14b6c0 | 28 31 2c 32 29 2c 28 31 2c 37 29 2c 28 31 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | (1,2),(1,7),(1,3).....ON.CONFLIC |
14b6e0 | 54 28 72 6f 77 69 64 29 20 44 4f 20 55 50 44 41 54 45 20 73 65 74 20 62 3d 6d 61 78 28 62 2c 65 | T(rowid).DO.UPDATE.set.b=max(b,e |
14b700 | 78 63 6c 75 64 65 64 2e 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | xcluded.b);.INSERT.INTO.t1(a,b). |
14b720 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 31 2c 37 29 2c 28 31 2c 33 29 0a 20 20 20 20 4f 4e 20 43 | VALUES(1,2),(1,7),(1,3).....ON.C |
14b740 | 4f 4e 46 4c 49 43 54 28 41 29 20 44 4f 20 55 50 44 41 54 45 20 73 65 74 20 62 3d 6d 61 78 28 62 | ONFLICT(A).DO.UPDATE.set.b=max(b |
14b760 | 2c 65 78 63 6c 75 64 65 64 2e 62 29 3b 0a 82 78 91 0b 04 00 85 75 43 52 45 41 54 45 20 54 41 42 | ,excluded.b);..x.....uCREATE.TAB |
14b780 | 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 5f 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 | LE.t1(a.INT,b._NTEGER,.c.TEXT,.d |
14b7a0 | 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 | .BLOB,.e.ANY,.....UNIQUE(a).ON.C |
14b7c0 | 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | ONFLICT.ignore,.....PRIMARY.KEY( |
14b7e0 | 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | b),.....UNIQUE(c).ON.CONFLICT.fa |
14b800 | 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 | il.).WITHOUT.ROWID;.CREATE.INDEX |
14b820 | 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .t1d.ON.t1(d);.CREATE.UNIQUE.IND |
14b840 | 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | EX.t1e.ON.t1(e);.INSERT.INTO.t1( |
14b860 | 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 | a,b,c,d,e).VALUES(1,2,'abc','b3' |
14b880 | 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 | ,3.5);.INSERT.INTO.t1.VALUES(2,2 |
14b8a0 | 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 | ,'xyz',NULL,4.25).ON.CONFLICT(b) |
14b8c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e | .DO.UPDATE.SET.b=max(e,excluded. |
14b8e0 | 65 29 3b 56 41 43 55 55 4d 0a 82 72 91 0a 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | e);VACUUM..r.....iCREATE.TABLE.t |
14b900 | 31 28 61 20 49 4e 54 2c 62 20 54 45 58 54 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f | 1(a.INT,b.TEXTGER,.c.TEXT,.d.BLO |
14b920 | 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 65 29 20 4f 4e 20 43 4f 4e 46 4c | B,.e.ANY,.....UNIQUE(e).ON.CONFL |
14b940 | 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a | ICT.ignore,.....PRIMARY.KEY(b),. |
14b960 | 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 | ....UNIQUE(c).ON.CONFLICT.fail.) |
14b980 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .WITHOUT.ROWID;.CREATE.INDEX.t1d |
14b9a0 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
14b9c0 | 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(e);.INSERT.INTO.t1(a,b, |
14b9e0 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
14ba00 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
14ba20 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
14ba40 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | UPDATE.SET.e=max(e,excluded.e);. |
14ba60 | 82 72 91 09 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 | .r.....iCREATE.TABLE.t1(a.INT,b. |
14ba80 | 49 4e 54 45 b8 ba ad d3 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a | INTE.....c.TEXT,.d.BLOB,.e.ANY,. |
14baa0 | 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 | ....UNIQUE(a).ON.CONFLICT.ignore |
14bac0 | 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 | ,.....PRIMARY.KEY(b),.....UNIQUE |
14bae0 | 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 | (c).ON.CONFLICT.fail.).WITHOUT.R |
14bb00 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b | OWID;.CREATE.INDEX.t1d.ON.t1(d); |
14bb20 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 | .CREATE.UNIQUE.INDEX.t1e.ON.t1(e |
14bb40 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c | );.INSERT.INTO.t1(a,b,c,d,e).VAL |
14bb60 | 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 | UES(1,2,'abc','b3',3.5);.INSERT. |
14bb80 | 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e | INTO.t1.VALUES(2,2,'xyz',NULL,4. |
14bba0 | 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | 25).ON.CONFLICT(b).DO.UPDATE.SET |
14bbc0 | 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a 82 56 91 08 04 00 85 31 43 52 | .e=max(e,excluded.e);..V.....1CR |
14bbe0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 | EATE.TABLE.t1(a.INT,b.INTEGER,.c |
14bc00 | 2c 54 45 58 54 2c 20 64 2c 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 | ,TEXT,.d,BLOB,.e,ANY,.....UNIQUE |
14bc20 | 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d | (a).ON.CONFLICT.ignore,.....PRIM |
14bc40 | 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e | ARY.KEY(b),.....UNIQUE(c).ON.CON |
14bc60 | 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 52 45 49 4e 44 | FLICT.fail.).WITHOUT.ROWID;REIND |
14bc80 | 45 58 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b | EX.INDEX.t1d.ONDEX.t1e.ON.t1(e); |
14bca0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 | .INSERT.INTO.t1(a,b,c,d,e).VALUE |
14bcc0 | 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | S(1,2,'abc','b3',3.5);.INSERT.IN |
14bce0 | 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | TO.t1.VALUES(2,2,'xyz',NULL,4.25 |
14bd00 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 | ).ON.CONFLICT(b).DO.UPDATE.SET.e |
14bd20 | 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 56 91 07 04 00 85 31 43 52 45 41 54 45 20 54 | =max(e,excd.e);..V.....1CREATE.T |
14bd40 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c | ABLE.t1(a.INT,b.INTEGER,.c,TEXT, |
14bd60 | 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e | .d.BLOB,.e,ANY,.....UNIQUE(a).ON |
14bd80 | 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 | .CONFLICT.ignore,.....PRIMARY.KE |
14bda0 | 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | Y(b),.....UNIQUE(c).ON.CONFLICT. |
14bdc0 | 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 52 45 49 4e 44 45 58 20 49 4e 44 | fail.).WITHOUT.ROWID;REINDEX.IND |
14bde0 | 45 58 20 74 31 64 20 4f 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 | EX.t1d.ONDEX.t1e.ON.t1(e);.INSER |
14be00 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | T.INTO.t1(a,b,c,d,e).VALUES(1,2, |
14be20 | 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | 'abc','b3',3.5);.INSERT.INTO.t1. |
14be40 | 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 | VALUES(2,2,'xyz',NULL,4.25).ON.C |
14be60 | 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | ONFLICT(b).DO.UPDATE.SET.e=max(e |
14be80 | 2c 65 78 63 64 2e 65 29 3b 0a 82 72 91 06 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ,excd.e);..r.....iCREATE.TABLE.t |
14bea0 | 31 28 61 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 d4 45 58 54 2c 20 64 20 42 4c 4f | 1(a.INT,b.INTEGER,.c..EXT,.d.BLO |
14bec0 | 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c | B,.e.ANY,.....UNIQUE(a).ON.CONFL |
14bee0 | 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a | ICT.ignore,.....PRIMARY.KEY(b),. |
14bf00 | 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 | ....UNIQUE(c).ON.CONFLICT.fail.) |
14bf20 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .WITHOUT.ROWID;.CREATE.INDEX.t1d |
14bf40 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
14bf60 | 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(e);.INSERT.INTO.t1(a,b, |
14bf80 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
14bfa0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
14bfc0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
14bfe0 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 6c 75 64 65 64 2e 65 29 3b 0a | UPDATE.SET.e=max(e,excluded.e);. |
14c000 | 0d 00 00 00 17 00 37 00 1d 48 1b d6 1b 02 19 8c 18 1a 17 70 16 0b 14 95 13 23 11 b1 10 59 0f 01 | ......7..H.........p.....#...Y.. |
14c020 | 0d a9 0c 51 0b a7 0a 35 08 c3 07 3d 05 e5 04 8d 03 1b 01 a9 00 37 00 82 6e 91 2f 04 00 85 61 43 | ...Q...5...=.........7..n./...aC |
14c040 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 | REATE.TABLE.t1(a,INT,b,INTEGER,. |
14c060 | 63 2c 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 | c,TEXT,.d.BLOB,.e,ANY,.....UNIQU |
14c080 | 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 | E(a).ON.CONFLICT.ignore,.....PRI |
14c0a0 | 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f | MARY.KEY(b),.....UNIQUE(c).ON.CO |
14c0c0 | 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | NFLICT.fail.).WITHOUT.ROWID;.CRE |
14c0e0 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 | ATE.INDEX.t1d.ON.t1(d);.CREATE.U |
14c100 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 49 4e 44 45 58 | NIQUE.INDEX.t1e.ON.t1(e);REINDEX |
14c120 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 | .INTO.t1(a,b,c,d,e).VALUES(1,2,' |
14c140 | 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 | abc','b3',3.5);.INSERT.INTO.t1.V |
14c160 | 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f | ALUES(2,2,'xyz',NULL,4.25).ON.CO |
14c180 | 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c | NFLICT(b).DO.UPDATE.SET.e=max(e, |
14c1a0 | 65 78 63 64 2e 65 29 3b 0a 82 6e 91 2e 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | excd.e);..n.....aCREATE.TABLE.t1 |
14c1c0 | 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a,INT,b,INTEGER,.c,TEXT,.d.BLOB |
14c1e0 | 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 | ,.e,ANY,.....UNIQUE(a).ON.CONFLI |
14c200 | 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 | CT.ignore,.....PRIMARY.KEY(b),.. |
14c220 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
14c240 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 | WITHOUT.ROWID+.CREATE.INDEX.t1d. |
14c260 | 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ON.t1(d);.CREATE.UNIQUE.INDEX.t1 |
14c280 | 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | e.ON.t1(e);.INSERT.INTO.t1(a,b,c |
14c2a0 | 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 | ,d,e).VALUES(1,2,'abc','b3',3.5) |
14c2c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a | ;.INSERT.INTO.t1.VALUES(2,2,'xyz |
14c2e0 | 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 | ',NULL,4.25).ON.CONFLICT(b).DO.U |
14c300 | 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 91 2d 04 | PDATE.SET.e=max(e,excd.e);..n.-. |
14c320 | 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 | ..aCREATE.TABLE.t1(a,INT,b,INTEG |
14c340 | 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 | ER,.c,TEXT,.d.BLOB,.e,ANY,.....U |
14c360 | 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 45 50 4c 41 43 45 0a 20 20 20 | NIQUE(a).ON.CONFLICT.REPLACE.... |
14c380 | 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f | .PRIMARY.KEY(b),.....UNIQUE(c).O |
14c3a0 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | N.CONFLICT.fail.).WITHOUT.ROWID; |
14c3c0 | 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 | .CREATE.INDEX.t1d.ON.t1(d);.CREA |
14c3e0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e | TE.UNIQUE.INDEX.t1e.ON.t1(e);.IN |
14c400 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 | SERT.INTO.t1(a,b,c,d,e).VALUES(1 |
14c420 | 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,2,'abc','b3',3.5);.INSERT.INTO. |
14c440 | 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f | t1.VALUES(2,2,'xyz',NULL,4.25).O |
14c460 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 | N.CONFLICT(b).DO.UPDATE.SET.e=ma |
14c480 | 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 54 91 2c 04 00 85 2d 43 52 45 41 54 45 20 54 41 42 4c | x(e,excd.e);..T.,...-CREATE.TABL |
14c4a0 | 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 | E.t1(a,INT,b,INTEGER,.c,TEXT,.d. |
14c4c0 | 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 46 4c 49 43 54 20 69 67 6e 6f 72 65 | BLOB,.e,ANY,.....UNIFLICT.ignore |
14c4e0 | 2c 0a 20 20 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | ,...CT.ignore,.....PRIMARY.KEY(b |
14c500 | 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 | ),.....UNIQUE(c).ON.CONFLICT.fai |
14c520 | 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 | l.).WITHOUT.ROWID;.CREATE.INDEX. |
14c540 | 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | t1d.ON.t1(d);.CREATE.UNIQUE.INDE |
14c560 | 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | X.t1e.ON.t1(e);.INSERT.INTO.t1(a |
14c580 | 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c | ,b,c,d,e).VALUES(1,2,'abc','b3', |
14c5a0 | 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c | 3.5);.INSERT.INTO.t1.VALUES(2,2, |
14c5c0 | 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 | 'xyz',NULL,4.25).ON.CONFLICT(b). |
14c5e0 | 44 4f 20 55 50 82 54 91 2b 04 00 85 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 | DO.UP.T.+...-CREATE.TABLE.t1(a,I |
14c600 | 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c a0 65 2c | NT,b,INTEGER,.c.TEXT,.d.BLOB,.e, |
14c620 | 41 4e 59 2c 0a 20 20 20 20 55 4e 49 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 43 54 20 69 | ANY,.....UNIFLICT.ignore,...CT.i |
14c640 | 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 | gnore,.....PRIMARY.KEY(b),.....U |
14c660 | 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 | NIQUE(c).ON.CONFLICT.fail.).WITH |
14c680 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 | OUT.ROWID;.CREATE.INDEX.t1d.ON.t |
14c6a0 | 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e | 1(d);.CREATE.UNIQUE.INDEX.t1e.ON |
14c6c0 | 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 | .t1(e);.INSERT.INTO.t1(a,b,c,d,e |
14c6e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e | ).VALUES(1,2,'abc','b3',3.5);.IN |
14c700 | 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 | SERT.INTO.t1.VALUES(2,2,'xyz',NU |
14c720 | 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 83 02 91 | LL,4.25).ON.CONFLICT(b).DO.UP... |
14c740 | 2a 04 00 86 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 | *....CREATE.TABLE.t1(a,INT,b,INT |
14c760 | 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 | EGER,.c.TEXT,.d.BLOB,.e,ANY,.... |
14c780 | 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 | .UNIQUE(a).ON.CONFLICT.ignore,.. |
14c7a0 | 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e | ...PRIMARY.KEY(b,2,'abc','b3',3. |
14c7c0 | 35 29 3b 0a 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 5);.),.....UNIQUE(c).ON.CONFLICT |
14c7e0 | 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 57 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e | .fail.).WITHOWT.ROWID;.CREATE.IN |
14c800 | 44 45 58 20 74 31 64 18 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | DEX.t1d.ON.t1(d);.CREATE.UNIQUE. |
14c820 | 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | INDEX.t1e.ON.t1(e);.INSERT.INTO. |
14c840 | 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 | t1(a,b,c,d,e).VALUES(1,2,'abc',' |
14c860 | 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 00 00 01 00 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 | b3',3.5);.IN.....INTO.t1.VALUES( |
14c880 | 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2,2,'xyz',NULL,4.25).ON.CONFLICT |
14c8a0 | 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 | (b).DO.UPDATE.SET.e=max(e,excd.e |
14c8c0 | 29 3b 0a 82 6e 91 29 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 | );..n.)...aCREATE.TABLE.t1(a,INT |
14c8e0 | 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e | ,b,INTEGER,.c.TEXT,.d.BLOB,.e,AN |
14c900 | 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | Y,.....UNIQUE(a).ON.CONFLICT.ign |
14c920 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
14c940 | 51 55 45 28 63 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c),.....UNIQUE(c)il.).WITHOU |
14c960 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | T.ROWID;.CREATE.INDEX.t1d.ON.t1( |
14c980 | 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 | d);.CREATE.UNIQUE.INDEX.t1e.ON.t |
14c9a0 | 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 | 1(e);.INSERT.INTO.t1(a,b,c,d,e). |
14c9c0 | 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 | VALUES(1,2,'abc','b3',3.5);.INSE |
14c9e0 | 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c | RT.INTO.t1.VALUES(2,2,'xyz',NULL |
14ca00 | 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,4.25).ON.CONFLICT(b).DO.UPDATE. |
14ca20 | 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 80 64 2e 65 29 3b 0a 82 6e 91 28 04 00 85 61 43 52 45 | SET.e=max(e,ex.d.e);..n.(...aCRE |
14ca40 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 | ATE.TABLE.t1(a,INT,b,INTEGER,.c. |
14ca60 | 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 | TEXT,.d.BLOB,.e,ANY,.....UNIQUE( |
14ca80 | 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 | a).ON.CONFLICT.ignore,.....PRIMA |
14caa0 | 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 | RY.KEY(b),.....UNIQUE(c).ON.CONF |
14cac0 | 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | LICT.fail.).WITHOUT.ROWID;.CREAT |
14cae0 | 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 52 45 49 4e 44 45 58 20 55 4e 49 | E.INDEX.t1d.ON.t1(d);REINDEX.UNI |
14cb00 | 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 | QUE.INDEX.t1e.ON.t1(e);.INSERT.I |
14cb20 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 | NTO.t1(a,b,c,d,e).VALUES(1,2,'ab |
14cb40 | 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c | c','b3',3.5);.INSERT.INTO.t1.VAL |
14cb60 | 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 | UES(2,2,'xyz',NULL,4.25).ON.CONF |
14cb80 | 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 | LICT(b).DO.UPDATE.SET.e=max(e,ex |
14cba0 | 63 64 2e 65 29 3b 0a 81 26 91 27 04 00 82 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | cd.e);..&.'...QCREATE.TABLE.t1(a |
14cbc0 | 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 | ,INT,b,INTEGER,.c.TEXT,.d.BLOB,. |
14cbe0 | 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | e,ANY,.....UNIQUE(a).ON.CONFLICT |
14cc00 | 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 | .ignore,.....PRIMARY.KEY(b),.... |
14cc20 | 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 | .UNIQUE(c).ON.CONFLICT.fail.).WI |
14cc40 | 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 43 52 3b 0a 82 54 91 26 04 00 85 2d 43 52 45 41 54 45 20 | THOUT.ROWID+.CR;..T.&...-CREATE. |
14cc60 | 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 | TABLE.t1(a,INT,b,INTEGER,.c.TEXT |
14cc80 | 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 46 4c 49 43 54 20 69 67 | ,.d.BLOB,.e,ANY,.....UNIFLICT.ig |
14cca0 | 6e 6f 72 65 2c 0a 20 20 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b | nore,...CT.ignore,.....PRIMARY.K |
14ccc0 | 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | EY(b),.....UNIQUE(c).ON.CONFLICT |
14cce0 | 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e | .fail.).WITHOUT.ROWID;.CREATE.IN |
14cd00 | 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 65 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | DEX.t1d.ON.t1(e);.CREATE.UNIQUE. |
14cd20 | 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | INDEX.t1e.ON.t1(e);.INSERT.INTO. |
14cd40 | 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 | t1(a,b,c,d,e).VALUES(1,2,'abc',' |
14cd60 | 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 | b3',3.5);.INSERT.INTO.t1.VALUES( |
14cd80 | 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2,2,'xyz',NULL,4.25).ON.CONFLICT |
14cda0 | 28 62 29 20 44 4f 20 55 50 82 54 91 25 04 00 85 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | (b).DO.UP.T.%...-CREATE.TABLE.t1 |
14cdc0 | 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a,INT,b,INTEGER,.c.TEXT,.d.BLOB |
14cde0 | 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | ,.e,ANY,.....UNIFLICT.ignore,... |
14ce00 | 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 | CT.ignore,.....PRIMARY.KEY(b),.. |
14ce20 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
14ce40 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 | WITHOUT.ROWID;.CREATE.INDEX.t1d. |
14ce60 | 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | ON.t1(d);.CREATE.UNIQUE.INDEX.t1 |
14ce80 | 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | e.ON.t1(e);REPLACE.INTO.t1(a,b,c |
14cea0 | 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 | ,d,e).VALUES(1,2,'abc','b3',3.5) |
14cec0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a | ;.INSERT.INTO.t1.VALUES(2,2,'xyz |
14cee0 | 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 | ',NULL,4.25).ON.CONFLICT(b).DO.U |
14cf00 | 50 82 54 91 24 04 00 85 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 | P.T.$...-CREATE.TABLE.t1(a,INT,b |
14cf20 | 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c | ,INTEGER,.c.TEXT,.d.BLOB,.e,ANY, |
14cf40 | 0a 20 20 20 20 55 4e 49 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 43 54 20 69 67 6e 6f 72 | .....UNIFLICT.ignore,...CT.ignor |
14cf60 | 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 | e,.....PRIMARY.KEY(b),.....UNIQU |
14cf80 | 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 | E(c).ON.CONFLICT.fail.).WITHOUT. |
14cfa0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 | ROWID;.CREATE.INDEX.t1d.ON.t1(d) |
14cfc0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 | ;.CREATE.UNIQUE.INDEX.t1e.ON.t1( |
14cfe0 | 65 29 3b 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 | e);REINDEX.INTO.t1(a,b,c,d,e).VA |
14d000 | 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 | LUES(1,2,'abc','b3',3.5);.INSERT |
14d020 | 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 | .INTO.t1.VALUES(2,2,'xyz',NULL,4 |
14d040 | 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 82 54 91 23 04 00 85 | .25).ON.CONFLICT(b).DO.UP.T.#... |
14d060 | 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 | -CREATE.TABLE.t1(a,INT,b,INTEGER |
14d080 | 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 | ,.c.TEXT,.d.BLOB,.e,ANY,.....UNI |
14d0a0 | 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 | FLICT.ignore,...CT.ignore,.....P |
14d0c0 | 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 | RIMARY.KEY(b),.....UNIQUE(c).ON. |
14d0e0 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | CONFLICT.fail.).WITHOUT.ROWID;.C |
14d100 | 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 | REATE.INDEX.t1d.ON.t1(d);.CREATE |
14d120 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 20 6a 73 6f 6e 5f 72 65 | .UNIQUE.INDEX.t1e.ON.t1(.json_re |
14d140 | 70 6c 61 63 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 | place(1,1,1),b,c,d,e).VALUES(1,2 |
14d160 | 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,'abc','b3',3.5);.INSERT.INTO.t1 |
14d180 | 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 | .VALUES(2,2,'xyz',NULL,4.25).ON. |
14d1a0 | 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 82 6e 91 22 04 00 85 61 43 52 45 41 54 45 20 | CONFLICT(b).DO.UP.n."...aCREATE. |
14d1c0 | 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 | TABLE.t1(a,INT,b,INTEGER,.c.TEXT |
14d1e0 | 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 20 61 2c 62 61 29 20 4f | ,.d.BLOB,.e,ANY,.....UNI.a,ba).O |
14d200 | 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b | N.CONFLICT.ignore,.....PRIMARY.K |
14d220 | 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | EY(b),.....UNIQUE(c).ON.CONFLICT |
14d240 | 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e | .fail.).WITHOUT.ROWID;.CREATE.IN |
14d260 | 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | DEX.t1d.ON.t1(d);.CREATE.UNIQUE. |
14d280 | 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | INDEX.t1e.ON.t1(e);.INSERT.INTO. |
14d2a0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 | t1(a,b,c,d,e).VALUES(1,2,'abc',' |
14d2c0 | 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 | b3',3.5);.INSERT.INTO.t1.VALUES( |
14d2e0 | 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2,2,'xyz',NULL,4.25).ON.CONFLICT |
14d300 | 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 | (b).DO.UPDATE.SET.e=max(e,excd.e |
14d320 | 29 3b 0a 82 6e 91 21 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 | );..n.!...aCREATE.TABLE.t1(a,INT |
14d340 | 2c 62 20 61 2c 62 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e | ,b.a,bEGER,.c,TEXT,.d.BLOB,.e,AN |
14d360 | 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | Y,.....UNIQUE(a).ON.CONFLICT.ign |
14d380 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
14d3a0 | 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c).ON.CONFLICT.fail.).WITHOU |
14d3c0 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 | T.ROWID;.CREATE.INDEX.t1d.ON.t1( |
14d3e0 | 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 | d);.CREATE.UNIQUE.INDEX.t1e.ON.t |
14d400 | 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 | 1(e);.INSERT.INTO.t1(a,b,c,d,e). |
14d420 | 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 | VALUES(1,2,'abc','b3',3.5);.INSE |
14d440 | 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c | RT.INTO.t1.VALUES(2,2,'xyz',NULL |
14d460 | 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,4.25).ON.CONFLICT(b).DO.UPDATE. |
14d480 | 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 72 91 20 04 00 85 69 43 52 45 | SET.e=max(e,excd.e);..r.....iCRE |
14d4a0 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 | ATE.TABLE.t1(a,INT,b.INTEGER,.c. |
14d4c0 | 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e a0 61 2c 62 59 2c 0a 20 20 20 20 55 4e 49 | TEXT,.d.BLOB,.e,AN.a,bY,.....UNI |
14d4e0 | 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 | QUE(a).ON.CONFLICT.ignore,.....P |
14d500 | 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 | RIMARY.KEY(b),.....UNIQUE(c).ON. |
14d520 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | CONFLICT.fail.).WITHOUT.ROWID;.C |
14d540 | 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 | REATE.INDEX.t1d.ON.t1(d);.CREATE |
14d560 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 50 4c 41 | .UNIQUE.INDEX.t1e.ON.t1(e);REPLA |
14d580 | 43 45 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 | CE.INTO.t1(a,b,c,d,e).VALUES(1,2 |
14d5a0 | 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,'abc','b3',3.5);.INSERT.INTO.t1 |
14d5c0 | 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 | .VALUES(2,2,'xyz',NULL,4.25).ON. |
14d5e0 | 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 | CONFLICT(b).DO.UPDATE.SET.e=max( |
14d600 | 65 2c 65 78 63 64 2e 65 29 3b 0a 82 61 91 1f 04 00 85 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 | e,excd.e);..a.....GCREATE.TABLE. |
14d620 | 74 31 28 61 2c 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c | t1(a,INT,b.INTEGER,.c.TEXT,.d.BL |
14d640 | 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 49 43 54 20 69 67 6e 6f 72 65 2c 0a | OB,.e,ANY,.....UNIQUICT.ignore,. |
14d660 | 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 | ....PRIMARY.KEY(b),.....UNIQUE(c |
14d680 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 | ).ON.CONFLICT.fail.).WITHOUT.ROW |
14d6a0 | 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 | ID;.CREATE.INDEX.t1d.ON.t1(d);.C |
14d6c0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b | REATE.UNIQUE.INDEX.t1e.ON.t1(e); |
14d6e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 | .INSERT.INTO.t1(a,b,c,d,e).VALUE |
14d700 | 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | S(1,2,'abc','b3',3.5);.INSERT.IN |
14d720 | ff ff 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | ...t1.VALUES(2,2,'xyz',NULL,4.25 |
14d740 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 | ).ON.CONFLICT(b).DO.UPDATE.SET.e |
14d760 | 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 81 26 91 1e 04 00 82 51 43 52 45 41 54 45 20 54 | =max(e,excd.e);..&.....QCREATE.T |
14d780 | 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c | ABLE.t1(a,INT,b.INTEGER,.c.TEXT, |
14d7a0 | 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e | .d.BLOB,.e,ANY,.....UNIQUE(a).ON |
14d7c0 | 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 | .CONFLICT.ignore,.....PRIMARY.KE |
14d7e0 | 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | Y(b),.....UNIQUE(c).ON.CONFLICT. |
14d800 | 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 43 52 3b 0a 82 6e 91 1d 04 00 | fail.).WITHOUT.ROWID+.CR;..n.... |
14d820 | 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 20 49 4e 54 45 47 45 | .aCREATE.TABLE.t1(a,INT,b.INTEGE |
14d840 | 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e | R,.c.TEXT,.d.BLOB,.e,ANY,.....UN |
14d860 | 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 45 50 4c 41 43 45 0a 20 20 20 20 | IQUE(a).ON.CONFLICT.REPLACE..... |
14d880 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e | PRIMARY.KEY(b),.....UNIQUE(c).ON |
14d8a0 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | .CONFLICT.fail.).WITHOUT.ROWID;. |
14d8c0 | 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 | CREATE.INDEX.t1d.ON.t1(d);.CREAT |
14d8e0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 | E.UNIQUE.INDEX.t1e.ON.t1(e);.INS |
14d900 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1(a,b,c,d,e).VALUES(1, |
14d920 | 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 2,'abc','b3',3.5);.INSERT.INTO.t |
14d940 | 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e | 1.VALUES(2,2,'xyz',NULL,4.25).ON |
14d960 | 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 | .CONFLICT(b).DO.UPDATE.SET.e=max |
14d980 | 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 72 91 1c 04 00 85 69 43 52 45 41 54 45 20 54 41 42 4c 45 | (e,excd.e);..r.....iCREATE.TABLE |
14d9a0 | 20 74 31 28 61 2c 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 | .t1(a,INT,b.INTEGER,.c.TEXT,.d.B |
14d9c0 | 4c 4f 42 2c 20 65 2c 41 4e 20 61 2c 62 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e | LOB,.e,AN.a,bY,.....UNIQUE(a).ON |
14d9e0 | 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 | .CONFLICT.ignore,.....PRIMARY.KE |
14da00 | 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | Y(b),.....UNIQUE(c).ON.CONFLICT. |
14da20 | 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 | fail.).WITHOUT.ROWID;.CREATE.IND |
14da40 | 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | EX.t1d.ON.t1(d);.CREATE.UNIQUE.I |
14da60 | 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | NDEX.t1e.ON.t1(e);.INSERT.INTO.t |
14da80 | 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 | 1(a,b,c,d,e).VALUES(1,2,'abc','b |
14daa0 | 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 | 3',3.5);.INSERT.INTO.t1.VALUES(2 |
14dac0 | 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,2,'xyz',NULL,4.25).ON.CONFLICT( |
14dae0 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 | b).DO.UPDATE.SET.e=max(e,excd.e) |
14db00 | 3b 0a 81 50 91 1b 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c | ;..P.....%CREATE.TABLE.t1(a,INT, |
14db20 | 62 20 49 4e 54 45 47 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 | b.INTEGER,.c.TEXT,.d.BLOB,.e.ANY |
14db40 | 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f | ,.....UNIQUE(a).ON.CONFLICT.igno |
14db60 | 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 | re,.....PRIMARY.KEY(b),.....UNIQ |
14db80 | 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 | UE(c).ON.CONFLICT.fail.).WITHOUT |
14dba0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 | .ROWID;.CREATE.INDEX.t1d.ON.t1(d |
14dbc0 | 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 56 41 43 55 55 4d 0a 82 6e 91 1a 04 00 85 61 43 52 | );ANALYZE.TEMP;VACUUM..n.....aCR |
14dbe0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 63 | EATE.TABLE.t1(a,INT,b.INTEGER,.c |
14dc00 | 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 | .TEXT,.d.BLOB,.e.ANY,.....UNIQUE |
14dc20 | 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 45 50 4c 41 43 45 0a 20 20 20 20 50 52 49 4d | (a).ON.CONFLICT.REPLACE.....PRIM |
14dc40 | 41 52 59 20 4b 45 59 28 64 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e | ARY.KEY(d),.....UNIQUE(c).ON.CON |
14dc60 | 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | FLICT.fail.).WITHOUT.ROWID;.CREA |
14dc80 | 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e | TE.INDEX.t1d.ON.t1(d);.CREATE.UN |
14dca0 | 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 | IQUE.INDEX.t1e.ON.t1(e);.INSERT. |
14dcc0 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 | INTO.t1(a,b,c,d,e).VALUES(1,2,'a |
14dce0 | 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 | bc','b3',3.5);.INSERT.INTO.t1.VA |
14dd00 | 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e | LUES(2,2,'xyz',NULL,4.25).ON.CON |
14dd20 | 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 | FLICT(b).DO.UPDATE.SET.e=max(e,e |
14dd40 | 78 63 64 2e 65 29 3b 0a 85 34 91 19 04 00 8a 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | xcd.e);..4.....mCREATE.TABLE.t1( |
14dd60 | 61 2c 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 62 6c | a,INT);.CREATE.TABLE.counts(v.bl |
14dd80 | 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 2c 49 4e 54 29 57 49 54 48 4f 55 54 | obGER.PRIMARY.KEY,.n,INT)WITHOUT |
14dda0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 20 | .ROWID;.CREATE.TRIGGER.r1.AFTER. |
14ddc0 | 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f | INSERT.ON.t1.BEGIN...INSERT.INTO |
14dde0 | 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 | .counts(v,n).VALUES(new.a,1).... |
14de00 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(v).DO.UPDATE.SET. |
14de20 | 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 | n=n+1;.END;.CREATE.TRIGGER.r2.AF |
14de40 | 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 | TER.UPDATE.ON.t1.BEGIN...DELETE. |
14de60 | 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3c 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d | FROM.counts.WHERE.v<old.a.AND.n= |
14de80 | 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 | =1;...UPDATE.counts.SET.n=n-1.WH |
14dea0 | 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 | ERE.v=old.a;...INSERT.INTO.count |
14dec0 | 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 | s(v,n).VALUES(new.a,1).......ON. |
14dee0 | 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b | CONFLICT(v).DO.UPDATE.SET.n=n+1; |
14df00 | 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 | .END;.CREATE.TRIGGER.r3.AFTER.DE |
14df20 | 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 | LETE.ON.t1.BEGIN...DELETE.FROM.c |
14df40 | 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 | ounts.WHERE.v=old.a.AND.n==1;... |
14df60 | 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d | UPDATE.counts.SET.n=n-1.WHERE.v= |
14df80 | 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 | old.a;.END;.INSERT.INTO.t1(a).VA |
14dfa0 | 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c | LUES(1),(2),(1),(3),(1),(3),(2), |
14dfc0 | 28 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 | (4),(7);.UPDATE.t1.SET.a=5.WHERE |
14dfe0 | 20 61 3d 34 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a | .a=4;.DELETE.FROM.t1.WHERE.a=7;. |
14e000 | 0d 00 00 00 1b 00 4a 00 1e 8e 1d 1c 1b aa 1a 1d 18 90 17 03 15 76 13 e9 12 5c 10 cf 0f 58 0c b8 | ......J..............v...\...X.. |
14e020 | 0a 13 09 83 08 f3 08 63 07 bf 07 07 06 52 05 9b 04 f4 04 2c 03 68 02 a4 01 dc 01 18 00 4a 00 00 | .......c.....R.....,.h.......J.. |
14e040 | 00 00 00 00 00 00 00 00 00 00 81 4a 91 4a 04 00 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ...........J.J....CREATE.TABLE.t |
14e060 | 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | 1(a,b,c.DEFAULT.0,PRIMARY.KEY(a, |
14e080 | 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 | b));.INSERT.INTO.t1.AS.nx(a,b).V |
14e0a0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 | ALUES(1,2),(3,4),(7,8)...ON.CONF |
14e0c0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 | LICT(a,b).DO.....UPDATE.SET.c=(S |
14e0e0 | 45 4c 45 43 54 20 63 20 20 61 2c 62 20 74 32 20 57 48 45 52 45 20 28 61 2c 62 29 3d 28 65 64 65 | ELECT.c..a,b.t2.WHERE.(a,b)=(ede |
14e100 | 64 2e 61 20 67 6c 6f 62 28 31 2c 31 29 2c 65 78 65 64 2e 62 29 29 3b 0a 81 40 91 49 04 00 83 05 | d.a.glob(1,1),exed.b));..@.I.... |
14e120 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c | CREATE.TABLE.t1(a,b,c.DEFAULT.0, |
14e140 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | PRIMARY.KEY(a,b));.INSERT.INTO.t |
14e160 | 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | 1.AS.nx(a,b).VALUES(1,2),(3,4),( |
14e180 | 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 | 7,8)...ON.CONFLICT(a,b).DO.....U |
14e1a0 | 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 20 61 2c 62 20 74 32 20 4c 49 | PDATE.SET.c=(SELECT.c..a,b.t2.LI |
14e1c0 | 4d 49 54 20 28 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 44 91 48 | MIT.(a,b)=(eded.a,exed.b));..D.H |
14e1e0 | 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c | ....CREATE.TABLE.t1(a,b,c.DEFAUL |
14e200 | 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e | T.0,PRIMARY.KEY(a,b));.INSERT.IN |
14e220 | 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | TO.t1.AS.nx(a,b).VALUES(1,2),(3, |
14e240 | 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 | 4),(7,8)...ON.CONFLICT(a,b).DO.. |
14e260 | 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 20 61 2c 62 20 4f | ...UPDATE.SET.c=(SELECT.c..a,b.O |
14e280 | 52 44 45 52 20 42 59 20 28 61 2c 62 29 3d 20 61 2c 62 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 | RDER.BY.(a,b)=.a,b(eded.a,exed.b |
14e2a0 | 29 29 3b 0a 81 40 91 47 04 00 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c | ));..@.G....CREATE.TABLE.t1(a,b, |
14e2c0 | 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 | c.DEFAULT.0,PRIMARY.KEY(a,b));.I |
14e2e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1.AS.nx(a,b).VALUES( |
14e300 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 1,2),(3,4),(7,8)...ON.CONFLICT(a |
14e320 | 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 | ,b).DO.....UPDATE.SET.c=(SELECT. |
14e340 | 63 20 20 61 2c 62 20 47 52 4f 55 50 20 42 59 20 a8 61 2c 20 61 2c 62 65 64 65 64 2e 61 2c 65 78 | c..a,b.GROUP.BY..a,.a,beded.a,ex |
14e360 | 65 64 2e 62 29 29 3b 0a 81 40 91 46 04 00 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ed.b));..@.F....CREATE.TABLE.t1( |
14e380 | 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 | a,b,c.DEFAULT.0,PRIMARY.KEY(a,b) |
14e3a0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c | );.INSERT.INTO.t1.AS.nx(a,b).VAL |
14e3c0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | UES(1,2),(3,4),(7,8)...ON.CONFLI |
14e3e0 | 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c | CT(a,b).DO.....UPDATE.SET.c=(SEL |
14e400 | 45 43 54 20 63 20 20 61 2c 62 20 47 52 4f 55 50 20 42 59 20 28 61 2c 62 29 3d 28 65 64 65 64 2e | ECT.c..a,b.GROUP.BY.(a,b)=(eded. |
14e420 | 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 44 91 45 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 | a,exed.b));..D.E....CREATE.TABLE |
14e440 | 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | .t1(a,b,c.DEFAULT.0,PRIMARY.KEY( |
14e460 | 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 | a,b));.INSERT.INTO.t1.AS.nx(a,b) |
14e480 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f | .VALUES(1,2),(3,4),(7,8)...ON.CO |
14e4a0 | 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d | NFLICT(a,b).DO.....UPDATE.SET.c= |
14e4c0 | 28 53 45 4c 45 43 54 20 63 20 20 61 2c 62 20 47 52 4f 55 50 20 42 59 20 28 61 2c 62 29 3d 20 61 | (SELECT.c..a,b.GROUP.BY.(a,b)=.a |
14e4e0 | 2c 62 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 23 91 44 04 00 82 4b 43 52 45 41 | ,b(eded.a,exed.b));..#.D...KCREA |
14e500 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d | TE.TABLE.t1(a,b,c.DEFAULT.0,PRIM |
14e520 | 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 | ARY.KEY(a,b));.INSERT.INTO.t1.AS |
14e540 | 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 | .nx(a,b).VALUES(1,2),(3,4),(7,8) |
14e560 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 | ...ON.CONFLICT(a,b).DO.....UPDAT |
14e580 | 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 61 76 67 28 31 29 26 63 29 46 52 81 33 91 43 04 | E.SET.c=(SELECT.avg(1)&c)FR.3.C. |
14e5a0 | 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 | ..kCREATE.TABLE.t1(a,b,c.DEFAULT |
14e5c0 | 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | .0,PRIMARY.KEY(a,b));.INSERT.INT |
14e5e0 | 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | O.t1.AS.nx(a,b).VALUES(1,2),(3,4 |
14e600 | 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 | ),(7,8)...ON.CONFLICT(a,b).DO... |
14e620 | 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 61 76 67 28 20 61 32 30 30 | ..UPDATE.SET.c=(SELECT.avg(.a200 |
14e640 | 31 2d 30 31 2d 30 31 25 59 2e 62 31 29 20 63 29 46 52 81 31 91 42 04 00 82 67 43 52 45 41 54 45 | 1-01-01%Y.b1).c)FR.1.B...gCREATE |
14e660 | 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 | .TABLE.t1(a,b,c.DEFAULT.0,PRIMAR |
14e680 | 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e | Y.KEY(a,b));.INSERT.INTO.t1.AS.n |
14e6a0 | 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 | x(a,b).VALUES(1,2),(3,4),(7,8).. |
14e6c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 | .ON.CONFLICT(a,b).DO.....UPDATE. |
14e6e0 | 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 61 76 67 28 20 61 2e 62 32 30 30 31 2d 30 31 2d 30 31 | SET.c=(SELECT.avg(.a.b2001-01-01 |
14e700 | 31 29 20 63 29 46 52 81 34 91 41 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | 1).c)FR.4.A...mCREATE.TABLE.t1(a |
14e720 | 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 | ,b,c.DEFAULT.0,PRIMARY.KEY(a,b)) |
14e740 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 | ;.INSERT.INTO.t1.AS.nx(a,b).VALU |
14e760 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ES(1,2),(3,4),(7,8)...ON.CONFLIC |
14e780 | 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 | T(a,b).DO.....UPDATE.SET.c=(SELE |
14e7a0 | 43 54 20 61 76 67 28 20 61 25 4e 4f 54 20 49 4e 44 45 58 45 44 59 2e 62 31 29 20 63 29 46 52 81 | CT.avg(.a%NOT.INDEXEDY.b1).c)FR. |
14e7c0 | 20 91 40 04 00 82 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 | ..@...ECREATE.TABLE.t1(a,b,c.DEF |
14e7e0 | 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 | AULT.0,PRIMARY.KEY(a,b));.INSERT |
14e800 | 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | .INTO.t1.AS.nx(a,b).VALUES(1,2), |
14e820 | 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 | (3,4),(7,8)...ON.CONFLICT(a,b).D |
14e840 | 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 61 2c 62 20 63 | O.....UPDATE.SET.c=(SELECT.a,b.c |
14e860 | 29 46 52 81 0c 91 3f 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | )FR...?....CREATE.TABLE.t1(a,b,c |
14e880 | 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 20 57 | .DEFAULT.0,PRIMARY.KEY(a,b));..W |
14e8a0 | 49 54 48 20 9c d7 87 d6 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 | ITH......AS.(values(1)).VALUES(1 |
14e8c0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 45 52 45 20 28 | ,2),(3,4),(7,8)...ON.CONFLIERE.( |
14e8e0 | 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 81 0c 91 3e 04 00 82 1d 43 52 45 41 54 | a,b)=(eded.a,exed.b...>....CREAT |
14e900 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 | E.TABLE.t1(a,b,c.DEFAULT.0,PRIMA |
14e920 | 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c | RY.KEY(a,b));..WITH.c(x).AS.(val |
14e940 | 75 65 73 28 31 29 29 20 56 41 4c 55 45 53 28 31 2c 32 30 30 31 2d 30 31 2d 30 31 37 2c 38 29 0a | ues(1)).VALUES(1,2001-01-017,8). |
14e960 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 45 52 45 20 28 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 | ..ON.CONFLIERE.(a,b)=(eded.a,exe |
14e980 | 64 2e 62 81 0c 91 3d 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | d.b...=....CREATE.TABLE.t1(a,b,c |
14e9a0 | 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 20 57 | .DEFAULT.0,PRIMARY.KEY(a,b));..W |
14e9c0 | 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 53 45 4c 45 43 54 28 31 | ITH.c(x).AS.(values(1)).SELECT(1 |
14e9e0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 45 52 45 20 28 | ,2),(3,4),(7,8)...ON.CONFLIERE.( |
14ea00 | 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 85 21 91 3c 04 00 8a 47 43 52 45 41 54 | a,b)=(eded.a,exed.b.!.<...GCREAT |
14ea20 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 45 52 53 45 43 54 49 4e 54 29 3b 0a 43 52 45 41 | E.TABLE.t1(a,INTERSECTINT);.CREA |
14ea40 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
14ea60 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
14ea80 | 54 45 20 54 52 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
14eaa0 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
14eac0 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
14eae0 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
14eb00 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
14eb20 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
14eb40 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 49 4e 54 45 52 53 45 43 54 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.INTERSECT1;...UPDATE |
14eb60 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
14eb80 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
14eba0 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
14ebc0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
14ebe0 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
14ec00 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
14ec20 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
14ec40 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
14ec60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
14ec80 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
14eca0 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 85 1c 91 3b 04 00 8a 3d | ATE.t1.SET.a=5.WHERE.a=4...;...= |
14ecc0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 45 4d 50 54 29 3b 0a 43 52 45 41 | CREATE.TABLE.t1(a,INTEMPT);.CREA |
14ece0 | 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | TE.TABLE.counts(v.INTEGER.PRIMAR |
14ed00 | 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | Y.KEY,.n.INT)/*WUT.ROWID*/;.CREA |
14ed20 | 54 45 20 54 52 49 47 47 45 52 20 72 31 a0 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 | TE.TRIGGER.r1.AFTER.INSERT.ON.t1 |
14ed40 | 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 | .BEGIN...INSERT.INTO.counts(v,n) |
14ed60 | 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .VALUES(new.a,1).......ON.CONFLI |
14ed80 | 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a | CT(v).DO.UPDATE.SET.n=n+1;.END;. |
14eda0 | 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f | CREATE.TRIGGER.r2.AFTER.UPDATE.O |
14edc0 | 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 | N.t1.BEGIN...DELETE.FROM.counts. |
14ede0 | 57 48 45 52 45 20 76 3d 6f 6c 64 2e 49 4e 54 45 52 53 45 43 54 31 3b 0a 20 20 55 50 44 41 54 45 | WHERE.v=old.INTERSECT1;...UPDATE |
14ee00 | 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b | .counts.SET.n=n-1.WHERE.v=old.a; |
14ee20 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 | ...INSERT.INTO.counts(v,n).VALUE |
14ee40 | 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 | S(new.a,1).......ON.CONFLICT(v). |
14ee60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 | DO.UPDATE.SET.n=n+1;.END;.CREATE |
14ee80 | 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 | .TRIGGER.r3.AFTER.DELETE.ON.t1.B |
14eea0 | 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 | EGIN...DELETE.FROM.counts.WHERE. |
14eec0 | 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 | v=old.a.AND.n==1;...UPDATE.count |
14eee0 | 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a | s.SET.n=n-1.WHERE.v=old.a;.END;. |
14ef00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c | INSERT.INTO.t1(a).VALUES(1),(2), |
14ef20 | 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 50 44 | (1),(3),(1),(3),(2),(4),(7);.UPD |
14ef40 | 41 54 45 20 74 31 20 53 45 54 20 61 3d 35 20 57 48 45 52 45 20 61 3d 34 82 73 91 3a 04 00 85 6b | ATE.t1.SET.a=5.WHERE.a=4.s.:...k |
14ef60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 78 79 7a 27 2c 4e 55 40 | CREATE.TABLE.t1(a,INT,b,xyz',NU@ |
14ef80 | 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 54 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 | L,4.25).ON.CONFLTe,ANY,.....UNIQ |
14efa0 | 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 47 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 | UE(a).ON.CONFGICT.ignore,.....PR |
14efc0 | 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 5d 29 20 4f 4e 20 43 | IMARY.KEY(b),.....UNIQUE(]).ON.C |
14efe0 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 44 45 | ONFLICT.fail.).WITHOUT.ROWID;.DE |
14f000 | 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 03 0a 43 52 45 41 54 45 20 | LETE.FROM.t1.WHERE.a=7;..CREATE. |
14f020 | 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | INDEX.t1d.ON.t1(d);.CREATE.UNIQU |
14f040 | 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | E.INDEX.t1e.ON.t1(e);.INSERT.INT |
14f060 | 4f 20 74 31 28 61 2c 62 2c 63 2c 64 61 62 63 27 2c 27 62 33 27 56 41 4c 55 45 53 28 32 2c 32 2c | O.t1(a,b,c,dabc','b3'VALUES(2,2, |
14f080 | 27 78 79 7a 27 2c 4e 55 40 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 54 45 58 54 2c 20 64 | 'xyz',NU@L,4.25).ON.CONFLTEXT,.d |
14f0a0 | 20 42 4c 4f 42 2c 20 65 2c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d | .BLOB,.e,ICT(b).DO.UPDATE.SET.e= |
14f0c0 | 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 83 09 91 39 04 00 86 17 43 52 45 41 54 45 20 54 41 | max(e,excd.e);....9....CREATE.TA |
14f0e0 | 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 61 45 52 2c 20 63 20 54 45 58 54 2c 20 | BLE.t1(a,INT,b,INTEaER,.c.TEXT,. |
14f100 | 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 d7 9e d6 df 4f 4e 20 | d.BLOB,.e,ANY,.....UNIQUE....ON. |
14f120 | 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 | CONFLICT.ignore,.....PRIMARY.KEY |
14f140 | 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | (b),.....UNIQUE(c).ON.CONFLICT.f |
14f160 | 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d | ail.).WITHOUT.ROWID;.DELETE.FROM |
14f180 | 20 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .t1.WHERE.a=7;..CREATE.INDEX.t1d |
14f1a0 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
14f1c0 | 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(e);.INSERT.INTO.t1(a,b, |
14f1e0 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
14f200 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
14f220 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
14f240 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 83 09 91 38 | UPDATE.SET.e=max(e,excd.e);....8 |
14f260 | 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 | ....CREATE.TABLE.t1(a,INT,b,INTE |
14f280 | 61 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 | aER,.c.TEXT,.d.BLOB,.e,ANY,..... |
14f2a0 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
14f2c0 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(b),.....UNIQUE(c). |
14f2e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
14f300 | 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 65 3d 37 3b 0a 0a 43 52 45 | ;.DELETE.FROM.t1.WHERE.e=7;..CRE |
14f320 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 | ATE.INDEX.t1d.ON.t1(d);.CREATE.U |
14f340 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 | NIQUE.INDEX.t1e.ON.t1(e);.INSERT |
14f360 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 | .INTO.t1(a,b,c,d,e).VALUES(1,2,' |
14f380 | 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 | abc','b3',3.5);.INSERT.INTO.t1.V |
14f3a0 | 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f | ALUES(2,2,'xyz',NULL,4.25).ON.CO |
14f3c0 | 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c | NFLICT(b).DO.UPDATE.SET.e=max(e, |
14f3e0 | 65 78 63 64 2e 65 29 3b 0a 83 09 91 37 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | excd.e);....7....CREATE.TABLE.t1 |
14f400 | 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 61 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 | (a,INT,b,INTEaER,.c.TEXT,.d.BLOB |
14f420 | 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 | ,.e,ANY,.....UNIQUE(a).ON.CONFLI |
14f440 | 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 | CT.ignore,.....PRIMARY.KEY(b),.. |
14f460 | 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 | ...UNIQUE(c).ON.CONFLICT.fail.). |
14f480 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | WITHOUT.ROWID;.DELETE.FROM.t1.WH |
14f4a0 | 45 52 45 20 61 3d 43 3b 0a 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 | ERE.a=C;..CREATE.INDEX.t1d.ON.t1 |
14f4c0 | 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 | (d);.CREATE.UNIQUE.INDEX.t1e.ON. |
14f4e0 | 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 | t1(e);.INSERT.INTO.t1(a,b,c,d,e) |
14f500 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 | .VALUES(1,2,'abc','b3',3.5);.INS |
14f520 | 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c | ERT.INTO.t1.VALUES(2,2,'xyz',NUL |
14f540 | 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 | L,4.25).ON.CONFLICT(b).DO.UPDATE |
14f560 | 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 83 09 91 36 04 00 86 17 43 52 | .SET.e=max(e,excd.e);....6....CR |
14f580 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 61 45 52 2c 20 63 | EATE.TABLE.t1(a,INT,b,INTEaER,.c |
14f5a0 | 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 | .TEXT,.d.BLOB,.e,ANY,.....UNIQUE |
14f5c0 | 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d | (a).ON.CONFLICT.ignore,.....PRIM |
14f5e0 | 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e | ARY.KEY(b),.....UNIQUE(c).ON.CON |
14f600 | 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 44 45 4c 45 | FLICT.fail.).WITHOUT.ROWID;.DELE |
14f620 | 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d 42 3b 0a 0a 43 52 45 41 54 45 20 49 4e | TE.FROM.t1.WHERE.a=B;..CREATE.IN |
14f640 | 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | DEX.t1d.ON.t1(d);.CREATE.UNIQUE. |
14f660 | 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | INDEX.t1e.ON.t1(e);.INSERT.INTO. |
14f680 | 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 | t1(a,b,c,d,e).VALUES(1,2,'abc',' |
14f6a0 | 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 | b3',3.5);.INSERT.INTO.t1.VALUES( |
14f6c0 | 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 2,2,'xyz',NULL,4.25).ON.CONFLICT |
14f6e0 | 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 | (b).DO.UPDATE.SET.e=max(e,excd.e |
14f700 | 29 3b 0a 83 09 91 35 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 | );....5....CREATE.TABLE.t1(a,INT |
14f720 | 2c 62 2c 49 4e 54 45 61 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e | ,b,INTEaER,.c.TEXT,.d.BLOB,.e,AN |
14f740 | 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e | Y,.....UNIQUE(a).ON.CONFLICT.ign |
14f760 | 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 | ore,.....PRIMARY.KEY(b),.....UNI |
14f780 | 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 | QUE(c).ON.CONFLICT.fail.).WITHOU |
14f7a0 | 54 20 52 4f 57 49 44 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 45 52 45 20 61 3d | T.ROWID;.DELETE.FROM.t1.WHERE.a= |
14f7c0 | 37 3b 0a 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 2e 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 | 7;..CREATE.INDEX.t.d.ON.t1(d);.C |
14f7e0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b | REATE.UNIQUE.INDEX.t1e.ON.t1(e); |
14f800 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 | .INSERT.INTO.t1(a,b,c,d,e).VALUE |
14f820 | 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e | S(1,2,'abc','b3',3.5);.INSERT.IN |
14f840 | 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 | TO.t1.VALUES(2,2,'xyz',NULL,4.25 |
14f860 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 | ).ON.CONFLICT(b).DO.UPDATE.SET.e |
14f880 | 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 83 09 91 34 04 00 86 17 43 52 45 41 54 45 20 54 | =max(e,excd.e);....4....CREATE.T |
14f8a0 | 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 61 45 52 2c 20 63 20 54 45 58 54 2c | ABLE.t1(a,INT,b,INTEaER,.c.TEXT, |
14f8c0 | 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e | .d.BLOB,.e,ANY,.....UNIQUE(a).ON |
14f8e0 | 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 | .CONFLICT.ignore,.....PRIMARY.KE |
14f900 | 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | Y(b),.....UNIQUE(c).ON.CONFLICT. |
14f920 | 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 44 45 4c 45 54 45 20 46 52 4f | fail.).WITHOUT.ROWID;.DELETE.FRO |
14f940 | 4d 20 74 31 20 57 48 45 52 45 20 61 3d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 | M.t1.WHERE.a=.sqlite_compileopti |
14f960 | 6f 6e 5f 75 73 65 64 28 31 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | on_used(1);.CREATE.UNIQUE.INDEX. |
14f980 | 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | t1e.ON.t1(e);.INSERT.INTO.t1(a,b |
14f9a0 | 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e | ,c,d,e).VALUES(1,2,'abc','b3',3. |
14f9c0 | 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 | 5);.INSERT.INTO.t1.VALUES(2,2,'x |
14f9e0 | 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f | yz',NULL,4.25).ON.CONFLICT(b).DO |
14fa00 | 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 83 09 91 | .UPDATE.SET.e=max(e,excd.e);.... |
14fa20 | 33 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 | 3....CREATE.TABLE.t1(a,INT,b,INT |
14fa40 | 45 61 45 52 2c 20 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 | EaER,.c.TEXT,.d.BLOB,.e,ANY,.... |
14fa60 | 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 | .UNIQUE(a).ON.CONFLICT.ignore,.. |
14fa80 | 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 | ...PRIMARY.KEY(b),.....UNIQUE(c) |
14faa0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 | .ON.CONFLICT.fail.).WITHOUT.ROWI |
14fac0 | 44 3b 0a 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 00 57 48 45 52 45 20 61 3d 37 3b 0a 0a 43 52 | D;.DELETE.FROM.t1.WHERE.a=7;..CR |
14fae0 | 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 | EATE.INDEX.t1d.ON.t1(d);.CREATE. |
14fb00 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 | UNIQUE.INDEX.t1e.ON.t1(e);.INSER |
14fb20 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | T.INTO.t1(a,b,c,d,e).VALUES(1,2, |
14fb40 | 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | 'abc','b3',3.5);.INSERT.INTO.t1. |
14fb60 | 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 | VALUES(2,2,'xyz',NULL,4.25).ON.C |
14fb80 | 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 | ONFLICT(b).DO.UPDATE.SET.e=max(e |
14fba0 | 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 91 32 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ,excd.e);..n.2...aCREATE.TABLE.t |
14fbc0 | 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 2c 42 4c 4f | 1(a,INT,b,INTEGER,.c,TEXT,.d,BLO |
14fbe0 | 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c | B,.e,ANY,.....UNIQUE(a).ON.CONFL |
14fc00 | 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a | ICT.ignore,.....PRIMARY.KEY(b),. |
14fc20 | 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 | ....UNIQUE(c).ON.CONFLICT.fail.) |
14fc40 | 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 | .WITHOUT.ROWID;.CREATE.INDEX.t1d |
14fc60 | 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | .ON.t1(d);.CREATE.UNIQUE.INDEX.t |
14fc80 | 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | 1e.ON.t1(e);.INSERT.INTO.t1(a,b, |
14fca0 | 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 | c,d,e).VALUES(1,2,'abc','b3',3.5 |
14fcc0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 | );.INSERT.INTO.t1.VALUES(2,2,'xy |
14fce0 | 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 | z',NULL,4.25).ON.CONFLICT(b).DO. |
14fd00 | 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 91 31 | UPDATE.SET.e=max(e,excd.e);..n.1 |
14fd20 | 04 00 85 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 | ...aCREATE.TABLE.t1(a,INT,b,INTE |
14fd40 | 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 | GER,.c,TEXT,.d.BLOB,.e,ANY,..... |
14fd60 | 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 | UNIQUE(a).ON.CONFLICT.ignore,... |
14fd80 | 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 65 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 | ..PRIMARY.KEY(e),.....UNIQUE(c). |
14fda0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | ON.CONFLICT.fail.).WITHOUT.ROWID |
14fdc0 | 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 | ;.CREATE.INDEX.t1d.ON.t1(d);.CRE |
14fde0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 0a 49 | ATE.UNIQUE.INDEX.t1e.ON.t1(e);.I |
14fe00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 | NSERT.INTO.t1(a,b,c,d,e).VALUES( |
14fe20 | 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,2,'abc','b3',3.5);.INSERT.INTO |
14fe40 | 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a | .t1.VALUES(2,2,'xyz',NULL,4.25). |
14fe60 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d | ON.CONFLICT(b).DO.UPDATE.SET.e=m |
14fe80 | 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a 82 6e 91 30 04 00 85 61 43 52 45 41 54 45 20 54 41 42 | ax(e,excd.e);..n.0...aCREATE.TAB |
14fea0 | 4c 45 20 74 31 28 61 2c 49 4e 54 2c 62 2c 49 4e 54 45 47 45 52 2c 20 63 2c 54 45 58 54 2c 20 64 | LE.t1(a,INT,b,INTEGER,.c,TEXT,.d |
14fec0 | 20 42 4c 4f 42 2c 20 65 2c 41 4e 59 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 61 29 20 4f 4e 20 43 | .BLOB,.e,ANY,.....UNIQUE(a).ON.C |
14fee0 | 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 | ONFLICT.ignore,.....PRIMARY.KEY( |
14ff00 | 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | b),.....UNIQUE(c).ON.CONFLICT.fa |
14ff20 | 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 | il.).WITHOUT.ROWID;.CREATE.INDEX |
14ff40 | 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .t1d.ON.t1(d);.CREATE.UNIQUE.IND |
14ff60 | 45 58 20 74 31 65 20 4f 4e 20 74 31 28 65 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 31 28 | EX.t1e.ON.t1(e);REPLACE.INTO.t1( |
14ff80 | 61 2c 62 2c 63 2c 64 2c 65 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 27 61 62 63 27 2c 27 62 33 27 | a,b,c,d,e).VALUES(1,2,'abc','b3' |
14ffa0 | 2c 33 2e 35 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 56 41 4c 55 45 53 28 32 2c 32 | ,3.5);.INSERT.INTO.t1.VALUES(2,2 |
14ffc0 | 2c 27 78 79 7a 27 2c 4e 55 4c 4c 2c 34 2e 32 35 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 | ,'xyz',NULL,4.25).ON.CONFLICT(b) |
14ffe0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 65 3d 6d 61 78 28 65 2c 65 78 63 64 2e 65 29 3b 0a | .DO.UPDATE.SET.e=max(e,excd.e);. |
150000 | 0d 00 00 00 2b 00 80 00 1f 35 1e 62 1d 9e 1c e2 1c 2a 1b 72 1a ae 19 ee 19 2e 18 6a 17 b6 16 f6 | ....+....5.b.....*.r.......j.... |
150020 | 16 36 15 76 14 c2 13 fe 13 3a 12 76 11 b2 10 ee 10 21 0f 54 0e 87 0d ba 0c ed 0c 29 0b 79 0a be | .6.v.....:.v.....!.T.......).y.. |
150040 | 0a 01 09 45 08 8a 07 cf 07 14 06 59 05 a5 04 f1 04 47 03 9d 02 f7 02 33 01 a4 01 17 00 80 00 00 | ...E.......Y.....G.....3........ |
150060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
150080 | 81 13 91 75 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 22 | ...u...+CREATE.TABLE.t1(a,b,c,d" |
1500a0 | 22 52 45 46 45 52 45 4e 43 45 53 22 22 52 45 46 45 52 45 4e 43 45 53 22 22 52 45 46 45 52 45 4e | "REFERENCES""REFERENCES""REFEREN |
1500c0 | 43 45 53 22 22 2c 65 52 59 20 4b 45 59 28 29 0a 49 3d 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | CES"",eRY.KEY().I=SERT.INTO.t1(a |
1500e0 | 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 ff 00 00 00 4f 4e 20 43 4f | ,b,c,d).SELECT.*.FROM.d....ON.CO |
150100 | 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 09 91 74 04 00 82 17 43 | NFLICT(b,d).UPDATE.SET....t....C |
150120 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 22 22 22 22 52 45 46 45 52 45 | REATE.TABLE.t1(a,b,c,d""""REFERE |
150140 | 4e 43 45 53 22 22 52 45 46 45 52 45 4e 43 45 53 22 22 52 45 46 45 52 45 4e 43 45 53 0a 49 3d 53 | NCES""REFERENCES""REFERENCES.I=S |
150160 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 | ERT.INTO.t1(a,b,c,d).SELECT.*.FR |
150180 | 4f 4d 20 64 ff 00 00 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 | OM.d....ON.CONFLICT(b,d).UPDATE. |
1501a0 | 53 45 54 0a 81 0b 91 73 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c | SET....s....CREATE.TABLE.t1(a,b, |
1501c0 | 63 2c 64 22 22 22 22 22 22 52 45 46 45 52 45 4e 43 45 53 22 22 2c 65 52 59 20 4b 45 59 28 62 2c | c,d""""""REFERENCES"",eRY.KEY(b, |
1501e0 | 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 3d 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | ,10,11,12)).I=SERT.INTO.t1(a,b,c |
150200 | 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 ff 00 00 00 4f 4e 20 43 4f 4e 46 4c 49 | ,d).SELECT.*.FROM.d....ON.CONFLI |
150220 | 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 40 91 72 04 00 83 05 43 52 45 41 54 | CT(b,d).UPDATE.SET..@.r....CREAT |
150240 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 | E.TABLE.t1(a,b,c.DEFAULT.0,PRIMA |
150260 | 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 | RY.KEY(a,b));.INSERT.INTO.t1.AS. |
150280 | 6e 78 28 61 2c 72 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a | nx(a,r).VALUES(1,2),(3,4),(7,8). |
1502a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 | ..ON.CONFLICT(a,b).DO.....UPDATE |
1502c0 | 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 48 45 52 45 20 28 | .SET.c=(SELECT.c.FROM.t2.WHERE.( |
1502e0 | 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 22 91 71 04 00 82 49 43 | a,b)=(eded.a,exed.b));..".q...IC |
150300 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 | REATE.TABLE.t1(a,b,c.DEFAULT.0,P |
150320 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | RIMARY.KEY(a,b));.INSERT.INTO.t1 |
150340 | 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 | .AS.nx(a,b).VALUES(1,2),(3,4),(7 |
150360 | 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 | ,8)...ON.CONFLICT(a,b).DO.....UP |
150380 | 44 41 54 45 20 53 45 54 20 63 3d 45 58 49 53 54 53 28 53 45 4c 45 43 54 20 63 29 46 52 81 26 91 | DATE.SET.c=EXISTS(SELECT.c)FR.&. |
1503a0 | 70 04 00 82 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 | p...QCREATE.TABLE.t1(a,b,c.DEFAU |
1503c0 | 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 | LT.0,PRIMARY.KEY(a,b));.INSERT.I |
1503e0 | 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | NTO.t1.AS.nx(a,b).VALUES(1,2),(3 |
150400 | 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a | ,4),(7,8)...ON.CONFLICT(a,b).DO. |
150420 | 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 29 3e 67 6c 6f 62 | ....UPDATE.SET.c=(SELECT.c)>glob |
150440 | 28 31 2c 31 29 46 52 81 26 91 6f 04 00 82 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | (1,1)FR.&.o...QCREATE.TABLE.t1(a |
150460 | 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 | ,b,c.DEFAULT.0,PRIMARY.KEY(a,b)) |
150480 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 | ;.INSERT.INTO.t1.AS.nx(a,b).VALU |
1504a0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ES(1,2),(3,4),(7,8)...ON.CONFLIC |
1504c0 | 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 | T(a,b).DO.....UPDATE.SET.c=(SELE |
1504e0 | 43 54 20 63 29 20 67 6c 6f 62 28 31 2c 31 29 46 52 81 30 91 6e 04 00 82 65 43 52 45 41 54 45 20 | CT.c).glob(1,1)FR.0.n...eCREATE. |
150500 | 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 | TABLE.t1(a,b,c.DEFAULT.0,PRIMARY |
150520 | 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 | .KEY(a,b));.INSERT.INTO.t1.AS.nx |
150540 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 | (a,b).VALUES(1,2),(3,4),(7,8)... |
150560 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 | ON.CONFLICT(a,b).DO.....UPDATE.S |
150580 | 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 29 20 67 6c 6f 62 28 31 2c 31 29 20 67 6c 6f 62 28 41 | ET.c=(SELECT.c).glob(1,1).glob(A |
1505a0 | 2c 31 29 46 52 81 30 91 6d 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 | ,1)FR.0.m...eCREATE.TABLE.t1(a,b |
1505c0 | 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a | ,c.DEFAULT.0,PRIMARY.KEY(a,b));. |
1505e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 | INSERT.INTO.t1.AS.nx(a,b).VALUES |
150600 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (1,2),(3,4),(7,8)...ON.CONFLICT( |
150620 | 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 | a,b).DO.....UPDATE.SET.c=(SELECT |
150640 | 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 48 45 52 45 2b 28 61 2c 62 29 29 28 65 81 37 91 6c 04 00 82 | .c.NOTNULL.WHERE+(a,b))(e.7.l... |
150660 | 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 | sCREATE.TABLE.t1(a,b,c.DEFAULT.0 |
150680 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,PRIMARY.KEY(a,b));.INSERT.INTO. |
1506a0 | 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | t1.AS.nx(a,b).VALUES(1,2),(3,4), |
1506c0 | 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 | (7,8)...ON.CONFLICT(a,b).DO..... |
1506e0 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 | UPDATE.SET.c=(SELECT.c.NOTNULL.W |
150700 | 48 45 52 45 20 28 61 3c 62 29 4f 52 20 20 60 61 60 29 28 65 81 37 91 6b 04 00 82 73 43 52 45 41 | HERE.(a<b)OR..`a`)(e.7.k...sCREA |
150720 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d | TE.TABLE.t1(a,b,c.DEFAULT.0,PRIM |
150740 | 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 | ARY.KEY(a,b));.INSERT.INTO.t1.AS |
150760 | 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 | .nx(a,b).VALUES(1,2),(3,4),(7,8) |
150780 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 | ...ON.CONFLICT(a,b).DO.....UPDAT |
1507a0 | 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 48 45 52 45 20 | E.SET.c=(SELECT.c.NOTNULL.WHERE. |
1507c0 | 28 61 3c 62 29 49 53 20 74 72 75 65 29 28 65 81 37 91 6a 04 00 82 73 43 52 45 41 54 45 20 54 41 | (a<b)IS.true)(e.7.j...sCREATE.TA |
1507e0 | 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b | BLE.t1(a,b,c.DEFAULT.0,PRIMARY.K |
150800 | 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 | EY(a,b));.INSERT.INTO.t1.AS.nx(a |
150820 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e | ,b).VALUES(1,2),(3,4),(7,8)...ON |
150840 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 | .CONFLICT(a,b).DO.....UPDATE.SET |
150860 | 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 48 45 52 45 20 28 61 2d 62 29 | .c=(SELECT.c.NOTNULL.WHERE.(a-b) |
150880 | 4f 52 20 20 60 61 60 29 28 65 81 37 91 69 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | OR..`a`)(e.7.i...sCREATE.TABLE.t |
1508a0 | 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | 1(a,b,c.DEFAULT.0,PRIMARY.KEY(a, |
1508c0 | 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 | b));.INSERT.INTO.t1.AS.nx(a,b).V |
1508e0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 | ALUES(1,2),(3,4),(7,8)...ON.CONF |
150900 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 | LICT(a,b).DO.....UPDATE.SET.c=(S |
150920 | 45 4c 45 43 54 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 48 45 52 45 20 28 61 2c 62 29 4f 52 20 74 72 | ELECT.c.NOTNULL.WHERE.(a,b)OR.tr |
150940 | 75 65 29 28 65 81 38 91 68 04 00 82 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 | ue)(e.8.h...uCREATE.TABLE.t1(a,b |
150960 | 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a | ,c.DEFAULT.0,PRIMARY.KEY(a,b));. |
150980 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 | INSERT.INTO.t1.AS.nx(a,b).VALUES |
1509a0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (1,2),(3,4),(7,8)...ON.CONFLICT( |
1509c0 | 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 | a,b).DO.....UPDATE.SET.c=(SELECT |
1509e0 | 20 63 20 4e 4f 54 4e 55 4c 4c 20 57 48 45 52 45 20 28 61 2c 62 29 41 4e 44 20 74 72 75 65 29 28 | .c.NOTNULL.WHERE.(a,b)AND.true)( |
150a00 | 65 81 39 91 67 04 00 82 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 | e.9.g...wCREATE.TABLE.t1(a,b,c.D |
150a20 | 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 | EFAULT.0,PRIMARY.KEY(a,b));.INSE |
150a40 | 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | RT.INTO.t1.AS.nx(a,b).VALUES(1,2 |
150a60 | 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | ),(3,4),(7,8)...ON.CONFLICT(a,b) |
150a80 | 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e | .DO.....UPDATE.SET.c=(SELECT.c.N |
150aa0 | 4f 54 4e 55 4c 4c 20 57 48 45 52 45 20 28 61 20 2a 2d 62 29 4f 52 20 74 72 75 65 29 28 65 81 37 | OTNULL.WHERE.(a.*-b)OR.true)(e.7 |
150ac0 | 91 66 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 | .f...sCREATE.TABLE.t1(a,b,c.DEFA |
150ae0 | 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 | ULT.0,PRIMARY.KEY(a,b));.INSERT. |
150b00 | 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | INTO.t1.AS.nx(a,b).VALUES(1,2),( |
150b20 | 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | 3,4),(7,8)...ON.CONFLICT(a,b).DO |
150b40 | 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e 4f 54 4e | .....UPDATE.SET.c=(SELECT.c.NOTN |
150b60 | 55 4c 4c 20 57 48 45 52 45 20 28 3f 3c 62 29 4f 52 20 74 72 75 65 29 28 65 81 2c 91 65 04 00 82 | ULL.WHERE.(?<b)OR.true)(e.,.e... |
150b80 | 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 | ]CREATE.TABLE.t1(a,b,c.DEFAULT.0 |
150ba0 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,PRIMARY.KEY(a,b));.INSERT.INTO. |
150bc0 | 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | t1.AS.nx(a,b).VALUES(1,2),(3,4), |
150be0 | 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 | (7,8)...ON.CONFLICT(a,b).DO..... |
150c00 | 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 4e 4f 54 20 67 6c 6f 62 28 | UPDATE.SET.c=(SELECT.c.NOT.glob( |
150c20 | 31 2c 31 29 20 28 61 2c 62 81 40 91 64 04 00 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | 1,1).(a,b.@.d....CREATE.TABLE.t1 |
150c40 | 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 | (a,b,c.DEFAULT.0,PRIMARY.KEY(a,b |
150c60 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 | ));.INSERT.INTO.t1.AS.nx(a,b).VA |
150c80 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c | LUES(1,2),(3,4),(7,8)...ON.CONFL |
150ca0 | 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 | ICT(a,b).DO.....UPDATE.SET.c=(SE |
150cc0 | 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 2c 57 48 45 52 2c 20 28 61 2c 20 22 61 22 2c 22 62 22 | LECT.c.FROM.t2,WHER,.(a,."a","b" |
150ce0 | 2c 61 2c 65 78 65 64 2c 62 29 29 3b 0a 81 49 91 63 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c | ,a,exed,b));..I.c....CREATE.TABL |
150d00 | 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 | E.t1(a,b,c.DEFAULT.0,PRIMARY.KEY |
150d20 | 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 | (a,b));.INSERT.INTO.t1.AS.nx(a,b |
150d40 | 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 | ).VALUES(1,2),(3,4),(7,8)...ON.C |
150d60 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 | ONFLICT(a,b).DO.....UPDATE.SET.c |
150d80 | 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 57 48 45 52 2c 20 28 61 2c 48 45 52 | =(SELECT.c.FROM.t2.WWHER,.(a,HER |
150da0 | 2c 20 28 61 2c 20 22 61 22 2c 22 62 22 2c 61 2c 71 78 65 64 29 e2 29 29 3b 0a 81 49 91 62 04 00 | ,.(a,."a","b",a,qxed).));..I.b.. |
150dc0 | 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 | ..CREATE.TABLE.t1(a,b,c.DEFAULT. |
150de0 | 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 0,PRIMARY.KEY(a,b));.INSERT.INTO |
150e00 | 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | .t1.AS.nx(a,b).VALUES(1,2),(3,4) |
150e20 | 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 | ,(7,8)...ON.CONFLICT(a,b).DO.... |
150e40 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 | .UPDATE.SET.c=(SELECT.c.FROM.t2. |
150e60 | 57 57 48 45 52 2c 20 28 61 2c 48 45 52 2c 20 28 61 2c 20 22 61 22 2c 22 62 22 29 61 2c 71 78 65 | WWHER,.(a,HER,.(a,."a","b")a,qxe |
150e80 | 64 2e 62 29 29 3b 0a 81 49 91 61 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | d.b));..I.a....CREATE.TABLE.t1(a |
150ea0 | 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 | ,b,c.DEFAULT.0,PRIMARY.KEY(a,b)) |
150ec0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 | ;.INSERT.INTO.t1.AS.nx(a,b).VALU |
150ee0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ES(1,2),(3,4),(7,8)...ON.CONFLIC |
150f00 | 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 | T(a,b).DO.....UPDATE.SET.c=(SELE |
150f20 | 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 57 48 45 52 2c 20 28 61 2c 48 45 52 2c 20 28 61 2c 20 | CT.c.FROM.t2.WWHER,.(a,HER,.(a,. |
150f40 | 22 61 22 29 22 62 22 2c 61 2c 71 78 65 64 2e 62 29 29 3b 0a 81 49 91 60 04 00 83 17 43 52 45 41 | "a")"b",a,qxed.b));..I.`....CREA |
150f60 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d | TE.TABLE.t1(a,b,c.DEFAULT.0,PRIM |
150f80 | 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 | ARY.KEY(a,b));.INSERT.INTO.t1.AS |
150fa0 | 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 | .nx(a,b).VALUES(1,2),(3,4),(7,8) |
150fc0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 | ...ON.CONFLICT(a,b).DO.....UPDAT |
150fe0 | 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 57 48 45 52 2c | E.SET.c=(SELECT.c.FROM.t2.WWHER, |
151000 | 20 28 61 2c 48 2c 52 2c 20 28 61 2c 20 22 61 22 2c 22 62 22 2c 61 2c 71 78 65 64 2e 62 29 29 3b | .(a,H,R,.(a,."a","b",a,qxed.b)); |
151020 | 0a 81 49 91 5f 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 | ..I._....CREATE.TABLE.t1(a,b,c.D |
151040 | 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 | EFAULT.0,PRIMARY.KEY(a,b));.INSE |
151060 | 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | RT.INTO.t1.AS.nx(a,b).VALUES(1,2 |
151080 | 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 | ),(3,4),(7,8)...ON.CONFLICT(a,b) |
1510a0 | 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 | .DO.....UPDATE.SET.c=(SELECT.c.F |
1510c0 | 52 4f 4d 20 74 32 20 57 57 48 45 52 2c 20 28 61 2c 48 29 52 2c 20 28 61 2c 20 22 61 22 2c 22 62 | ROM.t2.WWHER,.(a,H)R,.(a,."a","b |
1510e0 | 22 2c 61 2c 71 78 65 64 2e 62 29 29 3b 0a 81 40 91 5e 04 00 83 05 43 52 45 41 54 45 20 54 41 42 | ",a,qxed.b));..@.^....CREATE.TAB |
151100 | 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 | LE.t1(a,b,c.DEFAULT.0,PRIMARY.KE |
151120 | 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c | Y(a,b));.INSERT.INTO.t1.AS.nx(a, |
151140 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 | b).VALUES(1,2),(3,4),(7,8)...ON. |
151160 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 | CONFLICT(a,b).DO.....UPDATE.SET. |
151180 | 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 48 45 52 2c 20 a8 61 2c 20 22 61 | c=(SELECT.c.FROM.t2.WHER,..a,."a |
1511a0 | 22 2c 22 62 22 2c 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 40 91 5d 04 00 83 05 43 52 45 41 54 45 | ","b",a,exed.b));..@.]....CREATE |
1511c0 | 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 | .TABLE.t1(a,b,c.DEFAULT.0,PRIMAR |
1511e0 | 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e | Y.KEY(a,b));.INSERT.INTO.t1.AS.n |
151200 | 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 | x(a,b).VALUES(1,2),(3,4),(7,8).. |
151220 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 | .ON.CONFLICT(a,b).DO.....UPDATE. |
151240 | 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 48 45 52 2c 20 a8 61 | SET.c=(SELECT.c.FROM.t2.WHER,..a |
151260 | 2c 20 22 61 22 2c 22 62 22 2c 61 2c 65 78 65 64 2c 62 29 29 3b 0a 81 40 91 5c 04 00 83 05 43 52 | ,."a","b",a,exed,b));..@.\....CR |
151280 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 | EATE.TABLE.t1(a,b,c.DEFAULT.0,PR |
1512a0 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | IMARY.KEY(a,b));.INSERT.INTO.t1. |
1512c0 | 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c | AS.nx(a,b).VALUES(1,2),(3,4),(7, |
1512e0 | 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 | 8)...ON.CONFLICT(a,b).DO.....UPD |
151300 | 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 57 48 45 52 | ATE.SET.c=(SELECT.c.FROM.t2.WHER |
151320 | 2c 20 61 2e 62 20 22 61 22 2c 22 62 22 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 40 91 5b 04 00 | ,.a.b."a","b".a,exed.b));..@.[.. |
151340 | 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 | ..CREATE.TABLE.t1(a,b,c.DEFAULT. |
151360 | 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 0,PRIMARY.KEY(a,b));.INSERT.INTO |
151380 | 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | .t1.AS.nx(a,b).VALUES(1,2),(3,4) |
1513a0 | 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 | ,(7,8)...ON.CONFLICT(a,b).DO.... |
1513c0 | 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 | .UPDATE.SET.c=(SELECT.c.FROM.t2. |
1513e0 | 57 48 45 52 2c 20 28 61 2c 20 61 2c 62 2c 22 62 22 2c 61 2c 65 78 65 64 2c 62 29 29 3b 0a 81 40 | WHER,.(a,.a,b,"b",a,exed,b));..@ |
151400 | 91 5a 04 00 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 | .Z....CREATE.TABLE.t1(a,b,c.DEFA |
151420 | 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 | ULT.0,PRIMARY.KEY(a,b));.INSERT. |
151440 | 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | INTO.t1.AS.nx(a,b).VALUES(1,2),( |
151460 | 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | 3,4),(7,8)...ON.CONFLICT(a,b).DO |
151480 | 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d | .....UPDATE.SET.c=(SELECT.c.FROM |
1514a0 | 20 74 32 20 57 48 45 52 2c 20 28 61 2c 20 22 61 22 2c 28 56 41 2c 61 2c 65 78 65 64 2e 62 29 29 | .t2.WHER,.(a,."a",(VA,a,exed.b)) |
1514c0 | 3b 0a 81 30 91 59 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 | ;..0.Y...eCREATE.TABLE.t1(a,b,c. |
1514e0 | 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 | DEFAULT.0,PRIMARY.KEY(a,b));.INS |
151500 | 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1.AS.nx(a,b).VALUES(1, |
151520 | 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | 2),(3,4),(7,8)...ON.CONFLICT(a,b |
151540 | 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 | ).DO.....UPDATE.SET.c=(SELECT.c. |
151560 | 46 52 4f 4d 20 74 32 20 55 53 49 4e 47 20 28 61 2c 62 29 3d 28 65 81 3c 91 58 04 00 82 7d 43 52 | FROM.t2.USING.(a,b)=(e.<.X...}CR |
151580 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 | EATE.TABLE.t1(a,b,c.DEFAULT.0,PR |
1515a0 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | IMARY.KEY(a,b));.INSERT.INTO.t1. |
1515c0 | 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c | AS.nx(a,b).VALUES(1,2),(3,4),(7, |
1515e0 | 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 | 8)...ON.CONFLICT(a,b).DO.....UPD |
151600 | 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 | ATE.SET.c=(SELECT.c.FROM.t2.ORDE |
151620 | 52 20 42 59 20 61 2c 62 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 3c 91 57 04 00 82 7d 43 52 | R.BY.a,bd.a,exed.b));..<.W...}CR |
151640 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 | EATE.TABLE.t1(a,b,c.DEFAULT.0,PR |
151660 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | IMARY.KEY(a,b));.INSERT.INTO.t1. |
151680 | 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c | AS.nx(a,b).VALUES(1,2),(3,4),(7, |
1516a0 | 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 | 8)...ON.CONFLICT(a,b).DO.....UPD |
1516c0 | 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 | ATE.SET.c=(SELECT.c.FROM.t2.ORDE |
1516e0 | 52 20 42 59 20 61 2c 62 64 2c 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 3c 91 56 04 00 82 7d 43 52 | R.BY.a,bd,a,exed.b));..<.V...}CR |
151700 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 | EATE.TABLE.t1(a,b,c.DEFAULT.0,PR |
151720 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | IMARY.KEY(a,b));.INSERT.INTO.t1. |
151740 | 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c | AS.nx(a,b).VALUES(1,2),(3,4),(7, |
151760 | 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 | 8)...ON.CONFLICT(a,b).DO.....UPD |
151780 | 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 | ATE.SET.c=(SELECT.c.FROM.t2.ORDE |
1517a0 | 52 20 42 59 20 61 2c 62 64 2c 61 2c 65 78 65 64 2c 62 29 29 3b 0a 81 30 91 55 04 00 82 65 43 52 | R.BY.a,bd,a,exed,b));..0.U...eCR |
1517c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 | EATE.TABLE.t1(a,b,c.DEFAULT.0,PR |
1517e0 | 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 | IMARY.KEY(a,b));.INSERT.INTO.t1. |
151800 | 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c | AS.nx(a,b).VALUES(1,2),(3,4),(7, |
151820 | 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 | 8)...ON.CONFLICT(a,b).DO.....UPD |
151840 | 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 4c 49 4d 49 | ATE.SET.c=(SELECT.c.FROM.t2.LIMI |
151860 | 54 20 28 61 2c 62 29 3d 28 65 81 40 91 54 04 00 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | T.(a,b)=(e.@.T....CREATE.TABLE.t |
151880 | 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | 1(a,b,c.DEFAULT.0,PRIMARY.KEY(a, |
1518a0 | 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 | b));.INSERT.INTO.t1.AS.nx(a,b).V |
1518c0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 | ALUES(1,2),(3,4),(7,8)...ON.CONF |
1518e0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 | LICT(a,b).DO.....UPDATE.SET.c=(S |
151900 | 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 48 41 56 49 4e 47 28 61 2c 62 29 3d 28 65 64 65 | ELECT.c.FROM.t2.HAVING(a,b)=(ede |
151920 | 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 3c 91 53 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 | d.a,exed.b));..<.S...}CREATE.TAB |
151940 | 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 | LE.t1(a,b,c.DEFAULT.0,PRIMARY.KE |
151960 | 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c | Y(a,b));.INSERT.INTO.t1.AS.nx(a, |
151980 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 | b).VALUES(1,2),(3,4),(7,8)...ON. |
1519a0 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 | CONFLICT(a,b).DO.....UPDATE.SET. |
1519c0 | 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 28 65 64 65 | c=(SELECT.c.FROM.t2.GROUP.BY(ede |
1519e0 | 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 3c 91 52 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 | d.a,exed.b));..<.R...}CREATE.TAB |
151a00 | 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 | LE.t1(a,b,c.DEFAULT.0,PRIMARY.KE |
151a20 | 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c | Y(a,b));.INSERT.INTO.t1.AS.nx(a, |
151a40 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 | b).VALUES(1,2),(3,4),(7,8)...ON. |
151a60 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 | CONFLICT(a,b).DO.....UPDATE.SET. |
151a80 | 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 61 2c 62 | c=(SELECT.c.FROM.t2.GROUP.BY.a,b |
151aa0 | 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 40 91 51 04 00 83 05 43 52 45 41 54 45 20 54 41 42 | d.a,exed.b));..@.Q....CREATE.TAB |
151ac0 | 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 | LE.t1(a,b,c.DEFAULT.0,PRIMARY.KE |
151ae0 | 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c | Y(a,b));.INSERT.INTO.t1.AS.nx(a, |
151b00 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 | b).VALUES(1,2),(3,4),(7,8)...ON. |
151b20 | 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 | CONFLICT(a,b).DO.....UPDATE.SET. |
151b40 | 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 74 32 20 20 22 61 22 2c 22 62 22 2c 20 22 61 | c=(SELECT.c.FROM.t2.."a","b",."a |
151b60 | 22 2c 22 62 22 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 34 91 50 04 00 82 6d 43 52 45 41 54 45 | ","b".a,exed.b));..4.P...mCREATE |
151b80 | 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 | .TABLE.t1(a,b,c.DEFAULT.0,PRIMAR |
151ba0 | 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e | Y.KEY(a,b));.INSERT.INTO.t1.AS.n |
151bc0 | 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 | x(a,b).VALUES(1,2),(3,4),(7,8).. |
151be0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 | .ON.CONFLICT(a,b).DO.....UPDATE. |
151c00 | 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 61 2c 62 20 74 32 20 55 53 49 4e | SET.c=(SELECT.c.FROM.a,b.t2.USIN |
151c20 | 47 20 28 61 ac 62 29 3d 28 65 81 34 91 4f 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | G.(a.b)=(e.4.O...mCREATE.TABLE.t |
151c40 | 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c | 1(a,b,c.DEFAULT.0,PRIMARY.KEY(a, |
151c60 | 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 | b));.INSERT.INTO.t1.AS.nx(a,b).V |
151c80 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 | ALUES(1,2),(3,4),(7,8)...ON.CONF |
151ca0 | 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 | LICT(a,b).DO.....UPDATE.SET.c=(S |
151cc0 | 45 4c 45 43 54 20 63 20 46 52 4f 4d 20 61 2c 62 20 74 32 20 55 53 49 4e 47 20 28 61 2c 62 29 3d | ELECT.c.FROM.a,b.t2.USING.(a,b)= |
151ce0 | 28 65 81 38 91 4e 04 00 82 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 | (e.8.N...uCREATE.TABLE.t1(a,b,c. |
151d00 | 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 | DEFAULT.0,PRIMARY.KEY(a,b));.INS |
151d20 | 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1.AS.nx(a,b).VALUES(1, |
151d40 | 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | 2),(3,4),(7,8)...ON.CONFLICT(a,b |
151d60 | 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 | ).DO.....UPDATE.SET.c=(SELECT.c. |
151d80 | 46 52 4f 4d 20 61 2c 62 20 74 32 20 55 53 49 4e 47 20 28 20 61 2c 62 61 2c 62 29 3d 28 65 81 40 | FROM.a,b.t2.USING.(.a,ba,b)=(e.@ |
151da0 | 91 4d 04 00 83 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 | .M....CREATE.TABLE.t1(a,b,c.DEFA |
151dc0 | 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 | ULT.0,PRIMARY.KEY(a,b));.INSERT. |
151de0 | 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | INTO.t1.AS.nx(a,b).VALUES(1,2),( |
151e00 | 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f | 3,4),(7,8)...ON.CONFLICT(a,b).DO |
151e20 | 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 41 42 4f 52 | .....UPDATE.SET.c=(SELECT.c.ABOR |
151e40 | 54 74 32 20 57 48 45 52 45 20 28 61 2c 20 22 61 22 2c 22 62 22 2e 61 2c 65 78 65 64 2e 62 29 29 | Tt2.WHERE.(a,."a","b".a,exed.b)) |
151e60 | 3b 0a 81 4f 91 4c 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 | ;..O.L...#CREATE.TABLE.t1(a,b,c. |
151e80 | 44 45 46 41 55 4c 54 20 30 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 | DEFAULT.0,PRIMARY.KEY(a,b));.INS |
151ea0 | 45 52 54 20 49 4e 54 4f 20 74 31 20 41 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ERT.INTO.t1.AS.nx(a,b).VALUES(1, |
151ec0 | 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | 2),(3,4),(7,8)...ON.CONFLICT(a,b |
151ee0 | 29 20 44 4f 0a 20 20 20 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 | ).DO.....UPDATE.SET.c=(SELECT.c. |
151f00 | 22 61 22 2c 22 62 22 20 22 61 22 2c 20 61 76 67 28 31 29 22 62 22 20 57 48 45 52 45 20 28 61 2c | "a","b"."a",.avg(1)"b".WHERE.(a, |
151f20 | 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a 81 47 91 4b 04 00 83 13 43 52 45 | b)=(eded.a,exed.b));..G.K....CRE |
151f40 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 20 44 45 46 41 55 4c 54 20 30 2c 50 52 49 | ATE.TABLE.t1(a,b,c.DEFAULT.0,PRI |
151f60 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 20 41 | MARY.KEY(a,b));.INSERT.INTO.t1.A |
151f80 | 53 20 6e 78 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 37 2c 38 | S.nx(a,b).VALUES(1,2),(3,4),(7,8 |
151fa0 | 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 0a 20 20 20 20 55 50 44 41 | )...ON.CONFLICT(a,b).DO.....UPDA |
151fc0 | 54 45 20 53 45 54 20 63 3d 28 53 45 4c 45 43 54 20 63 20 22 61 22 2c 20 61 76 67 28 31 29 20 61 | TE.SET.c=(SELECT.c."a",.avg(1).a |
151fe0 | 2c 62 57 48 45 52 45 20 28 61 2c 62 29 3d 28 65 64 65 64 2e 61 2c 65 78 65 64 2e 62 29 29 3b 0a | ,bWHERE.(a,b)=(eded.a,exed.b));. |
152000 | 0d 00 00 00 30 00 bd 00 1f 71 1e e2 1e 55 1d c8 1d 3b 1c ab 1c 1e 1b 1a 1a 8b 19 fc 19 6d 18 e0 | ....0....q...U...;...........m.. |
152020 | 18 51 17 c2 17 33 16 a4 16 16 15 88 14 fa 14 6a 13 c2 12 f3 12 66 11 d9 11 08 10 5f 0f 92 0e e1 | .Q...3.........j.....f....._.... |
152040 | 0e 34 0d 8b 0c e6 0c 2a 0b 75 0a c0 0a 0b 09 5e 08 ad 07 fc 07 4b 06 a6 05 ed 05 33 04 7e 03 c9 | .4.....*.u.....^.....K.....3.~.. |
152060 | 03 02 02 33 01 78 00 bd 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ...3.x.......................... |
152080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1520a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 37 92 | ..............................7. |
1520c0 | 25 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | %...sCREATE.TABLE.t1(a,b,c,d,PRI |
1520e0 | 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c | MARY.KEY(b,d));.WITH.data(a,b,c, |
152100 | 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 38 38 38 38 38 38 | d).AS.(VALUES(1,2,3,4),(5,888888 |
152120 | 38 3c 38 38 38 32 30 30 31 2d 30 31 2d 30 31 38 38 38 38 38 36 2c 37 2c 38 29 2c 28 39 2c 31 30 | 8<8882001-01-01888886,7,8),(9,10 |
152140 | 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 | ,11,12)).INSERT.INTO.t1(a,b,c,d) |
152160 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a cf 43 54 0a 81 37 92 24 04 00 82 73 | .SELECT.*.FROM.data..CT..7.$...s |
152180 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t1(a,b,c,d,PRIMARY. |
1521a0 | 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 | KEY(b,d));.WITH.data(a,b,c,d).AS |
1521c0 | 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 38 38 38 38 38 38 38 38 38 38 38 | .(VALUES(1,2,3,4),(5,88888888888 |
1521e0 | 38 38 38 38 38 38 38 38 38 38 38 38 2e 38 38 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 | 888888888888.886,7,8),(9,10,11,1 |
152200 | 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 | 2)).INSERT.INTO.t1(a,b,c,d).SELE |
152220 | 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a cf 43 54 0a 81 4b 92 23 04 00 83 1b 43 52 45 41 54 | CT.*.FROM.data..CT..K.#....CREAT |
152240 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | E.TABLE.t1(a,b,c,d,PRIMARY.KEY(b |
152260 | 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c | ,d));.WITH.data(a,b,c,d).AS.(VAL |
152280 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c | UES(1,2,3,4),(5,6,7,8),(9,10,11, |
1522a0 | 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 57 49 54 | 12)).INSERT.INTO.t1(a,b,c,d).WIT |
1522c0 | 48 20 61 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 53 45 4c 45 43 54 20 2a 20 | H.a(x).AS.(values(1))..SELECT.*. |
1522e0 | 46 52 4f 4d 20 61 2c 62 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 | FROM.a,ba.ON.CONFLICT(b,d).UPDAT |
152300 | 45 0a 81 43 92 22 04 00 83 0b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c | E..C."....CREATE.TABLE.t1(a,b,c, |
152320 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 | d,PRIMARY.KEY(b,d));.WITH.data(a |
152340 | 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | ,b,c,d).AS.(VALUES(1,2,3,4),(5,6 |
152360 | 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,7,8),(9,10,11,12)).INSERT.INTO. |
152380 | 74 31 28 61 2c 62 2c 63 2c 64 29 20 57 49 54 48 20 44 41 54 41 42 41 53 45 63 28 78 29 20 41 53 | t1(a,b,c,d).WITH.DATABASEc(x).AS |
1523a0 | 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 | .(values(1))..SELECT.*.FROM.data |
1523c0 | 2c 44 41 54 45 4f 4e 20 0a 81 31 92 21 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ,DATEON...1.!...gCREATE.TABLE.t1 |
1523e0 | 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 | (a,b,c,d,PRIMARY.KEY(b,d));.WITH |
152400 | 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c | .data(a,b,c,d).AS.(VALUES(1,2,3, |
152420 | 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 | 4),(5,6,7,8),(9,10,11,12)).INSER |
152440 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | T.INTO.t1(a,b,c,d).SELECT.*.FROM |
152460 | 28 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 0a 81 31 | (data.ON.CONFLICT(b,d).UPDATE..1 |
152480 | 92 20 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 | .....gCREATE.TABLE.t1(a,b,c,d,PR |
1524a0 | 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 | IMARY.KEY(b,d));.WITH.data(a,b,c |
1524c0 | 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,d).AS.(VALUES(1,2,3,4),(5,6,7,8 |
1524e0 | 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ),(9,10,11,12)).INSERT.INTO.t1(a |
152500 | 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 28 20 28 31 29 0a 4f 4e 20 43 4f | ,b,c,d).SELECT.*.FROM(.(1).ON.CO |
152520 | 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 0a 81 36 92 1f 04 00 82 71 43 52 45 41 54 | NFLICT(b,d).UPDATE..6.....qCREAT |
152540 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | E.TABLE.t1(a,b,c,d,PRIMARY.KEY(b |
152560 | 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c | ,d));.WITH.data(a,b,c,d).AS.(VAL |
152580 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c | UES(1,2,3,4),(5,6,7,8),(9,10,11, |
1525a0 | 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c | 12)).INSERT.INTO.t1(a,b,c,d).SEL |
1525c0 | 45 43 54 20 2a 20 46 52 4f 4d 20 6f 6d 28 29 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 | ECT.*.FROM.om()a.ON.CONFLICT(b,d |
1525e0 | 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 35 92 1e 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c | ).UPDATE.SET..5.....oCREATE.TABL |
152600 | 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a | E.t1(a,b,c,d,PRIMARY.KEY(b,d));. |
152620 | 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | WITH.data(a,b,c,d).AS.(VALUES(1, |
152640 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 | 2,3,4),(5,6,7,8),(9,10,11,12)).I |
152660 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 | NSERT.INTO.t1(a,b,c,d).SELECT.*. |
152680 | 46 52 4f 4d 20 64 61 74 66 8a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 | FROM.datf.ON.CONFLICT(b,d).UPDAT |
1526a0 | 45 20 53 45 54 0a 81 21 92 1d 04 00 82 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c | E.SET..!.....GCREATE.TABLE.t1(a, |
1526c0 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 | b,c,d,PRIMARY.KEY(b,d));.WITH.da |
1526e0 | 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c | ta(a,b,c,d).AS.(VALUES(1,2,3,4), |
152700 | 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 | (5,6,7,8),(9,10,11,12)).INSERT.I |
152720 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 | NTO.t1(a,b,c,d).SELECT.*.FROM.da |
152740 | 74 61 2c 44 41 54 45 4f 4e 20 0a 81 2d 92 1c 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ta,DATEON...-....._CREATE.TABLE. |
152760 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 | t1(a,b,c,d,PRIMARY.KEY(b,d));.WI |
152780 | 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c | TH.data(a,b,c,d).AS.(VALUES(1,2, |
1527a0 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 | 3,4),(5,6,7,8),(9,10,11,12)).INS |
1527c0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 | ERT.INTO.t1(a,b,c,d).SELECT.*.FR |
1527e0 | 4f 4d 20 64 61 74 61 20 4f 52 44 45 52 20 42 59 2e 31 29 43 4f 4e 46 4c 49 43 54 0a 81 2d 92 1b | OM.data.ORDER.BY.1)CONFLICT..-.. |
152800 | 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ..._CREATE.TABLE.t1(a,b,c,d,PRIM |
152820 | 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 | ARY.KEY(b,d));.WITH.data(a,b,c,d |
152840 | 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ).AS.(VALUES(1,2,3,4),(5,6,7,8), |
152860 | 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | (9,10,11,12)).INSERT.INTO.t1(a,b |
152880 | 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 20 4f 52 44 45 52 20 42 | ,c,d).SELECT.*.FROM.data.ORDER.B |
1528a0 | 59 28 31 29 43 4f 4e 46 4c 49 43 54 0a 81 2d 92 1a 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c | Y(1)CONFLICT..-....._CREATE.TABL |
1528c0 | 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a | E.t1(a,b,c,d,PRIMARY.KEY(b,d));. |
1528e0 | 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c | WITH.data(a,b,c,d).AS.(VALUES(1, |
152900 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 | 2,3,4),(5,6,7,8),(9,10,11,12)).I |
152920 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 | NSERT.INTO.t1(a,b,c,d).SELECT.*. |
152940 | 46 52 4f 4d 20 64 61 74 61 20 4f 52 44 45 52 20 42 59 20 69 6e 73 74 72 28 31 2c 31 29 0a 81 29 | FROM.data.ORDER.BY.instr(1,1)..) |
152960 | 92 19 04 00 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 | .....WCREATE.TABLE.t1(a,b,c,d,PR |
152980 | 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 | IMARY.KEY(b,d));.WITH.data(a,b,c |
1529a0 | 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,d).AS.(VALUES(1,2,3,4),(5,6,7,8 |
1529c0 | 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ),(9,10,11,12)).INSERT.INTO.t1(a |
1529e0 | 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 20 28 31 29 43 4f | ,b,c,d).SELECT.*.FROM.data.(1)CO |
152a00 | 4e 46 4c 49 43 54 29 20 55 50 0a 81 31 92 18 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 | NFLICT).UP..1.....gCREATE.TABLE. |
152a20 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 | t1(a,b,c,d,PRIMARY.KEY(b,d));.WI |
152a40 | 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c | TH.data(a,b,c,d).AS.(VALUES(1,2, |
152a60 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 | 3,4),(5,6,7,8),(9,10,11,12)).INS |
152a80 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 | ERT.INTO.t1(a,b,c,d).SELECT.*.FR |
152aa0 | 4f 4d 20 64 20 28 31 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 0a | OM.d.(1)ON.CONFLICT(b,d).UPDATE. |
152ac0 | 81 31 92 17 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c | .1.....gCREATE.TABLE.t1(a,b,c,d, |
152ae0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 | PRIMARY.KEY(b,d));.WITH.data(a,b |
152b00 | 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | ,c,d).AS.(VALUES(1,2,3,4),(5,6,7 |
152b20 | 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,8),(9,10,11,12)).INSERT.INTO.t1 |
152b40 | 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 20 28 31 29 4f 4e 20 | (a,b,c,d).SELECT.*.FROM.d.(1)ON. |
152b60 | 43 4f 4e 46 4c 49 43 54 28 62 2c 64 28 a0 55 50 44 41 54 45 0a 81 31 92 16 04 00 82 67 43 52 45 | CONFLICT(b,d(.UPDATE..1.....gCRE |
152b80 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t1(a,b,c,d,PRIMARY.KEY |
152ba0 | 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 | (b,d));.WITH.data(a,b,c,d).AS.(V |
152bc0 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 | ALUES(1,2,3,4),(5,6,7,8),(9,10,1 |
152be0 | 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 | 1,12)).INSERT.INTO.t1(a,b,c,d).S |
152c00 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 20 28 31 29 4f 2c 20 43 4f 4e 46 4c 49 43 54 28 62 2c | ELECT.*.FROM.d.(1)O,.CONFLICT(b, |
152c20 | 64 29 20 55 50 44 41 54 45 0a 81 38 92 15 04 00 82 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | d).UPDATE..8.....uCREATE.TABLE.t |
152c40 | 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 | 1(a,b,c,d,PRIMARY.KEY(b,d));.WIT |
152c60 | 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 | H.data(a,b,c,d).AS.(VALUES(1,2,3 |
152c80 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 | ,4),(5,6,7,8),(9,10,11,12)).INSE |
152ca0 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | RT.INTO.t1(a,b,c,d).SELECT.*.FRO |
152cc0 | 4d 20 61 2c 62 61 0a 4f 4e 20 4c 49 43 2c 28 62 2c 64 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 55 | M.a,ba.ON.LIC,(b,d)ON.CONFLICT.U |
152ce0 | 50 44 41 54 45 0a 81 21 92 14 04 00 82 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c | PDATE..!.....GCREATE.TABLE.t1(a, |
152d00 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 | b,c,d,PRIMARY.KEY(b,d));.WITH.da |
152d20 | 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c | ta(a,b,c,d).AS.(VALUES(1,2,3,4), |
152d40 | 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 | (5,6,7,8),(9,10,11,12)).INSERT.I |
152d60 | 4e 54 4f 20 74 31 28 61 2c 45 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 28 62 | NTO.t1(a,E,c,d).SELECT.*.FROM.(b |
152d80 | 2c 64 29 20 55 50 44 41 54 45 0a 81 25 92 13 04 00 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ,d).UPDATE..%.....OCREATE.TABLE. |
152da0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 | t1(a,b,c,d,PRIMARY.KEY(b,d));.WI |
152dc0 | 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c | TH.data(a,b,c,d).AS.(VALUES(1,2, |
152de0 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 | 3,4),(5,6,7,8),(9,10,11,12)).INS |
152e00 | 45 52 54 20 49 4e 54 4f 20 74 31 28 20 61 2c 62 61 2c 62 2c 63 2c 64 61 2c 62 2c 63 2c 64 29 20 | ERT.INTO.t1(.a,ba,b,c,da,b,c,d). |
152e20 | 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 3b 0a 57 49 0a 81 29 92 12 04 00 82 57 43 52 45 41 | SELECT.*.FROM.d;.WI..).....WCREA |
152e40 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t1(a,b,c,d,PRIMARY.KEY( |
152e60 | 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 | b,d));.WITH.data(a,b,c,d).AS.(VA |
152e80 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 | LUES(1,2,3,4),(5,6,7,8),(9,10,11 |
152ea0 | 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 20 20 61 2c 62 61 2c 62 61 2c 62 | ,12)).INSERT.INTO.t1(..a,ba,ba,b |
152ec0 | 2c 63 2c 64 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 3b 0a 57 49 | ,c,da,b,c,d).SELECT.*.FROM.d;.WI |
152ee0 | 0a 81 2d 92 11 04 00 82 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 | ..-....._CREATE.TABLE.t1(a,b,c,d |
152f00 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c | ,PRIMARY.KEY(b,d));.WITH.data(a, |
152f20 | 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | b,c,d).AS.(VALUES(1,2,3,4),(5,6, |
152f40 | 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 7,8),(9,10,11,12)).INSERT.INTO.t |
152f60 | 31 28 20 20 20 61 2c 62 61 2c 62 61 2c 62 61 2c 62 2c 63 2c 64 61 2c 62 2c 63 2c 64 29 20 53 45 | 1(...a,ba,ba,ba,b,c,da,b,c,d).SE |
152f80 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 3b 0a 57 49 0a 81 49 92 10 04 00 83 17 43 52 45 41 54 45 | LECT.*.FROM.d;.WI..I......CREATE |
152fa0 | 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c | .TABLE.t1(a,b,c,d,PRIMARY.KEY(b, |
152fc0 | 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 | d));.WITH.data(a,b,c,d).AS.(VALU |
152fe0 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 | ES(1,2,3,4),(5,6,7,(VALUES(1,2,3 |
153000 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 | ,4),(5,6,7,8),(9,8),(9,10,11,12) |
153020 | 29 0a 49 4e 53 45 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 | ).INSE(a,b,c,d).SELECT.*.FROM.da |
153040 | 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 | ta.ON.CONFLICT(b,d).UPDATE.SET.. |
153060 | 25 92 0f 04 00 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 | %.....OCREATE.TABLE.t1(a,b,c,d,P |
153080 | 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c | RIMARY.KEY(b,d));.WITH.data(a,b, |
1530a0 | 63 2c 64 29 20 41 53 20 28 53 45 4c 45 43 54 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | c,d).AS.(SELECT(1,2,3,4),(5,6,7, |
1530c0 | 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | 8),(9,10,11,12)).INSERT.INTO.t1( |
1530e0 | 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a cf 4e 20 43 | a,b,c,d).SELECT.*.FROM.data..N.C |
153100 | 4f 4e 46 4c 49 43 54 0a 81 4d 92 0e 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ONFLICT..M......CREATE.TABLE.t1( |
153120 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 | a,b,c,d,PRIMARY.KEY(b,d));.WITH. |
153140 | 64 61 74 61 28 61 2c 62 2c 63 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | data(a,b,c,b,c,d).SELECT.*.FROM. |
153160 | 64 61 74 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | datd).AS.(VALUES(1,2,3,4),(5,6,7 |
153180 | 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 1a 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | ,8),(9,10,11,12.).INSERT.INTO.t1 |
1531a0 | 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 | (a,b,c,d).SELECT.*.FROM.data.ON. |
1531c0 | 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 09 92 0d 04 00 82 | CONFLICT(b,d).UPDATE.SET........ |
1531e0 | 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | .CREATE.TABLE.t1(a,b,c,d,PRIMARY |
153200 | 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 62 2c 61 2c 62 2c 63 2c | .KEY(b,d));.WITH.data(a,b,a,b,c, |
153220 | 64 2c 50 52 49 28 31 2c 32 2c 33 2c 34 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 02 | d,PRI(1,2,3,4(a,b,c,d).SELECT.*. |
153240 | 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 | FROM.data.ON.CONFLICT(b,d).UPDAT |
153260 | 45 20 53 45 54 0a 81 09 92 0c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c | E.SET.........CREATE.TABLE.t1(a, |
153280 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 | b,c,d,PRIMARY.KEY(b,d));.WITH.da |
1532a0 | 74 61 28 61 2c 62 2c 61 2c 62 2c 63 2c 64 2c 43 55 52 52 45 4e 54 5f 44 41 54 45 61 2c 62 2c 63 | ta(a,b,a,b,c,d,CURRENT_DATEa,b,c |
1532c0 | 2c 64 29 20 53 45 4c 45 43 54 20 2a 02 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 | ,d).SELECT.*.FROM.data.ON.CONFLI |
1532e0 | 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 4b 92 0b 04 00 83 1b 43 52 45 41 54 | CT(b,d).UPDATE.SET..K......CREAT |
153300 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | E.TABLE.t1(a,b,c,d,PRIMARY.KEY(b |
153320 | 2c 64 29 29 3b 0a 57 49 54 48 20 20 60 61 60 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c | ,d));.WITH..`a`(a,b,c,d).AS.(VAL |
153340 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c | UES(1,2,3,4),(5,6,7,8),(9,10,11, |
153360 | 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 57 49 54 | 12)).INSERT.INTO.t1(a,b,c,d).WIT |
153380 | 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 53 45 4c 45 43 54 20 2a 20 | H.c(x).AS.(values(1))..SELECT.*. |
1533a0 | 46 52 4f 4d 20 61 2c 62 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 | FROM.a,ba.ON.CONFLICT(b,d).UPDAT |
1533c0 | 45 0a 81 24 92 0a 04 00 82 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c | E..$.....MCREATE.TABLE.t1(a,b,c, |
1533e0 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 43 4f 4c | d,PRIMARY.KEY(b,LUES(1,2,3,4)COL |
153400 | 4c 41 54 45 20 6e 6f 63 61 73 65 2c 40 35 2c 36 2c 37 2c 45 53 28 31 2c 32 2c 33 2c 34 29 43 4f | LATE.nocase,@5,6,7,ES(1,2,3,4)CO |
153420 | 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 40 35 2c 36 2c 38 29 2c 28 39 52 54 28 61 28 56 41 2c 62 | LLATE.nocase,@5,6,8),(9RT(a(VA,b |
153440 | 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 43 4f 4e 46 4c 49 43 54 28 62 2c | ,c,d).SELECT.*.FROM.dCONFLICT(b, |
153460 | 64 29 20 55 50 44 41 54 45 20 81 0c 92 09 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | d).UPDATE.........CREATE.TABLE.t |
153480 | 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 4c 55 45 53 28 31 2c 32 | 1(a,b,c,d,PRIMARY.KEY(b,LUES(1,2 |
1534a0 | 2c 33 2c 34 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 40 35 2c 36 2c 37 2c 38 29 2c 28 39 | ,3,4)COLLATE.nocase,@5,6,7,8),(9 |
1534c0 | 52 54 28 61 28 56 41 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 | RT(a(VA,b,c,d).SELECT.*.FROM.dat |
1534e0 | 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 81 0a 92 08 04 00 | a.ON.CONFLICT(b,d).UPDATE....... |
153500 | 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | ..CREATE.TABLE.t1(a,b,c,d,PRIMAR |
153520 | 59 20 4b 45 59 28 62 2c 4c 41 2c 62 2c 63 2c 55 45 53 28 31 2c 32 2c 33 2c 34 29 43 4f 4c 4c 41 | Y.KEY(b,LA,b,c,UES(1,2,3,4)COLLA |
153540 | 54 45 20 6e 6f 62 61 73 65 2c 40 35 2c 36 2c 37 2c 38 29 2c 28 39 52 54 28 61 64 29 20 53 45 4c | TE.nobase,@5,6,7,8),(9RT(ad).SEL |
153560 | 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 4f 4f 4e 46 4c 49 43 54 28 62 2c 64 29 | ECT.*.FROM.data.ON.OONFLICT(b,d) |
153580 | 20 55 50 44 41 54 45 20 81 0a 92 07 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | .UPDATE.........CREATE.TABLE.t1( |
1535a0 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 40 55 45 53 28 31 2c 32 2c 33 | a,b,c,d,PRIMARY.KEY(b,@UES(1,2,3 |
1535c0 | 2c 34 29 2c 40 35 28 36 2c 37 2c 38 29 24 43 4f 4e 53 54 52 41 49 4e 54 74 31 28 61 28 56 41 2c | ,4),@5(6,7,8)$CONSTRAINTt1(a(VA, |
1535e0 | 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e | b,c,d).SELECT.*.FROM.data.ON.CON |
153600 | 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0a 92 06 04 00 82 19 43 52 | FLICT(b,d).UPDATE.SET.........CR |
153620 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t1(a,b,c,d,PRIMARY.KE |
153640 | 59 28 62 2c 40 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 40 35 28 36 2c 37 2c 38 29 24 28 39 52 54 | Y(b,@UES(1,2,3,4),@5(6,7,8)$(9RT |
153660 | 20 49 4e 54 4f 20 74 31 28 61 28 56 41 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 | .INTO.t1(a(VA,b,c,d).SELECT.*.FR |
153680 | 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 | OM.data.ON.CONFLICT(b,d).UPDATE. |
1536a0 | 53 45 54 0a 81 0b 92 05 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c | SET.........CREATE.TABLE.t1(a,b, |
1536c0 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c | c,d,PRIMARY.KEY(b,.datetime(1,1, |
1536e0 | 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 ac 62 2c 63 2c 64 29 20 41 53 28 39 2c 62 2c 63 | 1)COLLATE.nocase.b,c,d).AS(9,b,c |
153700 | 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 | ,d).SELECT.*.FROM.data.ON.CONFLI |
153720 | 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0b 92 04 04 00 82 1b 43 52 45 41 54 | CT(b,d).UPDATE.SET.........CREAT |
153740 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 | E.TABLE.t1(a,b,c,d,PRIMARY.KEY(b |
153760 | 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c | ,.datetime(1,1,1)COLLATE.nocase, |
153780 | 62 2c 63 2c 64 29 20 41 53 28 39 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | b,c,d).AS(9,b,c,d).SELECT.*.FROM |
1537a0 | 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 | .data.ON.CONFLICT(b,d).UPDATE.SE |
1537c0 | 54 0a 81 0b 92 03 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c | T.........CREATE.TABLE.t1(a,b,c, |
1537e0 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 | d,PRIMARY.KEY(b,.datetime(1,1,1) |
153800 | 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 62 2c 63 2c 20 73 71 69 64 28 29 2c 62 2c 63 2c 64 | COLLATE.nocase,b,c,.sqid(),b,c,d |
153820 | 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ).SELECT.*.FROM.data.ON.CONFLICT |
153840 | 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0b 92 02 04 00 82 1b 43 52 45 41 54 45 20 | (b,d).UPDATE.SET.........CREATE. |
153860 | 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 | TABLE.t1(a,b,c,d,PRIMARY.KEY(b,. |
153880 | 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 62 2c | datetime(1,1,1)COLLATE.nocase,b, |
1538a0 | 43 4f 4e 46 4c 49 43 54 39 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 | CONFLICT9,b,c,d).SELECT.*.FROM.d |
1538c0 | 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a | ata.ON.CONFLICT(b,d).UPDATE.SET. |
1538e0 | 81 09 92 01 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c | ........CREATE.TABLE.t1(a,b,c,d, |
153900 | 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 09 2c 62 | PRIMARY.KEY(b,.datetime(1,1,1.,b |
153920 | 2c 63 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 2c 62 2c 63 2c 64 29 29 53 45 | ,c,.sqlite_source_id(),b,c,d))SE |
153940 | 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 | LECT.*.FROM.data.ON.CONFLICT(b,d |
153960 | 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0b 92 00 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c | ).UPDATE.SET.........CREATE.TABL |
153980 | 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 61 2c 62 65 | E.t1(a,b,c,d,PRIMARY.KEY(b,.a,be |
1539a0 | 74 69 6d 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 62 2c 63 2c 20 73 | time(1,1,1)COLLATE.nocase,b,c,.s |
1539c0 | 71 69 64 28 29 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a | qid(),b,c,d).SELECT.*.FROM.data. |
1539e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0b 91 7f | ON.CONFLICT(b,d).UPDATE.SET..... |
153a00 | 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ....CREATE.TABLE.t1(a,b,c,d,PRIM |
153a20 | 41 52 59 20 4b 45 59 28 62 2c 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 55 4e 49 4f 4e | ARY.KEY(b,.(VALUES(1,2,3,4)UNION |
153a40 | 20 41 4c 4c 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | .ALL),(9,10,11,12)).INSERT.INTO. |
153a60 | 74 31 28 61 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 | t1(a.FROM.data.ON.CONFLICT(b,d). |
153a80 | 55 50 44 60 54 45 20 53 45 54 0a 81 0b 91 7e 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | UPD`TE.SET....~....CREATE.TABLE. |
153aa0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 28 56 41 4c 55 45 | t1(a,b,c,d,PRIMARY.KEY(b,.(VALUE |
153ac0 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 | S(1,2,3,4),(5,6,7,8),(9,10,11,12 |
153ae0 | 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e | )).INSERT.INTO.t1(a.FROM.data.ON |
153b00 | 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 60 54 45 20 53 45 54 0a 82 00 91 7d 04 00 | .CONFLICT(b,d).UPD`TE.SET....}.. |
153b20 | 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | ..CREATE.TABLE.t1(a,b,c,d,PRIMAR |
153b40 | 59 20 4b 45 59 28 61 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | Y.KEY(a,c))WITHOUT.ROWID;.CREATE |
153b60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t1bc.ON.t1(b,c);.I |
153b80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t1(a,b,c,d).VALUES(1, |
153ba0 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
153bc0 | 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | 12,13,14).ON.CONFLICT(c,b).DO.UP |
153be0 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e | DATE.SET.a=a+1000;.SELECT.DISTIN |
153c00 | 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 09 | CT*,.'x'.FROM.t1.ORDER.BY.+a;... |
153c20 | 91 7c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 | .|....CREATE.TABLE.t1(a,b,c,d,PR |
153c40 | 49 4d 41 52 59 20 4b 45 59 28 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 20 61 76 67 28 31 29 29 | IMARY.KEY(.group_concat(.avg(1)) |
153c60 | 2c 62 2c 63 2c 64 29 20 41 53 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 | ,b,c,d).AS.INTO.t1(a,b,c,d).SELE |
153c80 | 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 | CT.*.FROM.data.ON.CONFLICT(b,d). |
153ca0 | 55 50 44 41 54 45 20 53 45 54 0a 81 0c 91 7b 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | UPDATE.SET....{....CREATE.TABLE. |
153cc0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 20 40 31 62 2c 40 55 45 53 | t1(a,b,c,d,PRIMARY.KEY(.@1b,@UES |
153ce0 | 28 31 2c 32 2c 33 2c 34 29 2c 40 35 2c 20 40 31 2c 20 40 31 38 29 2c 28 39 52 54 4f 20 74 31 28 | (1,2,3,4),@5,.@1,.@18),(9RTO.t1( |
153d00 | 61 28 56 41 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f | a(VA,b,c,d).SELECT.*.FROM.data.O |
153d20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 09 91 7a 04 | N.CONFLICT(b,d).UPDATE.SET....z. |
153d40 | 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t1(a,b,c,d,PRIMA |
153d60 | 52 59 20 4b 45 59 28 20 27 61 27 49 53 0a 4e 55 4c 4c 2c 28 20 57 49 54 48 20 63 28 78 29 20 41 | RY.KEY(.'a'IS.NULL,(.WITH.c(x).A |
153d80 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 | S.(values(1)).1(a,b,c,d).SELECT. |
153da0 | 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 | *.FROM.data.ON.CONFLICT(b,d).UPD |
153dc0 | 41 54 45 20 53 45 54 0a 81 09 91 79 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ATE.SET....y....CREATE.TABLE.t1( |
153de0 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 20 27 61 27 49 53 0a 32 30 30 31 2d | a,b,c,d,PRIMARY.KEY(.'a'IS.2001- |
153e00 | 30 31 2d 30 31 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 | 01-01,11,12)).INSERT.INTO.t1(a,b |
153e20 | 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 | ,c,d).SELECT.*.FROM.data.ON.CONF |
153e40 | 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 09 91 78 04 00 82 17 43 52 45 | LICT(b,d).UPDATE.SET....x....CRE |
153e60 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t1(a,b,c,d,PRIMARY.KEY |
153e80 | 28 20 27 61 27 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 | (.'a'COLLATE.nocase11,12)).INSER |
153ea0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d | T.INTO.t1(a,b,c,d).SELECT.*.FROM |
153ec0 | 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 | .data.ON.CONFLICT(b,d).UPDATE.SE |
153ee0 | 54 0a 81 0b 91 77 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c | T....w....CREATE.TABLE.t1(a,b,c, |
153f00 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 20 27 61 27 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 | d,PRIMARY.KEY(.'a'COLLATE.nocase |
153f20 | 29 3b 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | );11,12)).INSERT.INTO.t1(a,b,c,d |
153f40 | 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ).SELECT.*.FROM.data.ON.CONFLICT |
153f60 | 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0b 91 76 04 00 82 1b 43 52 45 41 54 45 20 | (b,d).UPDATE.SET....v....CREATE. |
153f80 | 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 46 4f 52 45 49 47 4e 20 4b 45 59 28 20 27 61 | TABLE.t1(a,b,c,d,FOREIGN.KEY(.'a |
153fa0 | 27 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 | 'COLLATE.nocase);11,12)).INSERT. |
153fc0 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 | INTO.t1(a,b,c,d).SELECT.*.FROM.d |
153fe0 | 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a | ata.ON.CONFLICT(b,d).UPDATE.SET. |
154000 | 0d 00 00 00 27 00 99 00 1f 47 1e 9e 1d f5 1d 4c 1c a3 1b fa 1b 3b 1a ab 1a 1b 19 8b 19 3f 18 b0 | ....'....G.....L.....;.......?.. |
154020 | 18 21 17 68 16 c3 16 1b 15 8b 14 87 13 83 12 7b 11 7c 10 80 0f f0 0e f4 0d f5 0c f9 0b fd 0a f7 | .!.h...........{.|.............. |
154040 | 09 f1 08 ef 08 0d 07 0e 06 2f 05 2d 04 2e 03 32 02 36 01 a6 00 99 00 00 00 00 00 00 00 00 00 00 | ........./.-...2.6.............. |
154060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
154080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 09 92 4c 04 00 84 | ............................L... |
1540a0 | 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | .CREATE.TABLE.t1(a,b,c,d,PRIMARY |
1540c0 | 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | .KEY(d,c))WITHOUT.ROWID;.CREATE. |
1540e0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t1bc.ON.t1(b,c);.IN |
154100 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t1(a,b,c,d).VALUES(1,2 |
154120 | 2c 33 2c 32 30 30 31 2d 30 31 2d 30 31 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,2001-01-018),(9,2,3,10),(11,1 |
154140 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
154160 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
154180 | 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f | FROM.t1.ORDER.BY..sqlite_source_ |
1541a0 | 69 64 28 29 3b 0a 81 0c 92 4b 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c | id();....K....CREATE.TABLE.t1(a, |
1541c0 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 | b,c,d,PRIMARY.KEY(d,c))WITHOUT.R |
1541e0 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t1bc.O |
154200 | 4e 20 74 31 28 62 2c 62 29 3b 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 0a 53 45 4c 45 43 54 20 2a 2c | N.t1(b,b);ANALYZE.INTO.SELECT.*, |
154220 | 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 81 78 92 4a 04 00 83 75 43 52 | .'x'.FROM.t1.ORDER.BY..x.J...uCR |
154240 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t1(a,b,c,d,PRIMARY.KE |
154260 | 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 | Y(d,c))WITHOUT.ROWID;.CREATE.UNI |
154280 | 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 | QUE.INDEX.t1bc.ON.t1(b,b);.INSER |
1542a0 | 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 | T.INTO.t1(a,b,c,d).VALUES(2001-0 |
1542c0 | 31 2d 30 31 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 | 1-015,6,7,8),(9,2,3,10),(11,12,1 |
1542e0 | 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | 3,14).ON.CONFLICT(c,b).DO.UPDATE |
154300 | 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f | .SET.a=a+1000;.SELECT.*,.'x'.FRO |
154320 | 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 78 92 49 04 00 83 75 43 52 45 41 54 45 | M.t1.ORDER.BY.+a;..x.I...uCREATE |
154340 | 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c | .TABLE.t1(a,b,c,d,PRIMARY.KEY(d, |
154360 | 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | c))WITHOUT.ROWID;.CREATE.UNIQUE. |
154380 | 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t1bc.ON.t1(b,b);.INSERT.IN |
1543a0 | 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 | TO.t1(a,b,c,d).VALUES(2001-01-01 |
1543c0 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 2c 31 33 2c 31 34 | 5,6,7,8),(9,.randomblob(1),13,14 |
1543e0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
154400 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | .a=a+1000;.SELECT.*,.'x'.FROM.t1 |
154420 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7b 92 48 04 00 83 7b 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;..{.H...{CREATE.TAB |
154440 | 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 | LE.t1(a,b,c,d,PRIMARY.KEY(d,c))W |
154460 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
154480 | 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t1bc.ON.t1(b,b);.INSERT.INTO.t |
1544a0 | 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 1(a,b,c,d).VALUES(1,2,3,4),(5,6, |
1544c0 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
1544e0 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
154500 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | +1000;.SELECT.*,.'x'.FROM.t1.ORD |
154520 | 45 52 20 42 59 2b 32 20 64 61 61 3b 0a 81 7e 92 47 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c | ER.BY+2.daa;..~.G....CREATE.TABL |
154540 | 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 | E.t1(a,b,c,d,PRIMARY.KEY(d,c))WI |
154560 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
154580 | 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .t1bc.ON.t1(b,b);.INSERT.INTO.t1 |
1545a0 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
1545c0 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 | ,8),(9,2,3,10),(11,12,13,14).ON. |
1545e0 | 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b | CONFLICT(c,b).DO.UPDATE.SET.a=a+ |
154600 | 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 | 1000;.SELECT.*,.'x'.FROM.t1.ORDE |
154620 | 52 20 42 59 20 2b 61 3b 56 41 43 55 55 4d 0a 81 5b 92 46 04 00 83 3b 43 52 45 41 54 45 20 54 41 | R.BY.+a;VACUUM..[.F...;CREATE.TA |
154640 | 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 | BLE.t1(a,b,c,d,PRIMARY.KEY(d,c)) |
154660 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
154680 | 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t1bc.ON.t1(b,b);.INSERT.INTO. |
1546a0 | 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t1(a,b,c,d).VALUES(1,2,3,4),(5,6 |
1546c0 | 20 2d 31 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | .-1,7,8),(9,2,3,10),(11,12,13,14 |
1546e0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
154700 | 20 61 3d 61 3b 31 30 30 30 3b 0a 61 3b 0a 81 7b 92 45 04 00 83 7b 43 52 45 41 54 45 20 54 41 42 | .a=a;1000;.a;..{.E...{CREATE.TAB |
154720 | 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 | LE.t1(a,b,c,d,PRIMARY.KEY(d,c))W |
154740 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
154760 | 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t1bc.ON.t1(b,b);.INSERT.INTO.t |
154780 | 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 20 | 1(a,b,c,d).VALUES(1,2,3,4),(5,6. |
1547a0 | 2d 31 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | -1,7,8),(9,2,3,10),(11,12,13,14) |
1547c0 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
1547e0 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | a=a+1000;.SELECT.*,.'x'.FROM.t1. |
154800 | 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 5e 92 44 04 00 83 41 43 52 45 41 54 45 20 54 41 42 4c | ORDER.BY.+a;..^.D...ACREATE.TABL |
154820 | 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 | E.t1(a,b,c,d,PRIMARY.KEY(d,c))WI |
154840 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
154860 | 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .t1bc.ON.t1(b,b);.INSERT.INTO.t1 |
154880 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 20 2d | (a,b,c,d).VALUES(1,2,3,4),(5,6.- |
1548a0 | 31 2c 37 2c 38 29 2c 28 39 2c 32 20 2d 31 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | 1,7,8),(9,2.-1,3,10),(11,12,13,1 |
1548c0 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
1548e0 | 54 20 61 3d 61 3b 31 30 30 30 3b 0a 61 3b 0a 81 7e 92 43 04 00 84 01 43 52 45 41 54 45 20 54 41 | T.a=a;1000;.a;..~.C....CREATE.TA |
154900 | 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 | BLE.t1(a,b,c,d,PRIMARY.KEY(d,c)) |
154920 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
154940 | 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t1bc.ON.t1(b,b);.INSERT.INTO. |
154960 | 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t1(a,b,c,d).VALUES(1,2,3,4),(5,6 |
154980 | 20 2d 31 2c 37 2c 38 29 2c 28 39 2c 32 20 2d 31 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 | .-1,7,8),(9,2.-1,3,10),(11,12,13 |
1549a0 | 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,14).ON.CONFLICT(c,b).DO.UPDATE. |
1549c0 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | SET.a=a+1000;.SELECT.*,.'x'.FROM |
1549e0 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 02 92 42 04 00 84 09 43 52 45 41 54 45 20 | .t1.ORDER.BY.+a;....B....CREATE. |
154a00 | 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 | TABLE.t1(a,b,c,d,PRIMARY.KEY(d,c |
154a20 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
154a40 | 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t1bc.ON.t1(b,b);.INSERT.INT |
154a60 | 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t1(a,b,c,d).VALUES(1,2,3,4),(5 |
154a80 | 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 2c 28 31 31 2c 32 30 30 31 2d 30 31 2d 30 | ,2001-01-012,3,10),(11,2001-01-0 |
154aa0 | 31 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 64 29 20 44 4f 20 55 | 112,13,14).ON.CONFLICT(c,d).DO.U |
154ac0 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
154ae0 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 02 92 41 04 00 84 09 43 | '.FROM.t1.ORDER.BY.+a;....A....C |
154b00 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t1(a,b,c,d,PRIMARY.K |
154b20 | 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | EY(d,c))WITHOUT.ROWID;.CREATE.UN |
154b40 | 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t1bc.ON.t1(b,b);.INSE |
154b60 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t1(a,b,c,d).VALUES(1,2,3 |
154b80 | 2c 34 29 2c 28 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 2c 28 31 31 2c 32 30 30 | ,4),(5,2001-01-012,3,10),(11,200 |
154ba0 | 31 2d 30 31 2d 30 31 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | 1-01-0112,13,14).ON.CONFLICT(c,b |
154bc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
154be0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 78 92 | .*,.'x'.FROM.t1.ORDER.BY.+a;..x. |
154c00 | 40 04 00 83 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | @...uCREATE.TABLE.t1(a,b,c,d,PRI |
154c20 | 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | MARY.KEY(d,c))WITHOUT.ROWID;.CRE |
154c40 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 | ATE.UNIQUE.INDEX.t1bc.ON.t1(b,b) |
154c60 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t1(a,b,c,d).VALUES |
154c80 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,2001-01-012,3,10),( |
154ca0 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 64 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,d).DO |
154cc0 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
154ce0 | 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 78 92 3f 04 00 83 | 'x'.FROM.t1.ORDER.BY.+a;..x.?... |
154d00 | 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | uCREATE.TABLE.t1(a,b,c,d,PRIMARY |
154d20 | 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | .KEY(d,c))WITHOUT.ROWID;.CREATE. |
154d40 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 29 3b 0a 49 4e | UNIQUE.INDEX.t1bc.ON.t1(b,b);.IN |
154d60 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t1(a,b,c,d).VALUES(1,2 |
154d80 | 2c 33 2c 34 29 2c 28 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,2001-01-012,3,10),(11,1 |
154da0 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
154dc0 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
154de0 | 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7b 92 3e 04 00 83 7b 43 52 45 | FROM.t1.ORDER.BY.+a;..{.>...{CRE |
154e00 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t1(a,b,c,d,PRIMARY.KEY |
154e20 | 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | (d,c))WITHOUT.ROWID;.CREATE.UNIQ |
154e40 | 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 62 20 2d 31 29 3b 0a 49 4e 53 | UE.INDEX.t1bc.ON.t1(b,b.-1);.INS |
154e60 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t1(a,b,c,d).VALUES(1,2, |
154e80 | 33 2c 34 29 2c 28 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,2001-01-012,3,10),(11,12 |
154ea0 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 64 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,d).DO.UPDA |
154ec0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
154ee0 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 78 92 3d 04 00 83 75 43 52 45 41 | ROM.t1.ORDER.BY.+a;..x.=...uCREA |
154f00 | 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t1(a,b,c,d,PRIMARY.KEY( |
154f20 | 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | d,c))WITHOUT.ROWID;.CREATE.UNIQU |
154f40 | 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 61 29 3b 0a 49 4e 53 45 52 54 20 | E.INDEX.t1bc.ON.t1(b,a);.INSERT. |
154f60 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 | INTO.t1(a,b,c,d).VALUES(1,2,3,4) |
154f80 | 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c | ,(5,6,7,8),(9,2,3,10),(11,12,13, |
154fa0 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
154fc0 | 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | ET.a=a+1000;.SELECT.*,.'x'.FROM. |
154fe0 | 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 0c 92 3c 04 00 82 1d 43 52 45 41 54 45 20 54 | t1.ORDER.BY.+a;....<....CREATE.T |
155000 | 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 | ABLE.t1(a,b,c,d,PRIMARY.KEY(d,c) |
155020 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | )WITHOUT.ROWID;.CREATE.UNIQUE.IN |
155040 | 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 | DEX.t1bc.ON.t1(b,.json_replace(1 |
155060 | 2c 31 2c 31 29 2c 62 29 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 52 44 45 52 20 42 59 20 | ,1,1),b)c,d).VALUES(1,2,RDER.BY. |
155080 | 81 78 92 3b 04 00 83 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c | .x.;...uCREATE.TABLE.t1(a,b,c,d, |
1550a0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | PRIMARY.KEY(d,c))WITHOUT.ROWID;. |
1550c0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 | CREATE.UNIQUE.INDEX.t1bc.ON.t1(b |
1550e0 | 2a 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | *b);.INSERT.INTO.t1(a,b,c,d).VAL |
155100 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 | UES(1,2,3,4),(5,2001-01-012,3,10 |
155120 | 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 64 29 | ),(11,12,13,14).ON.CONFLICT(c,d) |
155140 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
155160 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7b 92 3a | *,.'x'.FROM.t1.ORDER.BY.+a;..{.: |
155180 | 04 00 83 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ...{CREATE.TABLE.t1(a,b,c,d,PRIM |
1551a0 | 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | ARY.KEY(d,c))WITHOUT.ROWID;.CREA |
1551c0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 20 2d 31 2c | TE.UNIQUE.INDEX.t1bc.ON.t1(b.-1, |
1551e0 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | b);.INSERT.INTO.t1(a,b,c,d).VALU |
155200 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 | ES(1,2,3,4),(5,2001-01-012,3,10) |
155220 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 64 29 20 | ,(11,12,13,14).ON.CONFLICT(c,d). |
155240 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
155260 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 04 92 39 04 | ,.'x'.FROM.t1.ORDER.BY.+a;....9. |
155280 | 00 84 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t1(a,b,c,d,PRIMA |
1552a0 | 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | RY.KEY(d,c))WITHOUT.ROWID;.CREAT |
1552c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 73 b1 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.s.bc.ON.t1(b,c);. |
1552e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t1(a,b,c,d).VALUES(1 |
155300 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
155320 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
155340 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
155360 | 27 20 46 52 4f 4d 20 74 31 20 4f 4e 4f 54 20 49 4e 44 45 58 45 44 20 42 59 20 73 71 6c 69 74 2b | '.FROM.t1.ONOT.INDEXED.BY.sqlit+ |
155380 | 61 3b 0a 82 00 92 38 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | a;....8....CREATE.TABLE.t1(a,b,c |
1553a0 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 62 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,d,PRIMARY.KEY(d,b))WITHOUT.ROWI |
1553c0 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t1bc.ON.t |
1553e0 | 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 | 1(b,c);.INSERT.INTO.t1(a,b,c,d). |
155400 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
155420 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 64 | ,10),(11,12,13,14).ON.CONFLICT(d |
155440 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
155460 | 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 | CT.DISTINCT*,.'x'.FROM.t1.ORDER. |
155480 | 42 59 20 2b 61 3b 0a 82 00 92 37 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | BY.+a;....7....CREATE.TABLE.t1(a |
1554a0 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 62 29 29 57 49 54 48 4f 55 54 20 | ,b,c,d,PRIMARY.KEY(d,b))WITHOUT. |
1554c0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 | ROWID;.CREATE.UNIQUE.INDEX.t1bc. |
1554e0 | 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | ON.t1(b,c);.INSERT.INTO.t1(a,b,c |
155500 | 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 | ,d).VALUES(1,2,3,4),(5,6,7,8),(9 |
155520 | 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 | ,2,3,10),(11,12,13,14).ON.CONFLI |
155540 | 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a | CT(c,b).DO.UPDATE.SET.a=a+1000;. |
155560 | 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 | SELECT.DISTINCT*,.'x'.FROM.t1.OR |
155580 | 44 45 52 20 42 59 20 2b 61 3b 0a 81 0c 92 36 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | DER.BY.+a;....6....CREATE.TABLE. |
1555a0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 61 29 29 57 49 54 48 | t1(a,b,c,d,PRIMARY.KEY(d,a))WITH |
1555c0 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
1555e0 | 31 62 63 20 4f 4e 20 74 31 28 62 2c 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 | 1bc.ON.t1(b,.json_replace(1,1,1) |
155600 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 52 44 45 52 20 42 59 20 81 24 92 35 04 | ,b,c,d).VALUES(1,2,RDER.BY..$.5. |
155620 | 00 82 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ..MCREATE.TABLE.t1(a,b,c,d,PRIMA |
155640 | 52 59 20 4b 45 59 28 62 2c 64 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RY.KEY(b,d,c,d).AS.(VALUES(1,2,3 |
155660 | 2c 34 2f 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 | ,4/,(5,6,7,8),(9,10,11,12)).INSE |
155680 | 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | RT.INTO.t1(a,b,c,d).SELECT.*.FRO |
1556a0 | 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 | M.data.ON.CONFLICT(b,d).UPDATE.S |
1556c0 | 45 54 0a 81 21 92 34 04 00 82 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | ET..!.4...GCREATE.TABLE.t1(a,b,c |
1556e0 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 18 | ,d,PRIMARY.KEY(b,d,(9,10,11,12). |
155700 | 0a 40 4e 53 45 52 54 20 49 42 54 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | .@NSERT.IBT.(VALUES(1,2,3,4),(5, |
155720 | 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 60 64 29 20 53 45 4c 45 02 00 20 | 6,7,8),(9,10,11,12)).`d).SELE... |
155740 | 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 | *.FROM.data.ON.CONFLICT(b,d).UPD |
155760 | 41 54 45 20 53 45 54 0a 81 35 92 33 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ATE.SET..5.3...oCREATE.TABLE.t1( |
155780 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 57 49 54 48 4f 55 54 | a,b,c,d,PRIMARY.KEY(b,d))WITHOUT |
1557a0 | 20 52 4f 57 49 44 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .ROWID,b,c,d).AS.(VALUES(1,2,3,4 |
1557c0 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 | ),(5,6,7,8),(9,10,11,12)).INSERT |
1557e0 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | .INTO.t1(a,b,c,d).SELECT.*.FROM. |
155800 | 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 | data.ON.CONFLICT(b,d).UPDATE.SET |
155820 | 0a 81 0b 92 32 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 | ....2....CREATE.TABLE.t1(a,b,c,d |
155840 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 56 41 43 55 55 4d 0a 57 49 54 48 20 64 | ,PRIMARY.KEY(b,d));VACUUM.WITH.d |
155860 | 61 74 61 28 61 2c 62 2c 63 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 | ata(a,b,cINSERT.INTO.t1(a,b,c,d) |
155880 | 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | .SELECT.*.FROM.data.ON.CONFLICT( |
1558a0 | 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0b 92 31 04 00 82 1b 43 52 45 41 54 45 20 54 | b,d).UPDATE.SET....1....CREATE.T |
1558c0 | 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 | ABLE.t1(a,b,c,d,PRIMARY.KEY(b,d) |
1558e0 | 29 3b 56 41 43 55 55 4d 0a 54 45 4d 50 20 64 61 74 61 28 61 2c 62 2c 63 49 4e 53 45 52 54 20 49 | );VACUUM.TEMP.data(a,b,cINSERT.I |
155900 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 | NTO.t1(a,b,c,d).SELECT.*.FROM.da |
155920 | 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 49 | ta.ON.CONFLICT(b,d).UPDATE.SET.I |
155940 | 92 30 04 00 81 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 | .0....CREATE.TABLE.t1(a,b,c,d,PR |
155960 | 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 52 45 49 4e 44 45 58 20 74 31 28 61 2c 62 6f 6e | IMARY.KEY(b,d));REINDEX.t1(a,bon |
155980 | 55 50 44 41 54 45 20 53 45 54 0a 81 0c 92 2f 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | UPDATE.SET..../....CREATE.TABLE. |
1559a0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 52 45 49 | t1(a,b,c,d,PRIMARY.KEY(b,d));REI |
1559c0 | 4e 44 45 58 20 72 74 72 69 6d 28 31 2c 31 29 61 2c 62 2c 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NDEX.rtrim(1,1)a,b,.INSERT.INTO. |
1559e0 | 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f | t1(a,b,c,d).SELECT.*.FROM.data.O |
155a00 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 0c 92 2e 04 | N.CONFLICT(b,d).UPDATE.SET...... |
155a20 | 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t1(a,b,c,d,PRIMA |
155a40 | 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 52 45 49 4e 44 45 58 0a 57 49 54 48 20 64 61 74 61 28 61 | RY.KEY(b,d));REINDEX.WITH.data(a |
155a60 | 2c 62 2c 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 | ,b,.INSERT.INTO.t1(a,b,c,d).SELE |
155a80 | 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 | CT.*.FROM.data.ON.CONFLICT(b,d). |
155aa0 | 55 50 44 41 54 45 20 53 45 54 0a 81 0c 92 2d 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | UPDATE.SET....-....CREATE.TABLE. |
155ac0 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 52 45 49 | t1(a,b,c,d,PRIMARY.KEY(b,d));REI |
155ae0 | 4e 44 45 58 0a 57 2e 54 48 20 64 61 74 61 28 61 2c 62 2c 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | NDEX.W.TH.data(a,b,.INSERT.INTO. |
155b00 | 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f | t1(a,b,c,d).SELECT.*.FROM.data.O |
155b20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 3b 92 2c 04 | N.CONFLICT(b,d).UPDATE.SET..;.,. |
155b40 | 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ..{CREATE.TABLE.t1(a,b,c,d,PRIMA |
155b60 | 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 50 52 41 47 4d 41 0a 57 49 54 48 20 64 61 74 61 28 61 2c | RY.KEY(b,d));PRAGMA.WITH.data(a, |
155b80 | 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | b,c,d).AS.(VALUES(1,2,3,4),(5,6, |
155ba0 | 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 7,8),(9,10,11,12)).INSERT.INTO.t |
155bc0 | 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e | 1(a,b,c,d).SELECT.*.FROM.data.ON |
155be0 | 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a 81 25 92 2b 04 00 | .CONFLICT(b,d).UPDATE.SET..%.+.. |
155c00 | 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .OCREATE.TABLE.t1(a,b,c,d,PRIMAR |
155c20 | 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 63 2c 64 2c 63 2c 64 29 20 | Y.KEY(b,d));.WITH.data(c,d,c,d). |
155c40 | 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 | AS.(VALUES(1,2,3,4),(5,6,7,8),(9 |
155c60 | 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 | ,10,11,12)).INSERT.INTO.t1(a,b,c |
155c80 | 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a cf 4e 20 43 4f 4e 46 4c 49 | ,d).SELECT.*.FROM.data..N.CONFLI |
155ca0 | 43 54 0a 81 25 92 2a 04 00 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | CT..%.*...OCREATE.TABLE.t1(a,b,c |
155cc0 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 | ,d,PRIMARY.KEY(b,d));.WITH.data( |
155ce0 | 63 2c 63 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | c,c,c,d).AS.(VALUES(1,2,3,4),(5, |
155d00 | 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 6,7,8),(9,10,11,12)).INSERT.INTO |
155d20 | 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a | .t1(a,b,c,d).SELECT.*.FROM.data. |
155d40 | cf 4e 20 43 4f 4e 46 4c 49 43 54 0a 81 25 92 29 04 00 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 | .N.CONFLICT..%.)...OCREATE.TABLE |
155d60 | 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 | .t1(a,b,c,d,PRIMARY.KEY(b,d));.W |
155d80 | 49 54 48 20 64 61 74 61 28 63 2c 63 2c 63 2c 63 29 20 41 53 20 28 56 41 4c 55 45 53 28 20 73 6f | ITH.data(c,c,c,c).AS.(VALUES(.so |
155da0 | 75 6e 64 65 78 28 31 29 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e | undex(1),6,7,8),(9,10,11,12)).IN |
155dc0 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 | SERT.INTO.t1(a,b,c,d).SELECT.*.F |
155de0 | 52 4f 4d 20 64 61 74 61 0a cf 4e 20 43 4f 4e 46 4c 49 43 54 0a 81 25 92 28 04 00 82 4f 43 52 45 | ROM.data..N.CONFLICT..%.(...OCRE |
155e00 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t1(a,b,c,d,PRIMARY.KEY |
155e20 | 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 ac 62 2c 63 2c 64 29 20 41 53 20 28 53 | (b,d));.WITH.data(a.b,c,d).AS.(S |
155e40 | 45 4c 45 43 54 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 31 30 2c 31 | ELECT(1,2,3,4),(5,6,7,8),(9,10,1 |
155e60 | 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 53 | 1,12)).INSERT.INTO.t1(a,b,c,d).S |
155e80 | 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a cf 4e 20 43 4f 4e 46 4c 49 43 54 0a 81 25 | ELECT.*.FROM.data..N.CONFLICT..% |
155ea0 | 92 27 04 00 82 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 | .'...OCREATE.TABLE.t1(a,b,c,d,PR |
155ec0 | 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 61 74 61 28 61 2c 63 2c 63 | IMARY.KEY(b,d));.WITH.data(a,c,c |
155ee0 | 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,d).AS.(VALUES(1,2,3,4),(5,6,7,8 |
155f00 | 29 2c 28 39 2c 31 30 2c 31 31 2c 31 32 29 29 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ),(9,10,11,12)).INSERT.INTO.t1(a |
155f20 | 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a cf 4e 20 43 4f | ,b,c,d).SELECT.*.FROM.data..N.CO |
155f40 | 4e 46 4c 49 43 54 0a 81 35 92 26 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 | NFLICT..5.&...oCREATE.TABLE.t1(a |
155f60 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 64 29 29 3b 0a 57 49 54 48 20 64 | ,b,c,d,PRIMARY.KEY(b,d));.WITH.d |
155f80 | 61 74 61 28 61 2c 62 2c 63 2c 64 29 20 41 53 20 28 56 41 4c 55 45 53 28 d9 2c 32 2c 33 2c 34 29 | ata(a,b,c,d).AS.(VALUES(.,2,3,4) |
155fa0 | 2c 28 28 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 32 29 29 0a 49 4e 53 45 52 54 20 | ,((VALUES(1,2,3,4),(52)).INSERT. |
155fc0 | 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 31 31 31 31 31 31 31 31 ff 31 31 31 52 4f 4d 20 64 | INTO.t1(a,b,c,d11111111.111ROM.d |
155fe0 | 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 45 54 0a | ata.ON.CONFLICT(b,d).UPDATE.SET. |
156000 | 0d 00 00 00 1e 00 ce 00 1e f3 1e 0b 1c f8 1b e5 1a ce 19 b1 18 8d 17 7a 16 65 15 4c 14 40 13 38 | .......................z.e.L.@.8 |
156020 | 12 2c 11 30 10 23 0f 08 0e 05 0d 02 0c 06 0b 0a 09 f5 08 da 07 db 06 d8 05 c4 04 c8 03 bb 02 ae | .,.0.#.......................... |
156040 | 01 b2 00 ce 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
156060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
156080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1560a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1560c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 60 92 6a 04 00 83 45 43 52 45 41 54 45 20 54 41 42 | ...............`.j...ECREATE.TAB |
1560e0 | 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 | LE.t1(a,b,c,d,PRIMARY.KEY(d,c))W |
156100 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
156120 | 58 20 74 31 62 63 20 4f 4e 20 74 31 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t1bc.ON.t1(c,c);.INSERT.INTO.t |
156140 | 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 1(a,b,c,d).VALUES(1,2,3,4),(5,6, |
156160 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
156180 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
1561a0 | 2b 31 30 30 30 3b 0a 41 4e 41 4c 59 5a 45 2a 2c 20 27 81 78 92 69 04 00 83 75 43 52 45 41 54 45 | +1000;.ANALYZE*,.'.x.i...uCREATE |
1561c0 | 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c | .TABLE.t1(a,b,c,d,PRIMARY.KEY(d, |
1561e0 | 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | c))WITHOUT.ROWID;.CREATE.UNIQUE. |
156200 | 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 3c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t1bc.ON.t1(b<b);.INSERT.IN |
156220 | 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t1(a,b,c,d).VALUES(1,2,3,4),( |
156240 | 35 2c 32 30 30 31 2d 30 31 2d 30 31 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | 5,2001-01-012,3,10),(11,12,13,14 |
156260 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 64 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,d).DO.UPDATE.SET |
156280 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 | .a=a+1000;.SELECT.*,.'x'.FROM.t1 |
1562a0 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 09 92 68 04 00 84 17 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;....h....CREATE.TAB |
1562c0 | 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 | LE.t1(a,b,c,d,PRIMARY.KEY(d,c))W |
1562e0 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
156300 | 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t1bc.ON.t1(b,c);.INSERT.INTO.t |
156320 | 31 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 1(c,b,c,d).VALUES(1,2,3,4),(5,6, |
156340 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
156360 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
156380 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 | +1000;.SELECT.*,.'x'.FROM.t1.ORD |
1563a0 | 45 52 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 2c 2b 61 3b 0a 82 09 92 67 04 | ER.BY.sqlite_version(),+a;....g. |
1563c0 | 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t1(a,b,c,d,PRIMA |
1563e0 | 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | RY.KEY(d,c))WITHOUT.ROWID;.CREAT |
156400 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t1bc.ON.t1(b,c);. |
156420 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t1(c,b,c,d).VALUES(1 |
156440 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
156460 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
156480 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
1564a0 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 | '.FROM.t1.ORDER.BY..sqlite_sourc |
1564c0 | 65 5f 69 64 28 29 3b 0a 81 78 92 66 04 00 83 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | e_id();..x.f...uCREATE.TABLE.t1( |
1564e0 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 | a,b,c,d,PRIMARY.KEY(d,c))WITHOUT |
156500 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t1bc |
156520 | 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 63 2c | .ON.t1(b,c);.INSERT.INTO.t1(a,c, |
156540 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
156560 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
156580 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
1565a0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 | .SELECT.*,.'x'.FROM.t1.ORDER.BY. |
1565c0 | 2b 61 3b 0a 82 10 92 65 04 00 84 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c | +a;....e...%CREATE.TABLE.t1(a,b, |
1565e0 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | c,d,PRIMARY.KEY(d,c))WITHOUT.ROW |
156600 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t1bc.ON. |
156620 | 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 | t1(b,c);.INSERT.INTO.t1(a,b,c,d) |
156640 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c | .VALUES(1,2,3,4),(5,6,7,8),(9,2, |
156660 | 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 3,10),(11,12,13,14).ON.CONFLICT( |
156680 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c | c,b).DO.UPDATE.SET.a=a+1000;.SEL |
1566a0 | 45 43 54 20 2a 2c 20 27 78 27 4f 52 20 74 72 75 65 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 | ECT.*,.'x'OR.true.FROM.t1.ORDER. |
1566c0 | 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 2c 2b 61 3b 0a 81 7f 92 64 04 00 84 03 | BY.sqlite_version(),+a;....d.... |
1566e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t1(a,b,c,d,PRIMARY. |
156700 | 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | KEY(d,c))WITHOUT.ROWID;.CREATE.U |
156720 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t1bc.ON.t1(b,c);.INS |
156740 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t1(a,b,c,d).VALUES(1,2, |
156760 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
156780 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
1567a0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
1567c0 | 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 2b 33 20 64 61 79 73 20 2b 61 3b 0a 81 7b 92 63 04 | ROM.t1.ORDER.BY+3.days.+a;..{.c. |
1567e0 | 00 83 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ..{CREATE.TABLE.t1(a,b,c,d,PRIMA |
156800 | 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | RY.KEY(d,c))WITHOUT.ROWID;.CREAT |
156820 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t1bc.ON.t1(b,c);. |
156840 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t1(a,b,c,d).VALUES(1 |
156860 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
156880 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
1568a0 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
1568c0 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 2b 32 20 64 61 61 3b 0a 82 17 92 62 04 00 | '.FROM.t1.ORDER.BY+2.daa;....b.. |
1568e0 | 84 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .3CREATE.TABLE.t1(a,b,c,d,PRIMAR |
156900 | 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | Y.KEY(d,c))WITHOUT.ROWID;.CREATE |
156920 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t1bc.ON.t1(b,c);.I |
156940 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t1(a,b,c,d).VALUES(1, |
156960 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
156980 | 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | 12,13,14).ON.CONFLICT(c,b).DO.UP |
1569a0 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | DATE.SET.a=a+1000;.SELECT.*,.'x' |
1569c0 | 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e | .FROM.t1.ORDER.BY.sqlite_version |
1569e0 | 28 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 2b 61 3b 0a 82 11 92 61 04 00 84 27 43 52 45 | ()COLLATE.nocase,+a;....a...'CRE |
156a00 | 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t1(a,b,c,d,PRIMARY.KEY |
156a20 | 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | (d,c))WITHOUT.ROWID;.CREATE.UNIQ |
156a40 | 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t1bc.ON.t1(b,c);.INSERT |
156a60 | 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t1(a,b,c,d).VALUES(1,2,3,4 |
156a80 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 | ),(5,6,7,8),(9,2,3,10),(11,12,13 |
156aa0 | 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,14).ON.CONFLICT(c,b).DO.UPDATE. |
156ac0 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | SET.a=a+1000;.SELECT.*,.'x'.FROM |
156ae0 | 20 74 31 20 4f 52 44 45 52 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 2c 2b 20 | .t1.ORDER.BY.sqlite_version(),+. |
156b00 | 22 61 22 2c 22 62 22 61 3b 0a 81 78 92 60 04 00 83 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | "a","b"a;..x.`...uCREATE.TABLE.t |
156b20 | 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f | 1(a,b,c,d,PRIMARY.KEY(d,c))WITHO |
156b40 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 | UT.ROWID;.CREATE.UNIQUE.INDEX.t1 |
156b60 | 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | bc.ON.t1(b,c);.INSERT.INTO.t1(a, |
156b80 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
156ba0 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
156bc0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
156be0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 | 0;.SELECT.*,.'x'.FROM.t1.ORDER.B |
156c00 | 59 20 64 00 3b 0a 81 78 92 5f 04 00 83 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c | Y.d.;..x._...uCREATE.TABLE.t1(a, |
156c20 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 | b,c,d,PRIMARY.KEY(d,c))WITHOUT.R |
156c40 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t1bc.O |
156c60 | 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c | N.t1(b,c);.INSERT.INTO.t1(a,b,c, |
156c80 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | d).VALUES(1,2,3,4),(5,6,7,8),(9, |
156ca0 | 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | 2,3,10),(11,12,13,14).ON.CONFLIC |
156cc0 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
156ce0 | 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 2c | ELECT.*,.'x'.FROM.t1.ORDER.BY.a, |
156d00 | 62 0a 81 7f 92 5e 04 00 84 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c | b....^....CREATE.TABLE.t1(a,b,c, |
156d20 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | d,PRIMARY.KEY(d,c))WITHOUT.ROWID |
156d40 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 | ;.CREATE.UNIQUE.INDEX.t1bc.ON.t1 |
156d60 | 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 | (b,c);.INSERT.INTO.t1(a,b,c,d).V |
156d80 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c | ALUES(1,2,3,4),(5,6,7,8),(9,2,3, |
156da0 | 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | 10),(11,12,13,14).ON.CONFLICT(c, |
156dc0 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 | b).DO.UPDATE.SET.a=a+1000;.SELEC |
156de0 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 52 45 49 | T.*,.'x'.FROM.t1.ORDER.BY.+a;REI |
156e00 | 4e 44 45 58 0a 81 7f 92 5d 04 00 84 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 | NDEX....]....CREATE.TABLE.t1(a,b |
156e20 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f | ,c,d,PRIMARY.KEY(d,c))WITHOUT.RO |
156e40 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t1bc.ON |
156e60 | 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | .t1(b,c);.INSERT.INTO.t1(a,b,c,d |
156e80 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
156ea0 | 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,3,10),(11,12,13,14).ON.CONFLICT |
156ec0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
156ee0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 2b 61 3b | LECT.*,.'x'.FROM.t1.ORDER.BY.+a; |
156f00 | 41 4e 41 4c 59 5a 45 0a 82 17 92 5c 04 00 84 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | ANALYZE....\...3CREATE.TABLE.t1( |
156f20 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 | a,b,c,d,PRIMARY.KEY(d,c))WITHOUT |
156f40 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t1bc |
156f60 | 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c | .ON.t1(b,c);.INSERT.INTO.t1(a,b, |
156f80 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
156fa0 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
156fc0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
156fe0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 | .SELECT.*,.'x'.FROM.t1.ORDER.BY. |
157000 | 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 | .sqlite_source_id()COLLATE.nocas |
157020 | 65 3b 0a 82 09 92 5b 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | e;....[....CREATE.TABLE.t1(a,b,c |
157040 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,d,PRIMARY.KEY(d,c))WITHOUT.ROWI |
157060 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t1bc.ON.t |
157080 | 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 | 1(b,c);.INSERT.INTO.t1(a,b,c,d). |
1570a0 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
1570c0 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
1570e0 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
157100 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 20 73 71 6c 69 | CT.*,.'x'.FROM.t1.ORDER.BY..sqli |
157120 | 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 3b 0a 81 78 92 5a 04 00 83 75 43 52 45 41 54 45 20 54 | te_source_id();..x.Z...uCREATE.T |
157140 | 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 | ABLE.t1(a,b,c,d,PRIMARY.KEY(d,c) |
157160 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | )WITHOUT.ROWID;.CREATE.UNIQUE.IN |
157180 | 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | DEX.t1bc.ON.t1(b,c);.INSERT.INTO |
1571a0 | 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | .t1(a,b,c,d).VALUES(1,2,3,4),(5, |
1571c0 | 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a | 6,7,8),(9,2,3,10),(11,12,13,14). |
1571e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ON.CONFLICT(c,b).DO.UPDATE.SET.a |
157200 | 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f | =a+1000;.SELECT.*,.'x'.FROM.t1.O |
157220 | 52 44 45 52 20 42 59 20 0b 61 3b 0a 82 08 92 59 04 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 | RDER.BY..a;....Y....CREATE.TABLE |
157240 | 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 | .t1(a,b,c,d,PRIMARY.KEY(d,c))WIT |
157260 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
157280 | 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | t1bc.ON.t1(b,c);.INSERT.INTO.t1( |
1572a0 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | a,b,c,d).VALUES(1,2,3,4),(5,6,7, |
1572c0 | 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 8),(9,2,3,10),(11,12,13,14).ON.C |
1572e0 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
157300 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 4e 4f 54 20 | 000;.SELECT.*,.'x'.FROM.t1.ONOT. |
157320 | 49 4e 44 45 58 45 44 20 42 59 20 73 71 ec 69 74 65 5f 76 65 2b 61 3b 0a 82 04 92 58 04 00 84 0d | INDEXED.BY.sq.ite_ve+a;....X.... |
157340 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t1(a,b,c,d,PRIMARY. |
157360 | 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | KEY(d,c))WITHOUT.ROWID;.CREATE.U |
157380 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t1bc.ON.t1(b,c);.INS |
1573a0 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t1(a,b,c,d).VALUES(1,2, |
1573c0 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
1573e0 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
157400 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
157420 | 52 4f 4d 20 74 31 20 4f 4e 4f 54 20 49 4e 44 45 58 45 44 20 42 59 20 73 71 6c e9 74 2b 61 3b 0a | ROM.t1.ONOT.INDEXED.BY.sql.t+a;. |
157440 | 82 08 92 57 04 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c | ...W....CREATE.TABLE.t1(a,b,c,d, |
157460 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | PRIMARY.KEY(d,c))WITHOUT.ROWID;. |
157480 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 | CREATE.UNIQUE.INDEX.t1bc.ON.t1(b |
1574a0 | 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | ,c);.INSERT.INTO.t1(a,b,c,d).VAL |
1574c0 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 | UES(1,2,3,4),(5,6,7,8),(9,2,3,10 |
1574e0 | 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 | ),(11,12,13,14).ON.CONFLICT(c,b) |
157500 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
157520 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 4e 4f 54 20 49 4e 44 45 58 45 44 20 42 59 20 73 | *,.'x'.FROM.t1.ONOT.INDEXED.BY.s |
157540 | 71 6c 69 f4 65 5f 76 65 2b 61 3b 0a 82 15 92 56 04 00 84 2f 43 52 45 41 54 45 20 54 41 42 4c 45 | qli.e_ve+a;....V.../CREATE.TABLE |
157560 | 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 | .t1(a,b,c,d,PRIMARY.KEY(d,c))WIT |
157580 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
1575a0 | 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | t1bc.ON.t1(b,c);.INSERT.INTO.t1( |
1575c0 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | a,b,c,d).VALUES(1,2,3,4),(5,6,7, |
1575e0 | 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 8),(9,2,3,10),(11,12,13,14).ON.C |
157600 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
157620 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 4f 4e 4f 54 20 | 000;.SELECT.*,.'x'.FROM.t1.ONOT. |
157640 | 49 4e 44 45 58 45 44 20 42 59 20 73 71 6c 69 74 65 5f 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 76 | INDEXED.BY.sqlite_AUTOINCREMENTv |
157660 | 65 2b 61 3b 0a 82 11 92 55 04 00 84 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 | e+a;....U...'CREATE.TABLE.t1(a,b |
157680 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f | ,c,d,PRIMARY.KEY(d,c))WITHOUT.RO |
1576a0 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t1bc.ON |
1576c0 | 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | .t1(b,c);.INSERT.INTO.t1(a,b,c,d |
1576e0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
157700 | 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,3,10),(11,12,13,14).ON.CONFLICT |
157720 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
157740 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 73 71 6c | LECT.*,.'x'.FROM.t1.GROUP.BY.sql |
157760 | 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 0f 92 54 04 00 | ite_version()ORDER.BY.+a;....T.. |
157780 | 84 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .#CREATE.TABLE.t1(a,b,c,d,PRIMAR |
1577a0 | 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | Y.KEY(d,c))WITHOUT.ROWID;.CREATE |
1577c0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t1bc.ON.t1(b,c);.I |
1577e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t1(a,b,c,d).VALUES(1, |
157800 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
157820 | 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | 12,13,14).ON.CONFLICT(c,b).DO.UP |
157840 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | DATE.SET.a=a+1000;.SELECT.*,.'x' |
157860 | 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e | .FROM.t1.GROUP.BY.sqlite_version |
157880 | 28 29 48 41 56 49 4e 47 2b 2b 61 3b 0a 82 20 92 53 04 00 84 45 43 52 45 41 54 45 20 54 41 42 4c | ()HAVING++a;....S...ECREATE.TABL |
1578a0 | 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 | E.t1(a,b,c,d,PRIMARY.KEY(d,c))WI |
1578c0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
1578e0 | 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 | .t1bc.ON.t1(b,c);.INSERT.INTO.t1 |
157900 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
157920 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 | ,8),(9,2,3,10),(11,12,13,14).ON. |
157940 | 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b | CONFLICT(c,b).DO.UPDATE.SET.a=a+ |
157960 | 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 | 1000;.SELECT.*,.'x'.FROM.t1.GROU |
157980 | 50 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 48 41 56 49 4e 47 20 73 71 6c 69 | P.BY.sqlite_version()HAVING.sqli |
1579a0 | 74 65 5f 76 65 72 73 69 6f 6e 28 29 20 2b 61 3b 0a 82 19 92 52 04 00 84 37 43 52 45 41 54 45 20 | te_version().+a;....R...7CREATE. |
1579c0 | 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 | TABLE.t1(a,b,c,d,PRIMARY.KEY(d,c |
1579e0 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
157a00 | 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t1bc.ON.t1(b,c);.INSERT.INT |
157a20 | 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t1(a,b,c,d).VALUES(1,2,3,4),(5 |
157a40 | 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | ,6,7,8),(9,2,3,10),(11,12,13,14) |
157a60 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
157a80 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 | a=a+1000;.SELECT.*,.'x'.FROM.t1. |
157aa0 | 47 52 4f 55 50 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 48 41 56 49 4e 47 20 | GROUP.BY.sqlite_version()HAVING. |
157ac0 | 32 30 30 31 2d 30 31 2d 30 31 2b 61 3b 0a 82 13 92 51 04 00 84 2b 43 52 45 41 54 45 20 54 41 42 | 2001-01-01+a;....Q...+CREATE.TAB |
157ae0 | 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 | LE.t1(a,b,c,d,PRIMARY.KEY(d,c))W |
157b00 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
157b20 | 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t1bc.ON.t1(b,c);.INSERT.INTO.t |
157b40 | 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 1(a,b,c,d).VALUES(1,2,3,4),(5,6, |
157b60 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
157b80 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
157ba0 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f | +1000;.SELECT.*,.'x'.FROM.t1.GRO |
157bc0 | 55 50 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 48 41 56 49 4e 47 20 31 3d 31 | UP.BY.sqlite_version()HAVING.1=1 |
157be0 | 20 2b 61 3b 0a 82 0f 92 50 04 00 84 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 | .+a;....P...#CREATE.TABLE.t1(a,b |
157c00 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f | ,c,d,PRIMARY.KEY(d,c))WITHOUT.RO |
157c20 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t1bc.ON |
157c40 | 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 | .t1(b,c);.INSERT.INTO.t1(a,b,c,d |
157c60 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
157c80 | 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,3,10),(11,12,13,14).ON.CONFLICT |
157ca0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
157cc0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 73 71 6c | LECT.*,.'x'.FROM.t1.GROUP.BY.sql |
157ce0 | 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 48 41 56 49 4e 47 20 2b 61 3b 0a 82 0f 92 4f 04 00 84 23 | ite_version()HAVING.+a;....O...# |
157d00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t1(a,b,c,d,PRIMARY. |
157d20 | 4b 45 59 28 64 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | KEY(d,c))WITHOUT.ROWID;.CREATE.U |
157d40 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t1bc.ON.t1(b,c);.INS |
157d60 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t1(a,b,c,d).VALUES(1,2, |
157d80 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
157da0 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
157dc0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
157de0 | 52 4f 4d 20 74 31 20 47 52 4f 55 50 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 | ROM.t1.GROUP.BY.sqlite_version() |
157e00 | 48 41 56 49 4e 47 20 23 61 3b 0a 81 64 92 4e 04 00 83 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | HAVING.#a;..d.N...MCREATE.TABLE. |
157e20 | 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 2c 63 29 29 57 49 54 48 | t1(a,b,c,d,PRIMARY.KEY(d,c))WITH |
157e40 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
157e60 | 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | 1bc.ON.t1(b,c);.INSERT.INTO.t1(a |
157e80 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,8 |
157ea0 | 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f | ),(9,2,3,10),(11,12,13,14).ON.CO |
157ec0 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=a+10 |
157ee0 | 30 30 3b 0a 53 41 56 45 50 4f 49 4e 54 20 27 78 27 00 46 82 09 92 4d 04 00 84 17 43 52 45 41 54 | 00;.SAVEPOINT.'x'.F...M....CREAT |
157f00 | 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | E.TABLE.t1(a,b,c,d,PRIMARY.KEY(d |
157f20 | 2c 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | ,c))WITHOUT.ROWID;.CREATE.UNIQUE |
157f40 | 20 49 4e 44 45 58 20 74 31 62 63 20 4f 4e 20 74 31 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 | .INDEX.t1bc.ON.t1(b,c);.INSERT.I |
157f60 | 4e 54 4f 20 74 31 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 32 30 30 | NTO.t1(a,b,c,d).VALUES(1,2,3,200 |
157f80 | 31 2d 30 31 2d 30 31 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | 1-01-018),(9,2,3,10),(11,12,13,1 |
157fa0 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
157fc0 | 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | T.a=a+1000;.SELECT.*,.'x'.FROM.t |
157fe0 | 31 20 4f 52 44 45 52 20 42 59 20 73 71 6c 69 74 65 5f 76 65 72 73 69 6f 6e 28 29 2c 2b 61 3b 0a | 1.ORDER.BY.sqlite_version(),+a;. |
158000 | 0d 00 00 00 1e 00 85 00 1f 63 1e d6 1e 4b 1d 6c 1c df 1a 29 17 73 16 75 15 77 14 79 13 9b 12 99 | .........c...K.l...).s.u.w.y.... |
158020 | 11 9b 10 99 0f 97 0e 95 0d 8f 0c 89 0b 87 0a 82 09 80 08 74 07 6f 06 6d 05 6b 04 91 03 93 02 91 | ...................t.o.m.k...... |
158040 | 01 84 00 85 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
158060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
158080 | 00 00 00 00 00 81 7b 93 08 04 00 83 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | ......{.....{CREATE.TABLE.t2(a,b |
1580a0 | 2c 63 20 62 6c 6f 62 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | ,c.blob,d,PRIMARY.KEY(d))WITHOUT |
1580c0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
1580e0 | 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(c,c);.INSERT.INTO.t2(a,b, |
158100 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 32 30 30 31 2d 30 | c,d).VALUES(1,2,3,4),(5,6,2001-0 |
158120 | 31 2d 30 31 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 1-013,10),(11,12,13,14).ON.CONFL |
158140 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
158160 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 | .SELECT.*,.'x'.FROM.t2.ORDER.BY. |
158180 | 2b 61 3b 0a 82 09 93 07 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 20 63 68 | +a;.........CREATE.TABLE.t2(a.ch |
1581a0 | 61 72 28 31 29 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | ar(1),b,c,d,PRIMARY.KEY(d))WITHO |
1581c0 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
1581e0 | 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(b,c);.INSERT.INTO.t2(a, |
158200 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
158220 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
158240 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
158260 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 3f 2c 41 29 20 27 78 27 20 46 52 4f 4d | 0;.SELECT.*,.round(?,A).'x'.FROM |
158280 | 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7e 93 06 04 00 84 01 43 52 45 41 54 45 20 | .t2.ORDER.BY.+a;..~......CREATE. |
1582a0 | 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | TABLE.t2(.a,ba,b,c,d,PRIMARY.KEY |
1582c0 | 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | (d))WITHOUT.ROWID;.CREATE.UNIQUE |
1582e0 | 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 | .INDEX.t2bc.ON.t2(c,c);.INSERT.I |
158300 | 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c | NTO.t2(a,b,c,d).VALUES(1,2,3,4), |
158320 | 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | (5,6,7,8),(9,2,3,10),(11,12,13,1 |
158340 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
158360 | 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 20 27 78 27 20 46 52 | T.a=a+1000;.SELECT.*,.a,b.'x'.FR |
158380 | 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 81 7a 93 05 04 00 83 79 43 52 45 41 54 | OM.t2.GROUP.BY.+a;..z.....yCREAT |
1583a0 | 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | E.TABLE.t2(.a,ba,b,c,d,PRIMARY.K |
1583c0 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
1583e0 | 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t2bc.ON.t2(b,c);.INSERT |
158400 | 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t2(c,b,c,d).VALUES(1,2,3,4 |
158420 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 | ),(5,6,7,8),(9,2,3,10),(11,12,13 |
158440 | 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,14).ON.CONFLICT(c,b).DO.UPDATE. |
158460 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 20 2a 46 52 4f 4d | SET.a=a+1000;.SELECT.*,.a,.*FROM |
158480 | 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 56 93 04 04 00 83 31 43 52 45 41 54 45 20 | .t2.ORDER.BY.+a;..V.....1CREATE. |
1584a0 | 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | TABLE.t2(.a,ba,b,c,d,PRIMARY.KEY |
1584c0 | 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | (d))WITHOUT.ROWID;.CREATE.UNIQUE |
1584e0 | 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 | .INDEX.t2bc.ON.t2(b,c);.INSERT.I |
158500 | 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c | NTO.t2(a,b,c,d).VALUES(1,2,3,4), |
158520 | 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | (5,6,7,8),(9,2,3,10),(11,12,13,1 |
158540 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
158560 | 54 20 61 3d 61 2b 64 00 30 3b 0a 81 7e 93 03 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 | T.a=a+d.0;..~......CREATE.TABLE. |
158580 | 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 | t2(.a,ba,b,c,d,PRIMARY.KEY(d))WI |
1585a0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
1585c0 | 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | .t2bc.ON.t2(b,c);.INSERT.INTO.t2 |
1585e0 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
158600 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 | ,8),(9,2,3,10),(11,12,13,14).ON. |
158620 | 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b | CONFLICT(c,b).DO.UPDATE.SET.a=a+ |
158640 | 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 41 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 | 1000;.SELECT.*,A'x'.FROM.t2.ORDE |
158660 | 52 20 42 59 20 61 2c 62 20 2b 61 3b 0a 81 7e 93 02 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c | R.BY.a,b.+a;..~......CREATE.TABL |
158680 | 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | E.t2(.a,ba,b,c,d,PRIMARY.KEY(d)) |
1586a0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
1586c0 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
1586e0 | 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t2(a,b,c,d).VALUES(1,2,3,4),(5,6 |
158700 | 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f | ,7,8),(9,2,3,10),(11,12,13,14).O |
158720 | 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | N.CONFLICT(c,b).DO.UPDATE.SET.a= |
158740 | 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 63 2c 62 20 27 78 27 20 46 52 4f 4d 20 74 | a+1000;.SELECT.*,.c,b.'x'.FROM.t |
158760 | 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 82 01 93 01 04 00 84 07 43 52 45 41 54 45 20 54 41 | 2.GROUP.BY.+a;.........CREATE.TA |
158780 | 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | BLE.t2(.a,ba,b,c,d,PRIMARY.KEY(d |
1587a0 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
1587c0 | 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t2bc.ON.t2(b,c);.INSERT.INT |
1587e0 | 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t2(a,b,c,d).VALUES(1,2,3,4),(5 |
158800 | 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | ,6,7,8),(9,2,3,10),(11,12,13,14) |
158820 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
158840 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 76 67 28 42 29 20 27 78 27 20 46 | a=a+1000;.SELECT.*,.avg(B).'x'.F |
158860 | 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 42 61 3b 0a 82 08 93 00 04 00 84 15 43 52 45 41 | ROM.t2.ORDER.BY.Ba;.........CREA |
158880 | 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | TE.TABLE.t2(.a,ba,b,c,d,PRIMARY. |
1588a0 | 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 | KEY(d))WITHOUT.ROWID;.CREATE.UNI |
1588c0 | 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 | QUE.INDEX.t2bc.ON.t2(b,c);.INSER |
1588e0 | 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c | T.INTO.t2(a,b,c,d).VALUES(1,2,3, |
158900 | 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 | 4),(5,6,7,8),(9,2,3,10),(11,12,1 |
158920 | 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | 3,14).ON.CONFLICT(c,b).DO.UPDATE |
158940 | 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 76 67 28 31 29 20 | .SET.a=a+1000;.SELECT.*,.avg(1). |
158960 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 73 75 6d 28 31 29 20 42 61 3b 0a | 'x'.FROM.t2.ORDER.BY.sum(1).Ba;. |
158980 | 81 7e 92 7f 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c | .~......CREATE.TABLE.t2(.a,ba,b, |
1589a0 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | c,d,PRIMARY.KEY(d))WITHOUT.ROWID |
1589c0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 | ;.CREATE.UNIQUE.INDEX.t2bc.ON.t2 |
1589e0 | 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 | (b,c);.INSERT.INTO.t2(a,b,c,d).V |
158a00 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c | ALUES(1,2,3,4),(5,6,7,8),(9,2,3, |
158a20 | 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | 10),(11,12,13,14).ON.CONFLICT(c, |
158a40 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 | b).DO.UPDATE.SET.a=a+1000;.SELEC |
158a60 | 54 20 2a 2c 20 61 2c 7e 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 | T.*,.a,~.'x'.FROM.t2.ORDER.BY.+a |
158a80 | 3b 0a 82 01 92 7e 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c | ;....~....CREATE.TABLE.t2(.a,ba, |
158aa0 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(d))WITHOUT.ROW |
158ac0 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
158ae0 | 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 | t2(b,c);.INSERT.INTO.t2(a,b,c,d) |
158b00 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c | .VALUES(1,2,3,4),(5,6,7,8),(9,2, |
158b20 | 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 3,10),(11,12,13,14).ON.CONFLICT( |
158b40 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c | c,b).DO.UPDATE.SET.a=a+1000;.SEL |
158b60 | 45 43 54 20 2a 2c 20 61 2c 62 2c 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 | ECT.*,.a,b,'x'.FROM.t2.ORDER.BY. |
158b80 | 2b 61 3b 45 4e 44 0a 81 7e 92 7d 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 | +a;END..~.}....CREATE.TABLE.t2(. |
158ba0 | 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | a,ba,b,c,d,PRIMARY.KEY(d))WITHOU |
158bc0 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
158be0 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 | c.ON.t2(b,c);.INSERT.INTO.t2(a,b |
158c00 | 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ,c,d).VALUES(1,2,3,4),(5,6,7,8), |
158c20 | 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | (9,2,3,10),(11,12,13,14).ON.CONF |
158c40 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
158c60 | 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 2c 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 | ;.SELECT.*,.a,b,'x'.FROM.t2.GROU |
158c80 | 50 20 42 59 20 2b 61 3b 0a 82 02 92 7c 04 00 84 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | P.BY.+a;....|....CREATE.TABLE.t2 |
158ca0 | 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 | (.a,ba,b,c,d,PRIMARY.KEY(d))WITH |
158cc0 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
158ce0 | 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 | 2bc.ON.t2(b,c);.INSERT.INTO.t2(a |
158d00 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,8 |
158d20 | 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f | ),(9,2,3,10),(11,12,13,14).ON.CO |
158d40 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=a+10 |
158d60 | 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 2c 20 61 2c 62 27 78 27 20 46 52 4f 4d 20 74 | 00;.SELECT.*,.a,b,.a,b'x'.FROM.t |
158d80 | 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 02 92 7b 04 00 84 09 43 52 45 41 54 45 20 54 41 | 2.ORDER.BY.+a;....{....CREATE.TA |
158da0 | 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | BLE.t2(.a,ba,b,c,d,PRIMARY.KEY(d |
158dc0 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
158de0 | 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t2bc.ON.t2(b,c);.INSERT.INT |
158e00 | 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t2(a,b,c,d).VALUES(1,2,3,4),(5 |
158e20 | 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | ,6,7,8),(9,2,3,10),(11,12,13,14) |
158e40 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
158e60 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 20 27 78 27 20 46 52 4f 4d | a=a+1000;.SELECT.*,.a,b.'x'.FROM |
158e80 | 20 74 32 20 4f 52 44 45 52 20 42 59 20 61 2c 62 20 2b 61 3b 0a 81 7e 92 7a 04 00 84 01 43 52 45 | .t2.ORDER.BY.a,b.+a;..~.z....CRE |
158ea0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | ATE.TABLE.t2(.a,ba,b,c,d,PRIMARY |
158ec0 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
158ee0 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
158f00 | 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t2(a,b,c,d).VALUES(1,2,3 |
158f20 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c | ,4),(5,6,7,8),(9,2,3,10),(11,12, |
158f40 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
158f60 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 20 27 78 | E.SET.a=a+1000;.SELECT.*,.a,b.'x |
158f80 | 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 23 61 3b 0a 81 7e 92 79 04 00 84 01 43 | '.FROM.t2.GROUP.BY.#a;..~.y....C |
158fa0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | REATE.TABLE.t2(.a,ba,b,c,d,PRIMA |
158fc0 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
158fe0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
159000 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
159020 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
159040 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
159060 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 2a 2c 62 20 | ATE.SET.a=a+1000;.SELECT.*,.*,b. |
159080 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7e 92 78 04 00 84 | 'x'.FROM.t2.ORDER.BY.+a;..~.x... |
1590a0 | 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 | .CREATE.TABLE.t2(.a,ba,b,c,d,PRI |
1590c0 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
1590e0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
159100 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(a,b,c,d).VALUES(1 |
159120 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
159140 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
159160 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 2a 2c | PDATE.SET.a=a+1000;.SELECT.*,.*, |
159180 | 62 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 81 7a 92 77 04 | b.'x'.FROM.t2.GROUP.BY.+a;..z.w. |
1591a0 | 00 83 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 | ..yCREATE.TABLE.t2(.a,ba,b,c,d,P |
1591c0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
1591e0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
159200 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
159220 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
159240 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
159260 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
159280 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 61 2c 62 0a 81 7e 92 76 04 00 84 | 'x'.FROM.t2.ORDER.BY.a,b..~.v... |
1592a0 | 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 | .CREATE.TABLE.t2(.a,ba,b,c,d,PRI |
1592c0 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
1592e0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
159300 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(a,b,c,d).VALUES(1 |
159320 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
159340 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
159360 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
159380 | 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 61 2c 62 20 2b 61 3b 0a 81 5a 92 75 04 | '.FROM.t2.GROUP.BY.a,b.+a;..Z.u. |
1593a0 | 00 83 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 | ..9CREATE.TABLE.t2(.a,ba,b,c,d,P |
1593c0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
1593e0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
159400 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
159420 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 20 72 61 6e 64 6f 6d 62 6c | (1,2,3,4),(5,6,7,8),(9,.randombl |
159440 | 6f 62 28 31 29 2c 31 33 2c 30 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | ob(1),13,04).ON.CONFLICT(c,b).DO |
159460 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 3b 0a 81 7a 92 74 04 00 83 | .UPDATE.SET.a=a+1000;.S;..z.t... |
159480 | 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 | yCREATE.TABLE.t2(.a,ba,b,c,d,PRI |
1594a0 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
1594c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
1594e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(a,b,c,d).VALUES(1 |
159500 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 29 2c 28 31 31 | ,2,3,4),(5,6,7,.zeroblob(1)),(11 |
159520 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
159540 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 64 27 78 | PDATE.SET.a=a+1000;.SELECT.*,d'x |
159560 | 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 81 7a 92 73 04 00 83 79 43 | '.FROM.t2.GROUP.BY.+a;..z.s...yC |
159580 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | REATE.TABLE.t2(.a,ba,b,c,d,PRIMA |
1595a0 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
1595c0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
1595e0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 20 | SERT.INTO.t2(a,b,c,d).VALUES(1,. |
159600 | 6c 74 72 69 6d 28 31 2c 31 29 2c 37 2c 38 29 2c 28 39 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 | ltrim(1,1),7,8),(9,.randomblob(1 |
159620 | 29 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | ),13,14).ON.CONFLICT(c,b).DO.UPD |
159640 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
159660 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7a 92 72 04 00 83 79 43 52 45 | FROM.t2.ORDER.BY.+a;..z.r...yCRE |
159680 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 20 61 2c 62 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | ATE.TABLE.t2(.a,ba,b,c,d,PRIMARY |
1596a0 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
1596c0 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
1596e0 | 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 62 ac 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t2(a,b,b.d).VALUES(1,2,3 |
159700 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c | ,4),(5,6,7,8),(9,2,3,10),(11,12, |
159720 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
159740 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | E.SET.a=a+1000;.SELECT.*,.'x'.FR |
159760 | 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 85 32 92 71 04 00 8a 69 43 52 45 41 54 | OM.t2.ORDER.BY.+a;..2.q...iCREAT |
159780 | 45 20 54 41 42 4c 45 20 74 31 28 e1 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | E.TABLE.t1(..INT);.CREATE.TABLE. |
1597a0 | 63 6f 75 6e 74 73 28 76 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 | counts(v.INTEGER.PRIMARY.KEY,.n. |
1597c0 | 49 4e 54 29 2f 2a 57 55 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 | INT)/*WUT.ROWID*/;.CREATE.TRIGGE |
1597e0 | 52 20 72 31 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r1.AFTER.INSERT.ON.t1.BEGIN... |
159800 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 9c d7 87 | INSERT.INTO.counts(v,n).WITH.... |
159820 | d6 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 | ..AS.(values(1))..VALUES(new.a,1 |
159840 | 29 0a 20 20 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 | ).......ON.CONFLICT(v).DO.UPDATE |
159860 | 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | .SET.n=n+1;.END;.CREATE.TRIGGER. |
159880 | 72 32 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 | r2.AFTER.UPDATE.ON.t1.BEGIN...DE |
1598a0 | 4c 45 54 45 20 46 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 | LETE.FROM.counts.WHERE.v=old.a.A |
1598c0 | 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e | ND.n==1;...UPDATE.counts.SET.n=n |
1598e0 | 2d 31 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 | -1.WHERE.v=old.a;...INSERT.INTO. |
159900 | 63 6f 75 6e 74 73 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | counts(v,n).VALUES(new.a,1)..... |
159920 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
159940 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r3.AFT |
159960 | 45 52 20 44 45 4c 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.DELETE.ON.t1.BEGIN...DELETE.F |
159980 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
1599a0 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
1599c0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | RE.v=old.a;.END;.INSERT.INTO.t1( |
1599e0 | 61 29 20 56 41 4c 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 | a).VALUES(1),(2),(1),(3),(1),(3) |
159a00 | 2c 28 32 29 2c 28 34 29 2c 28 37 29 3b 0a 55 44 45 4c 45 54 45 20 46 52 4f 4d 20 74 31 20 57 48 | ,(2),(4),(7);.UDELETE.FROM.t1.WH |
159a20 | 45 52 45 20 61 3d 37 3b 0a 85 32 92 70 04 00 8a 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 | ERE.a=7;..2.p...iCREATE.TABLE.t1 |
159a40 | 28 e1 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 63 6f 75 6e 74 73 28 76 20 49 | (..INT);.CREATE.TABLE.counts(v.I |
159a60 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 6e 20 49 4e 54 29 2f 2a 57 55 54 20 | NTEGER.PRIMARY.KEY,.n.INT)/*WUT. |
159a80 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 31 20 41 46 54 45 52 | ROWID*/;.CREATE.TRIGGER.r1.AFTER |
159aa0 | 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 | .INSERT.ON.t1.BEGIN...INSERT.INT |
159ac0 | 4f 20 63 6f 75 6e 74 73 28 76 2c 6e 29 20 57 49 54 48 20 63 28 20 61 2c 62 78 29 20 41 53 20 28 | O.counts(v,n).WITH.c(.a,bx).AS.( |
159ae0 | 76 61 6c 75 65 73 28 31 29 29 20 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 | values(1))..VALUES(new.a,1)..... |
159b00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e | ..ON.CONFLICT(v).DO.UPDATE.SET.n |
159b20 | 3d 6e 2b 31 3b 0a 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 32 20 41 46 54 | =n+1;.END;.CREATE.TRIGGER.r2.AFT |
159b40 | 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 | ER.UPDATE.ON.t1.BEGIN...DELETE.F |
159b60 | 52 4f 4d 20 63 6f 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d | ROM.counts.WHERE.v=old.a.AND.n== |
159b80 | 31 3b 0a 20 20 55 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 | 1;...UPDATE.counts.SET.n=n-1.WHE |
159ba0 | 52 45 20 76 3d 6f 6c 64 2e 61 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 63 6f 75 6e 74 73 | RE.v=old.a;...INSERT.INTO.counts |
159bc0 | 28 76 2c 6e 29 20 56 41 4c 55 45 53 28 6e 65 77 2e 61 2c 31 29 0a 20 20 20 20 20 20 4f 4e 20 43 | (v,n).VALUES(new.a,1).......ON.C |
159be0 | 4f 4e 46 4c 49 43 54 28 76 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 6e 3d 6e 2b 31 3b 0a | ONFLICT(v).DO.UPDATE.SET.n=n+1;. |
159c00 | 45 4e 44 3b 0a 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 41 46 54 45 52 20 44 45 4c | END;.CREATE.TRIGGER.r3.AFTER.DEL |
159c20 | 45 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 63 6f | ETE.ON.t1.BEGIN...DELETE.FROM.co |
159c40 | 75 6e 74 73 20 57 48 45 52 45 20 76 3d 6f 6c 64 2e 61 20 41 4e 44 20 6e 3d 3d 31 3b 0a 20 20 55 | unts.WHERE.v=old.a.AND.n==1;...U |
159c60 | 50 44 41 54 45 20 63 6f 75 6e 74 73 20 53 45 54 20 6e 3d 6e 2d 31 20 57 48 45 52 45 20 76 3d 6f | PDATE.counts.SET.n=n-1.WHERE.v=o |
159c80 | 6c 64 2e 61 3b 0a 45 4e 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 29 20 56 41 4c | ld.a;.END;.INSERT.INTO.t1(a).VAL |
159ca0 | 55 45 53 28 31 29 2c 28 32 29 2c 28 31 29 2c 28 33 29 2c 28 31 29 2c 28 33 29 2c 28 32 29 2c 28 | UES(1),(2),(1),(3),(1),(3),(2),( |
159cc0 | 34 29 2c 28 37 29 3b 0a 55 50 44 41 54 45 20 74 31 74 31 20 57 48 45 52 45 20 61 3d 37 3b 0a 81 | 4),(7);.UPDATE.t1t1.WHERE.a=7;.. |
159ce0 | 09 92 6f 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 62 ec 62 2c 63 2c 64 2c 50 | ..o....CREATE.TABLE.t1(b.b,c,d,P |
159d00 | 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 2c 62 2c | RIMARY.KEY(b,.datetime(1,1,1),b, |
159d20 | 63 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 2c 62 2c 63 2c 64 29 20 53 45 4c | c,.sqlite_source_id(),b,c,d).SEL |
159d40 | 45 43 54 20 2a 20 46 52 4f 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 | ECT.*.FROM.data.ON.CONFLICT(b,d) |
159d60 | 20 55 50 44 41 54 45 20 53 45 54 0a 81 5b 92 6e 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 | .UPDATE.SET..[.n...;CREATE.TABLE |
159d80 | 20 74 31 28 61 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 49 4e 54 2c 62 20 49 4e 54 45 47 45 52 2c 20 | .t1(aON.CONFLICT.INT,b.INTEGER,. |
159da0 | 63 20 54 45 58 54 2c 20 64 20 42 4c 4f 42 2c 20 65 20 41 45 58 50 4c 41 49 4e 20 51 55 45 52 59 | c.TEXT,.d.BLOB,.e.AEXPLAIN.QUERY |
159dc0 | 20 50 4c 41 4e 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 69 67 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 | .PLANON.CONFLICT.ignore,.....PRI |
159de0 | 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e 49 51 55 45 28 63 29 20 4f 4e 20 43 4f | MARY.KEY(b),.....UNIQUE(c).ON.CO |
159e00 | 4e 46 4c 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | NFLICT.fail.).WITHOUT.ROWID;.CRE |
159e20 | 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 | ATE.INDEX.t1d.ON.t1(d);ANALYZE.T |
159e40 | 45 4d 50 3b 56 41 43 55 55 4d 0a 81 07 92 6d 04 00 82 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 | EMP;VACUUM....m....CREATE.TABLE. |
159e60 | 74 31 28 61 2c 9d d3 9c d3 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 62 2c 20 65 2c 62 2c 43 64 | t1(a,....d,PRIMARY.KEY(b,.e,b,Cd |
159e80 | 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 62 2c 43 | atetime(1,1,1)COLLATE.nocase,b,C |
159ea0 | 4f 4e 46 4c 49 43 54 39 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 25 46 52 4f 4d 20 64 61 | ONFLICT9,b,c,d).SELECT.*%FROM.da |
159ec0 | 74 61 0a 4f 54 28 62 2c 64 29 20 55 50 44 00 64 45 20 53 45 54 0a 81 09 92 6c 04 00 82 17 43 52 | ta.OT(b,d).UPD.dE.SET....l....CR |
159ee0 | 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 ac 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t1(a,b.c,d,PRIMARY.KE |
159f00 | 59 28 62 2c 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 2c 62 2c 63 2c 20 73 71 6c 69 74 65 | Y(b,.datetime(1,1,1),b,c,.sqlite |
159f20 | 5f 73 6f 75 72 63 65 5f 69 64 28 29 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 20 46 52 4f | _source_id(),b,c,d).SELECT.*.FRO |
159f40 | 4d 20 64 61 74 61 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 50 44 41 54 45 20 53 | M.data.ON.CONFLICT(b,d).UPDATE.S |
159f60 | 45 54 0a 81 19 92 6b 04 00 82 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 2c 62 2c 63 | ET....k...7CREATE.TABLE.t1(a,b,c |
159f80 | 2c 64 2c 50 52 49 4d 41 52 60 64 4f 4e 46 4c 49 43 54 28 62 2c 64 29 20 55 59 20 4b 45 59 28 62 | ,d,PRIMAR`dONFLICT(b,d).UY.KEY(b |
159fa0 | 2c 64 29 29 3b 0a 5e 2e 54 48 20 64 61 20 70 72 6e 74 66 28 31 2c 31 29 64 29 20 41 53 20 31 30 | ,d));.^.TH.da.prntf(1,1)d).AS.10 |
159fc0 | 28 31 ff 2c 31 45 4c 45 c3 36 2c 37 2c 38 29 2c 28 39 2c 31 30 28 57 48 45 52 45 41 4c 54 45 52 | (1.,1ELE.6,7,8),(9,10(WHEREALTER |
159fe0 | 31 31 2c 31 32 29 29 0a 49 80 53 45 43 54 20 2a 80 ff ff ff 4d 60 64 61 74 61 0a 4f 4e 20 43 4f | 11,12)).I.SECT.*....M`data.ON.CO |
15a000 | 0d 00 00 00 22 00 4d 00 1e f6 1e 14 1d 1a 1c 20 1b 1c 1a 18 19 1e 18 44 17 60 16 86 15 f8 14 f7 | ....".M................D.`...... |
15a020 | 13 fd 13 1e 12 8e 11 fe 11 01 10 74 0f 77 0e 7d 0d 7c 0c 7b 0b 6e 0a 6a 09 69 08 68 07 64 06 59 | ...........t.w.}.|.{.n.j.i.h.d.Y |
15a040 | 05 55 04 51 03 54 02 5a 01 4e 00 4d 00 81 7d 93 2a 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c | .U.Q.T.Z.N.M..}.*....CREATE.TABL |
15a060 | 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 | E.t2(a,b,c,d,PRIMARY.KEY(d))WITH |
15a080 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
15a0a0 | 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 | 2bc.ON.t2(b,c);.INSERT.INTO.t2(a |
15a0c0 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 32 30 30 31 2d 30 31 2d 30 31 38 | ,b,c,d).VALUES(1,2,3,2001-01-018 |
15a0e0 | 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f | ),(9,2,3,10),(11,12,13,14).ON.CO |
15a100 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=a+10 |
15a120 | 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 | 00;.SELECT.*,.'x'.FROM.t2.GROUP. |
15a140 | 42 59 20 7a 65 72 6f 62 6c 6f 62 28 31 29 82 08 93 29 04 00 84 15 43 52 45 41 54 45 20 54 41 42 | BY.zeroblob(1)...)....CREATE.TAB |
15a160 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
15a180 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
15a1a0 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
15a1c0 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 32 30 30 31 2d 30 31 2d 30 31 | a,b,c,d).VALUES(1,2,3,2001-01-01 |
15a1e0 | 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 | 8),(9,2,3,.total_changes()).ON.C |
15a200 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
15a220 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 3f 2c 31 29 | 000;.SELECT.*,.group_concat(?,1) |
15a240 | 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 93 28 04 00 | .'x'.FROM.t2.ORDER.BY.+a;..v.(.. |
15a260 | 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .qCREATE.TABLE.t2(a,b,c,d,PRIMAR |
15a280 | 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | Y.KEY(d))WITHOUT.ROWID;.CREATE.U |
15a2a0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t2bc.ON.t2(b,c);.INS |
15a2c0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t2(a,b,c,d).VALUES(1,2, |
15a2e0 | 33 2c 32 30 30 31 2d 30 31 2d 30 31 38 29 2c 28 39 2c 32 2c 20 6a 73 6f 6e 5f 74 79 70 65 28 31 | 3,2001-01-018),(9,2,.json_type(1 |
15a300 | 2c 31 29 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,1),14).ON.CONFLICT(c,b).DO.UPDA |
15a320 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
15a340 | 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 79 93 27 04 00 83 77 43 52 45 41 | ROM.t2.ORDER.BY.+a;..y.'...wCREA |
15a360 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
15a380 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
15a3a0 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c);.INSERT.IN |
15a3c0 | 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 32 30 30 31 | TO.t2(a,b,c,d).VALUES(1,2,3,2001 |
15a3e0 | 2d 30 31 2d 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 | -01-.sqlite_compileoption_get(1) |
15a400 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
15a420 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 | .a=a+1000;.SELECT.*,.'x'.FROM.t2 |
15a440 | 20 4f 52 44 45 52 20 42 59 2b 32 20 44 45 53 43 0a 82 00 93 26 04 00 84 05 43 52 45 41 54 45 20 | .ORDER.BY+2.DESC....&....CREATE. |
15a460 | 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | TABLE.t2(a,b,c,d,PRIMARY.KEY(d)) |
15a480 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
15a4a0 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
15a4c0 | 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 20 72 74 72 69 6d 28 39 2c 31 29 2c 36 | t2(a,b,c,d).VALUES(.rtrim(9,1),6 |
15a4e0 | 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 | ,7,.zeroblob(12001-01-01)),(11,1 |
15a500 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
15a520 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
15a540 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 93 25 04 00 84 05 43 52 45 | FROM.t2.ORDER.BY.+a;....%....CRE |
15a560 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t2(a,b,c,d,PRIMARY.KEY |
15a580 | 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | (d))WITHOUT.ROWID;.CREATE.UNIQUE |
15a5a0 | 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 | .INDEX.t2bc.ON.t2(b,c);.INSERT.I |
15a5c0 | 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 20 72 74 72 69 6d 28 31 2c | NTO.t2(a,b,c,d).VALUES(.rtrim(1, |
15a5e0 | 31 29 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 43 4f 4c | 1),6,7,.zeroblob(12001-01-01)COL |
15a600 | 4c 41 54 45 20 6e 6f 63 61 73 65 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | LATE.nocase).ON.CONFLICT(c,b).DO |
15a620 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15a640 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 07 93 24 04 00 84 | 'x'.FROM.t2.ORDER.BY.+a;....$... |
15a660 | 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | .CREATE.TABLE.t2(a,b,c,d,PRIMARY |
15a680 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
15a6a0 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
15a6c0 | 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 20 72 74 72 69 | RT.INTO.t2(a,b,c,d).VALUES(.rtri |
15a6e0 | 6d 28 31 2c 31 29 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 | m(1,1),6,7,.zeroblob(12001-01-01 |
15a700 | 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | )),(11,12,13,14).ON.CONFLICT(c,b |
15a720 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
15a740 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 52 45 49 4e | .*,.'x'.FROM.t2.ORDER.BY.+a;REIN |
15a760 | 44 45 58 0a 82 00 93 23 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c | DEX....#....CREATE.TABLE.t2(a,b, |
15a780 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | c,d,PRIMARY.KEY(d))WITHOUT.ROWID |
15a7a0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 | ;.CREATE.UNIQUE.INDEX.t2bc.ON.t2 |
15a7c0 | 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 | (b,c);.INSERT.INTO.t2(a,b,c,d).V |
15a7e0 | 41 4c 55 45 53 28 20 72 74 72 69 6d 28 31 2c 31 29 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 | ALUES(.rtrim(1,1),6,7,.zeroblob( |
15a800 | 31 32 30 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 12001-01-01)),(11,12,13,14).ON.C |
15a820 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
15a840 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 00 4f 52 44 45 52 | 000;.SELECT.*,.'x'.FROM.t2.ORDER |
15a860 | 20 42 59 20 2b 61 3b 0a 81 7d 93 22 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | .BY.+a;..}."....CREATE.TABLE.t2( |
15a880 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 | a,b,c,d,PRIMARY.KEY(d))WITHOUT.R |
15a8a0 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t2bc.O |
15a8c0 | 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 2c | N.t2(b,c);.INSERT.INTO.t2(a,b,a, |
15a8e0 | 64 29 20 56 41 4c 55 45 53 28 39 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | d).VALUES(9,2,3,4),(5,6,7,8),(9, |
15a900 | 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | 2,3,10),(11,12,13,14).ON.CONFLIC |
15a920 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
15a940 | 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 | ELECT.*,.'x'.FROM.t2.ORDER.BY.+a |
15a960 | 3b 52 45 49 4e 44 45 58 0a 81 7d 93 21 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | ;REINDEX..}.!....CREATE.TABLE.t2 |
15a980 | 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 | (a,b,c,d,PRIMARY.KEY(d))WITHOUT. |
15a9a0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 | ROWID;.CREATE.UNIQUE.INDEX.t2bc. |
15a9c0 | 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 | ON.t2(b,c);.INSERT.INTO.t2(a,b,a |
15a9e0 | 2c 64 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 35 2c 36 2c 37 2c 38 29 2c 28 39 | ,d).VALUES(2001-01-015,6,7,8),(9 |
15aa00 | 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 | ,2,3,10),(11,12,13,14).ON.CONFLI |
15aa20 | 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a | CT(c,b).DO.UPDATE.SET.a=a+1000;. |
15aa40 | 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b | SELECT.*,.'x'.FROM.t2.ORDER.BY.+ |
15aa60 | 61 3b 52 45 49 4e 44 45 58 0a 82 00 93 20 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | a;REINDEX.........CREATE.TABLE.t |
15aa80 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
15aaa0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
15aac0 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,b, |
15aae0 | 61 2c 64 29 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 32 2c 33 2c 34 29 2c 28 | a,d).VALUES(2001-01-011,2,3,4),( |
15ab00 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | 5,6,7,8),(9,2,3,10),(11,12,13,14 |
15ab20 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
15ab40 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 | .a=a+1000;.SELECT.*,.'x'.FROM.t2 |
15ab60 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 09 93 1f 04 00 84 17 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;.........CREATE.TAB |
15ab80 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
15aba0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
15abc0 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
15abe0 | 61 2c 62 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | a,b,a,d).VALUES(1,2,3,4),(5,6,7, |
15ac00 | 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 8),(9,2,3,10),(11,12,13,14).ON.C |
15ac20 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
15ac40 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 | 000;.SELECT.*,.'x'.FROM.t2.ORDER |
15ac60 | 20 42 59 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 2b 61 3b 0a 81 7d 93 1e 04 | .BY.sqlite_source_id().+a;..}... |
15ac80 | 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t2(a,b,c,d,PRIMA |
15aca0 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
15acc0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
15ace0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,a,d).VALUES(1,2 |
15ad00 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
15ad20 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
15ad40 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
15ad60 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 32 30 30 31 2d 30 31 2d 30 31 0a 81 7d 93 1d | FROM.t2.ORDER.BY.2001-01-01..}.. |
15ad80 | 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ....CREATE.TABLE.t2(a,b,c,d,PRIM |
15ada0 | 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(d))WITHOUT.ROWID;.CREATE |
15adc0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);.I |
15ade0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t2(a,b,a,d).VALUES(1, |
15ae00 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
15ae20 | 2e 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | .2,13,14).ON.CONFLICT(c,b).DO.UP |
15ae40 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | DATE.SET.a=a+1000;.SELECT.*,.'x' |
15ae60 | 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 52 45 49 4e 44 45 58 0a 81 76 93 | .FROM.t2.ORDER.BY.+a;REINDEX..v. |
15ae80 | 1c 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | ....qCREATE.TABLE.t2(a,b,c,d,PRI |
15aea0 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
15aec0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
15aee0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(a,b,a,d).VALUES(1 |
15af00 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 30 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(0,2,3,10),(11 |
15af20 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
15af40 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
15af60 | 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 79 93 1b 04 00 83 77 43 | '.FROM.t2.ORDER.BY.+a;..y.....wC |
15af80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t2(a,b,c,d,PRIMARY.K |
15afa0 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
15afc0 | 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t2bc.ON.t2(b,c);.INSERT |
15afe0 | 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 20 2d 31 31 2c 32 2c | .INTO.t2(a,b,a,d).VALUES(.-11,2, |
15b000 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
15b020 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
15b040 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
15b060 | 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 09 93 1a 04 00 82 17 43 52 45 41 | ROM.t2.ORDER.BY.+a;.........CREA |
15b080 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
15b0a0 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
15b0c0 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 62 2c 63 2c 64 29 00 56 41 4c 55 45 53 | INDEX.t2bc.ON.t2(b,b,c,d).VALUES |
15b0e0 | 2c 36 2c e7 e7 e7 e7 e7 e7 e7 e7 e7 e7 e7 e7 e7 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b | ,6,..............t2.ORDER.BY.+a; |
15b100 | 0a 81 79 93 19 04 00 83 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ..y.....wCREATE.TABLE.t2(a,b,c,d |
15b120 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15b140 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15b160 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | b);.INSERT.INTO.t2(a,b,c,d).VALU |
15b180 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 | ES(1,2,3,4),(5,6,7,8),(9,2,3,10) |
15b1a0 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15b1c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
15b1e0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 32 20 64 61 79 73 0a 81 0c | ,.'x'.FROM.t2.ORDER.BY+2.days... |
15b200 | 93 18 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 | ......CREATE.TABLE.t2(a,b,c,d,PR |
15b220 | 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(d))WITHOUT.ROWID;.CREA |
15b240 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 20 6a 73 | TE.UNIQUE.INDEX.t2bc.ON.t2(b,.js |
15b260 | 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 ac | on_replace(1,1,1)COLLATE.nocase. |
15b280 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 81 0c 93 17 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 | b,c,d).VALUES(........CREATE.TAB |
15b2a0 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
15b2c0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
15b2e0 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 31 2c 31 2c 31 | t2bc.ON.t2(b,.json_replace(1,1,1 |
15b300 | 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 81 5b | )COLLATE.nocase,b,c,d).VALUES(.[ |
15b320 | 93 16 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 | .....;CREATE.TABLE.t2(a,b,c,d,PR |
15b340 | 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(d))WITHOUT.ROWID;.CREA |
15b360 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 35 2c 36 2c 37 | TE.UNIQUE.INDEX.t2bc.ON.t2(5,6,7 |
15b380 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 55 4e 49 51 55 45 20 49 41 4c 55 45 53 28 | ,8),(9,2,3,10),(11UNIQUE.IALUES( |
15b3a0 | 31 2c 54 48 4f 55 54 20 52 4f 57 49 44 3b 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 | 1,THOUT.ROWID;7,8),(9,2,3,10),(1 |
15b3c0 | 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 67 67 67 67 67 67 67 67 67 4e 20 43 4f 4e 46 4c 49 43 54 | 1,12,13,14).OgggggggggN.CONFLICT |
15b3e0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 64 00 30 3b 0a 81 76 93 | (c,b).DO.UPDATE.SET.a=a+d.0;..v. |
15b400 | 15 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | ....qCREATE.TABLE.t2(a,b,c,d,PRI |
15b420 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
15b440 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 20 2d 31 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(.-1);. |
15b460 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(a,b,c,d).VALUES(1 |
15b480 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 2d 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(-1 |
15b4a0 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
15b4c0 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT.*,.'x |
15b4e0 | 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7d 93 14 04 00 83 7f 43 | '.FROM.t2.ORDER.BY.+a;..}......C |
15b500 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t2(a,b,c,d,PRIMARY.K |
15b520 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
15b540 | 55 45 20 49 4e 44 45 58 20 20 60 61 60 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX..`a`.ON.t2(b,c);.INSERT |
15b560 | 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t2(a,b,c,d).VALUES(1,2,3,4 |
15b580 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 | ),(5,6,7,8),(9,2,3,10),(11,12,13 |
15b5a0 | 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,14).ON.CONFLICT(c,b).DO.UPDATE. |
15b5c0 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | SET.a=a+1000;.SELECT.*,.'x'.FROM |
15b5e0 | 20 74 32 20 4f 52 44 54 20 49 4e 44 45 58 45 44 20 42 59 20 60 61 60 0a 81 0a 93 13 04 00 82 19 | .t2.ORDT.INDEXED.BY.`a`......... |
15b600 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t2(a,b,c,d,PRIMARY. |
15b620 | 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 2b 0a 43 52 29 0a 4f 4e 20 43 4f 4e | KEY(d))WITHOUT.ROWID+.CR).ON.CON |
15b640 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
15b660 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 | 0;.SELECT.*,.'x'.FROM.t2.ORDER.B |
15b680 | 59 20 2b 61 3b 0a 81 56 93 12 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c | Y.+a;..V.....1CREATE.TABLE.t2(a, |
15b6a0 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(c))WITHOUT.ROW |
15b6c0 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
15b6e0 | 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 | t2(c,c);.INSERT.INTO.t2(a,b,c,d) |
15b700 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c | .VALUES(1,2,3,4),(5,6,7,8),(9,2, |
15b720 | 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 3,10),(11,12,13,14).ON.CONFLICT( |
15b740 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 3b 0a | c,b).DO.UPDATE.SET.a=a+1000;.S;. |
15b760 | 81 60 93 11 04 00 83 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | .`.....ECREATE.TABLE.t2(a,b,c,d, |
15b780 | 50 52 49 4d 41 52 59 20 4b 45 59 28 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(c))WITHOUT.ROWID;.CR |
15b7a0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(c,c |
15b7c0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(a,b,c,d).VALUE |
15b7e0 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 32 30 30 31 2d 30 31 2d 30 31 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,2001-01-013,10), |
15b800 | 28 31 31 2c 31 32 2c 32 30 30 31 2d 30 31 2d 30 31 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | (11,12,2001-01-0113,14).ON.CONFL |
15b820 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
15b840 | 0a 53 3b 0a 81 56 93 10 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c | .S;..V.....1CREATE.TABLE.t2(a,b, |
15b860 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 63 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | c,d,PRIMARY.KEY(c))WITHOUT.ROWID |
15b880 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 | ;.CREATE.UNIQUE.INDEX.t2bc.ON.t2 |
15b8a0 | 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 | (c,c);.INSERT.INTO.t2(a,b,c,d).V |
15b8c0 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 32 30 30 31 2d 30 31 2d 30 31 33 2c | ALUES(1,2,3,4),(5,6,2001-01-013, |
15b8e0 | 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | 10),(11,12,13,14).ON.CONFLICT(c, |
15b900 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 3b 0a 81 76 | b).DO.UPDATE.SET.a=a+1000;.S;..v |
15b920 | 93 0f 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 | .....qCREATE.TABLE.t2(a,b,c,d,PR |
15b940 | 49 4d 41 52 59 20 4b 45 59 28 62 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(b))WITHOUT.ROWID;.CREA |
15b960 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b | TE.UNIQUE.INDEX.t2bc.ON.t2(c,c); |
15b980 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t2(a,b,c,d).VALUES( |
15b9a0 | 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 | 1,2,3,4),(5,6,7,8),(9,2,3,10),(1 |
15b9c0 | 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 | 1,12,13,14).ON.CONFLICT(c,b).DO. |
15b9e0 | 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 | UPDATE.SET.a=a+1000;.SELECT.*,.' |
15ba00 | 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 93 0e 04 00 84 05 | x'.FROM.t2.ORDER.BY.+a;......... |
15ba20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t2(a,b,c,d,PRIMARY. |
15ba40 | 4b 45 59 28 62 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 | KEY(b))WITHOUT.ROWID;.CREATE.UNI |
15ba60 | 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 45 58 50 4c 41 49 | QUE.INDEX.t2bc.ON.t2(b,c);EXPLAI |
15ba80 | 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | N.INSERT.INTO.t2(a,b,c,d).VALUES |
15baa0 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
15bac0 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
15bae0 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15bb00 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 32 20 44 45 53 43 0a 82 00 93 0d | 'x'.FROM.t2.ORDER.BY+2.DESC..... |
15bb20 | 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ....CREATE.TABLE.t2(a,b,c,d,PRIM |
15bb40 | 41 52 59 20 4b 45 59 28 62 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(b))WITHOUT.ROWID;.CREATE |
15bb60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);.I |
15bb80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t2(a,b,c,d).VALUES(1, |
15bba0 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 37 32 30 30 31 2d 30 31 | 2,3,4),(5,6,7,.zeroblob(72001-01 |
15bbc0 | 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | -01)),(11,12,13,14).ON.CONFLICT( |
15bbe0 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c | c,b).DO.UPDATE.SET.a=a+1000;.SEL |
15bc00 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | ECT.*,.'x'.FROM.t2.ORDER.BY.+a;. |
15bc20 | 81 76 93 0c 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | .v.....qCREATE.TABLE.t2(a,b,c,d, |
15bc40 | 50 52 49 4d 41 52 59 20 4b 45 59 28 61 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(a))WITHOUT.ROWID;.CR |
15bc60 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(c,c |
15bc80 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(a,b,c,d).VALUE |
15bca0 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,7,8),(9,2,3,10), |
15bcc0 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
15bce0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c | O.UPDATE.SET.a=a+1000;.SELECT.*, |
15bd00 | 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 93 0b 04 00 | .'x'.FROM.t2.ORDER.BY.+a;..v.... |
15bd20 | 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .qCREATE.TABLE.t2(a,b,c,d,PRIMAR |
15bd40 | 59 20 4b 45 59 28 61 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | Y.KEY(a))WITHOUT.ROWID;.CREATE.U |
15bd60 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t2bc.ON.t2(b,c);.INS |
15bd80 | 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t2(a,b,a,d).VALUES(1,2, |
15bda0 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
15bdc0 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
15bde0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
15be00 | 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 5e 93 0a 04 00 83 41 43 52 45 41 | ROM.t2.ORDER.BY.+a;..^.....ACREA |
15be20 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 20 63 68 61 72 28 31 29 2c 50 52 49 4d | TE.TABLE.t2(a,b,c,d.char(1),PRIM |
15be40 | 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(d))WITHOUT.ROWID;.CREATE |
15be60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);.I |
15be80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t2(a,b,c,d).VALUES(1, |
15bea0 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
15bec0 | 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | 12,13,14).ON.CONFLICT(c,b).DO.UP |
15bee0 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 3b 0a 82 06 93 09 04 00 84 11 43 52 | DATE.SET.a=a+1000;.S;.........CR |
15bf00 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 20 63 68 61 72 28 31 29 2c 64 2c 50 52 | EATE.TABLE.t2(a,b,c.char(1),d,PR |
15bf20 | 49 4d 41 52 59 20 4b 45 59 28 61 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(a))WITHOUT.ROWID;.CREA |
15bf40 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b | TE.UNIQUE.INDEX.t2bc.ON.t2(b,c); |
15bf60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t2(a,b,c,d).VALUES( |
15bf80 | 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 | 1,2,3,4),(5,6,7,8),(9,2,3,10),(1 |
15bfa0 | 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 | 1,12,13,14).ON.CONFLICT(c,b).DO. |
15bfc0 | 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 | UPDATE.SET.a=a+1000;.SELECT.DIST |
15bfe0 | 49 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | INCT*,.'x'.FROM.t2.ORDER.BY.+a;. |
15c000 | 0d 00 00 00 1f 00 97 00 1e f6 1d f9 1c ff 1c 01 1a fd 1a 03 19 01 18 07 17 0d 16 01 15 07 13 fb | ................................ |
15c020 | 13 01 12 07 11 06 10 02 0e f8 0d f4 0c f0 0b ec 0a e1 09 d7 08 d3 07 cf 06 ce 05 c3 04 c2 03 bf | ................................ |
15c040 | 02 af 01 a3 00 97 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 08 93 49 04 00 84 15 43 | ..........................I....C |
15c0a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t2(a,b,c,d,PRIMARY.K |
15c0c0 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
15c0e0 | 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t2bc.ON.t2(b,c);.INSERT |
15c100 | 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t2(a,b,c,d).VALUES(1,2,3,4 |
15c120 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 | ),(5,6,7,8),(9,2,3,.total_change |
15c140 | 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | s()).ON.CONFLICT(c,b).DO.UPDATE. |
15c160 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f | SET.a=a+1000;.SELECT.*,.group_co |
15c180 | 6e 63 61 74 28 31 2c 3f 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b | ncat(1,?).'x'.FROM.t2.ORDER.BY.+ |
15c1a0 | 61 3b 0a 82 08 93 48 04 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 | a;....H....CREATE.TABLE.t2(a,b,c |
15c1c0 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | ,d,PRIMARY.KEY(d))WITHOUT.ROWID; |
15c1e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 | .CREATE.UNIQUE.INDEX.t2bc.ON.t2( |
15c200 | 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 | b,c);.INSERT.INTO.t2(a,b,c,d).VA |
15c220 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 | LUES(1,2,3,4),(5,6,7,8),(9,2,3,. |
15c240 | 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | total_changes()).ON.CONFLICT(c,b |
15c260 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
15c280 | 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 | .*,.group_concat(1,1).'x'.FROM.t |
15c2a0 | 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 82 0c 93 47 04 00 84 1d 43 52 45 41 54 45 20 54 41 | 2.GROUP.BY.+a;....G....CREATE.TA |
15c2c0 | 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 | BLE.t2(a,b,c,d,PRIMARY.KEY(d))WI |
15c2e0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
15c300 | 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | .t2bc.ON.t2(b,c);.INSERT.INTO.t2 |
15c320 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
15c340 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 | ,8),(9,2,3,.total_changes()).ON. |
15c360 | 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b | CONFLICT(c,b).DO.UPDATE.SET.a=a+ |
15c380 | 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 20 61 2c | 1000;.SELECT.*,.group_concat(.a, |
15c3a0 | 62 31 3c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 | b1<1).'x'.FROM.t2.ORDER.BY.+a;.. |
15c3c0 | 7f 93 46 04 00 84 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | ..F....CREATE.TABLE.t2(a,b,c,d,P |
15c3e0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
15c400 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
15c420 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
15c440 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 | (1,2,3,4),(5,6,7,8),(9,2,3,.tota |
15c460 | 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | l_changes()).ON.CONFLICT(c,b).DO |
15c480 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15c4a0 | 63 6f 75 6e 74 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 | count(1).'x'.FROM.t2.ORDER.BY.+a |
15c4c0 | 3b 0a 81 7d 93 45 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c | ;..}.E....CREATE.TABLE.t2(a,b,c, |
15c4e0 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | d,PRIMARY.KEY(d))WITHOUT.ROWID;. |
15c500 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 | CREATE.UNIQUE.INDEX.t2bc.ON.t2(b |
15c520 | 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | ,c);.INSERT.INTO.t2(a,b,c,d).VAL |
15c540 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 | UES(1,2,3,4),(5,6,7,8),(9,2,3,.t |
15c560 | 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 | otal_changes()).ON.CONFLICT(c,b) |
15c580 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
15c5a0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 32 30 30 31 35 30 31 2d | *,.'x'.FROM.t2.ORDER.BY.2001501- |
15c5c0 | 30 31 0a 82 07 93 44 04 00 84 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 | 01....D....CREATE.TABLE.t2(a,b,c |
15c5e0 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | ,d,PRIMARY.KEY(d))WITHOUT.ROWID; |
15c600 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 | .CREATE.UNIQUE.INDEX.t2bc.ON.t2( |
15c620 | 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 | b,c);.INSERT.INTO.t2(a,b,c,d).VA |
15c640 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 | LUES(1,2,3,4),(5,6,7,8),(9,2,3,. |
15c660 | 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | total_changes()).ON.CONFLICT(c,b |
15c680 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
15c6a0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 32 30 30 31 32 30 30 | .*,.'x'.FROM.t2.ORDER.BY.2001200 |
15c6c0 | 31 2d 30 31 2d 30 31 2d 30 31 2d 30 31 0a 81 7d 93 43 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 | 1-01-01-01-01..}.C....CREATE.TAB |
15c6e0 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
15c700 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
15c720 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
15c740 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | a,b,c,d).VALUES(1,2,3,4),(5,6,7, |
15c760 | 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 | 8),(9,2,3,.total_changes()).ON.C |
15c780 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
15c7a0 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 | 000;.SELECT.*,.'x'.FROM.t2.ORDER |
15c7c0 | 20 42 59 20 32 30 30 31 2d 30 31 2d 30 31 0a 82 00 93 42 04 00 84 05 43 52 45 41 54 45 20 54 41 | .BY.2001-01-01....B....CREATE.TA |
15c7e0 | 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 | BLE.t2(a,b,c,d,PRIMARY.KEY(d))WI |
15c800 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
15c820 | 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | .t2bc.ON.t2(b,c);.INSERT.INTO.t2 |
15c840 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
15c860 | 2c 20 7a 65 72 6f 62 6c 6f 62 28 37 32 30 30 31 45 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c | ,.zeroblob(72001E01-01)),(11,12, |
15c880 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
15c8a0 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | E.SET.a=a+1000;.SELECT.*,.'x'.FR |
15c8c0 | 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 93 41 04 00 84 05 43 52 45 41 54 | OM.t2.ORDER.BY.+a;....A....CREAT |
15c8e0 | 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | E.TABLE.t2(a,b,c,d,PRIMARY.KEY(d |
15c900 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
15c920 | 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t2bc.ON.t2(b,c);.INSERT.INT |
15c940 | 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t2(a,b,c,d).VALUES(1,2,3,4),(5 |
15c960 | 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 37 32 30 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 | ,6,7,.zeroblob(72001-01-01)),(11 |
15c980 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
15c9a0 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 aa 2c 20 27 78 | PDATE.SET.a=a+1000;.SELECT..,.'x |
15c9c0 | 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 06 93 40 04 00 84 11 43 | '.FROM.t2.ORDER.BY.+a;....@....C |
15c9e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t2(a,b,c,d,PRIMARY.K |
15ca00 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
15ca20 | 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t2bc.ON.t2(b,c);.INSERT |
15ca40 | 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t2(a,b,c,d).VALUES(1,2,3,4 |
15ca60 | 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 37 32 30 30 31 2d 30 31 2d 30 31 29 29 | ),(5,6,7,.zeroblob(72001-01-01)) |
15ca80 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15caa0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
15cac0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 56 41 43 55 55 4d | ,.'x'.FROM.t2.ORDER.BY.+a;VACUUM |
15cae0 | 0a 82 07 93 3f 04 00 84 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ....?....CREATE.TABLE.t2(a,b,c,d |
15cb00 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15cb20 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15cb40 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15cb60 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 37 32 30 | ES(1,2,3,4),(5,6,7,.zeroblob(720 |
15cb80 | 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | 01-01-01)),(11,12,13,14).ON.CONF |
15cba0 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
15cbc0 | 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 | ;.SELECT.*,.'x'.FROM.t2.ORDER.BY |
15cbe0 | 20 2b 61 3b 52 45 49 4e 44 45 58 0a 82 00 93 3e 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 | .+a;REINDEX....>....CREATE.TABLE |
15cc00 | 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | .t2(a,b,c,d,PRIMARY.KEY(d))WITHO |
15cc20 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
15cc40 | 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(b,c);.INSERT.INTO.t2(a, |
15cc60 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a | b,c,d).VALUES(1,2,3,4),(5,6,7,.z |
15cc80 | 65 72 6f 62 6c 6f 62 28 37 32 30 30 0d 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c | eroblob(7200.-01-01)),(11,12,13, |
15cca0 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
15ccc0 | 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | ET.a=a+1000;.SELECT.*,.'x'.FROM. |
15cce0 | 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 93 3d 04 00 84 05 43 52 45 41 54 45 20 54 | t2.ORDER.BY.+a;....=....CREATE.T |
15cd00 | 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 | ABLE.t2(a,b,c,d,PRIMARY.KEY(d))W |
15cd20 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
15cd40 | 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t2bc.ON.t2(b,c);.INSERT.INTO.t |
15cd60 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
15cd80 | 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 37 32 30 2e 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 | 7,.zeroblob(720.1-01-01)),(11,12 |
15cda0 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
15cdc0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 | TE.SET.a=a+1000;.SELECT.*,.'x'.F |
15cde0 | 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 93 3c 04 00 84 05 43 52 45 41 | ROM.t2.ORDER.BY.+a;....<....CREA |
15ce00 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
15ce20 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
15ce40 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c);.INSERT.IN |
15ce60 | 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t2(a,b,c,d).VALUES(1,2,3,4),( |
15ce80 | 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 36 30 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 | 5,6,7,.zeroblob(16001-01-01)),(1 |
15cea0 | 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 | 1,12,13,14).ON.CONFLICT(c,b).DO. |
15cec0 | 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 | UPDATE.SET.a=a+1000;.SELECT.*,.' |
15cee0 | 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 06 93 3b 04 00 84 11 | x'.FROM.t2.ORDER.BY.+a;....;.... |
15cf00 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t2(a,b,c,d,PRIMARY. |
15cf20 | 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 | KEY(d))WITHOUT.ROWID;.CREATE.UNI |
15cf40 | 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 | QUE.INDEX.t2bc.ON.t2(b,c);.INSER |
15cf60 | 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c | T.INTO.t2(a,b,c,d).VALUES(1,2,3, |
15cf80 | 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 | 4),(5,6,7,.zeroblob(12001-01-01) |
15cfa0 | 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 | ),(11,12,13,14).ON.CONFLICT(c,b) |
15cfc0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
15cfe0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 56 41 43 55 55 | *,.'x'.FROM.t2.ORDER.BY.+a;VACUU |
15d000 | 4d 0a 82 00 93 3a 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c | M....:....CREATE.TABLE.t2(a,b,c, |
15d020 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | d,PRIMARY.KEY(d))WITHOUT.ROWID;. |
15d040 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 | CREATE.UNIQUE.INDEX.t2bc.ON.t2(b |
15d060 | 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | ,c);.INSERT.INTO.t2(a,b,c,d).VAL |
15d080 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 32 | UES(1,2,3,4),(5,6,7,.zeroblob(12 |
15d0a0 | 30 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | 001-01-01)),(11,12,13,14).ON.CON |
15d0c0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
15d0e0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 00 4f 52 44 45 52 20 42 | 0;.SELECT.*,.'x'.FROM.t2.ORDER.B |
15d100 | 59 20 2b 61 3b 0a 81 7d 93 39 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c | Y.+a;..}.9....CREATE.TABLE.t2(a, |
15d120 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(d))WITHOUT.ROW |
15d140 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
15d160 | 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 | t2(b,c);.INSERT.INTO.t2(a,b,c,d) |
15d180 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f | .VALUES(1,2,3,4),(5,6,7,.zeroblo |
15d1a0 | 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | b(1)),(11,12,13,14).ON.CONFLICT( |
15d1c0 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 45 58 50 4c | c,b).DO.UPDATE.SET.a=a+1000;EXPL |
15d1e0 | 41 49 4e 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 | AIN.SELECT.*,.'x'.FROM.t2.GROUP. |
15d200 | 42 59 20 2b 61 3b 0a 81 76 93 38 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | BY.+a;..v.8...qCREATE.TABLE.t2(a |
15d220 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
15d240 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
15d260 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(a,b,c,d |
15d280 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c | ).VALUES(1,2,3,4),(5,6,7,.zerobl |
15d2a0 | 6f 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ob(1)),(11,12,13,14).ON.CONFLICT |
15d2c0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
15d2e0 | 4c 45 43 54 20 73 75 6d 28 31 29 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b | LECT.sum(1).FROM.t2.GROUP.BY.+a; |
15d300 | 0a 81 76 93 37 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ..v.7...qCREATE.TABLE.t2(a,b,c,d |
15d320 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15d340 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15d360 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15d380 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 29 | ES(1,2,3,4),(5,6,7,.zeroblob(1)) |
15d3a0 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15d3c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 41 | DO.UPDATE.SET.a=a+1000;.SELECT.A |
15d3e0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 82 08 93 36 04 | ,.'x'.FROM.t2.GROUP.BY.+a;....6. |
15d400 | 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t2(a,b,c,d,PRIMA |
15d420 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
15d440 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
15d460 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
15d480 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,.zeroblob(1)),(11,1 |
15d4a0 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
15d4c0 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 | ATE.SET.a=a+1000;.SELECT.*,.grou |
15d4e0 | 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 | p_concat(1,1).'x'.FROM.t2.GROUP. |
15d500 | 42 59 20 2b 61 3b 0a 81 76 93 35 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | BY.+a;..v.5...qCREATE.TABLE.t2(a |
15d520 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
15d540 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
15d560 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(a,b,c,d |
15d580 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c | ).VALUES(1,2,3,4),(5,6,7,.zerobl |
15d5a0 | 6f 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ob(1)),(11,12,13,14).ON.CONFLICT |
15d5c0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
15d5e0 | 4c 45 43 54 20 2a 2c 20 62 2c 62 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b | LECT.*,.b,b.FROM.t2.GROUP.BY.+a; |
15d600 | 0a 82 08 93 34 04 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ....4....CREATE.TABLE.t2(a,b,c,d |
15d620 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15d640 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15d660 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15d680 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 29 | ES(1,2,3,4),(5,6,7,.zeroblob(1)) |
15d6a0 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15d6c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
15d6e0 | 2c 20 61 2c 62 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 73 74 72 66 74 69 6d 65 28 | ,.a,b.FROM.t2.GROUP.BY.strftime( |
15d700 | 31 2c 31 2c 31 2c 31 29 20 2b 61 3b 0a 81 76 93 33 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c | 1,1,1,1).+a;..v.3...qCREATE.TABL |
15d720 | 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 | E.t2(a,b,c,d,PRIMARY.KEY(d))WITH |
15d740 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
15d760 | 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 | 2bc.ON.t2(b,c);.INSERT.INTO.t2(a |
15d780 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,. |
15d7a0 | 7a 65 72 6f 62 6c 6f 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f | zeroblob(1)),(11,12,13,14).ON.CO |
15d7c0 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=a+10 |
15d7e0 | 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 2a 2c 62 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 | 00;.SELECT.*,.*,b.FROM.t2.GROUP. |
15d800 | 42 59 20 2b 61 3b 0a 81 76 93 32 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | BY.+a;..v.2...qCREATE.TABLE.t2(a |
15d820 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
15d840 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
15d860 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(a,b,c,d |
15d880 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c | ).VALUES(1,2,3,4),(5,6,7,.zerobl |
15d8a0 | 6f 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ob(1)),(11,12,13,14).ON.CONFLICT |
15d8c0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
15d8e0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 3f 2b 61 3b | LECT.*,.'x'.FROM.t2.GROUP.BY?+a; |
15d900 | 0a 81 7e 93 31 04 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ..~.1....CREATE.TABLE.t2(a,b,c,d |
15d920 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15d940 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15d960 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15d980 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 29 | ES(1,2,3,4),(5,6,7,.zeroblob(1)) |
15d9a0 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15d9c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
15d9e0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 20 22 61 22 2c 22 62 22 | ,.'x'.FROM.t2.GROUP.BY.+."a","b" |
15da00 | 61 3b 0a 81 76 93 30 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 | a;..v.0...qCREATE.TABLE.t2(a,b,c |
15da20 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | ,d,PRIMARY.KEY(d))WITHOUT.ROWID; |
15da40 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 | .CREATE.UNIQUE.INDEX.t2bc.ON.t2( |
15da60 | 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 | b,c);.INSERT.INTO.t2(a,b,c,d).VA |
15da80 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 | LUES(1,2,3,4),(5,6,7,.zeroblob(1 |
15daa0 | 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | )),(11,12,13,14).ON.CONFLICT(c,b |
15dac0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
15dae0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 20 27 61 27 82 00 93 | .*,.'x'.FROM.t2.GROUP.BY..'a'... |
15db00 | 2f 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | /....CREATE.TABLE.t2(a,b,c,d,PRI |
15db20 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
15db40 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
15db60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(a,b,c,d).VALUES(1 |
15db80 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 72 6f 62 6c 6f 62 28 2e 32 30 30 31 2d 30 | ,2,3,4),(5,6,7,.zeroblob(.2001-0 |
15dba0 | 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 1-01)),(11,12,13,14).ON.CONFLICT |
15dbc0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
15dbe0 | 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b | LECT.*,.'x'.FROM.t2.ORDER.BY.+a; |
15dc00 | 0a 81 7a 93 2e 04 00 83 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ..z.....yCREATE.TABLE.t2(a,b,c,d |
15dc20 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15dc40 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15dc60 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15dc80 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 31 3d 31 38 29 2c 28 39 2c 32 2c 33 | ES(1,2,3,4),(5,6,7,.1=18),(9,2,3 |
15dca0 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
15dcc0 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
15dce0 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 | CT.*,.'x'.FROM.t2.ORDER.BY.+a;.. |
15dd00 | 76 93 2d 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | v.-...qCREATE.TABLE.t2(a,b,c,d,P |
15dd20 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
15dd40 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
15dd60 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
15dd80 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 27 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,',8),(9,2,3,10),( |
15dda0 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
15ddc0 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15dde0 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 79 93 2c 04 00 83 | 'x'.FROM.t2.ORDER.BY.+a;..y.,... |
15de00 | 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | wCREATE.TABLE.t2(a,b,c,d,PRIMARY |
15de20 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
15de40 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
15de60 | 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t2(a,b,c,d).VALUES(1,2,3 |
15de80 | 2c 32 30 30 31 2d 30 31 2d 30 31 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c | ,2001-01-018),(9,2,3,10),(11,12, |
15dea0 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
15dec0 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | E.SET.a=a+1000;.SELECT.*,.'x'.FR |
15dee0 | 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 32 20 44 45 53 43 0a 82 06 93 2b 04 00 84 11 43 52 | OM.t2.ORDER.BY+2.DESC....+....CR |
15df00 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t2(a,b,c,d,PRIMARY.KE |
15df20 | 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | Y(d))WITHOUT.ROWID;.CREATE.UNIQU |
15df40 | 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 | E.INDEX.t2bc.ON.t2(b,c);.INSERT. |
15df60 | 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 32 30 | INTO.t2(a,b,c,d).VALUES(1,2,3,20 |
15df80 | 30 31 2d 30 31 2d 30 31 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c | 01-01-018),(9,2,3,10),(11,12,13, |
15dfa0 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
15dfc0 | 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | ET.a=a+1000;.SELECT.*,.'x'.FROM. |
15dfe0 | 74 32 20 4f 52 44 45 52 20 42 59 20 72 6f 75 6e 64 28 31 2c 31 29 4c 49 4d 49 54 20 2d 31 3b 0a | t2.ORDER.BY.round(1,1)LIMIT.-1;. |
15e000 | 0d 00 00 00 1f 00 7f 00 1e f4 1d e8 1c dc 1b e2 1a e8 19 ee 18 ed 17 e7 16 ed 15 ea 14 f0 13 e1 | ................................ |
15e020 | 12 e4 11 df 10 db 0f c5 0e b3 0d b9 0c bf 0b c1 0a c0 09 bf 08 c5 07 c1 06 b7 05 a5 04 9b 03 91 | ................................ |
15e040 | 02 84 01 8a 00 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
15e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 | ................................ |
15e080 | 07 93 68 04 00 84 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | ..h....CREATE.TABLE.t2(a,b,c,d,P |
15e0a0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
15e0c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
15e0e0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
15e100 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
15e120 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
15e140 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15e160 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 32 20 43 4f 4c 4c 41 54 45 20 6e | 'x'.FROM.t2.ORDER.BY+2.COLLATE.n |
15e180 | 6f 63 61 73 65 7e 61 79 73 0a 81 76 93 67 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ocase~ays..v.g...qCREATE.TABLE.t |
15e1a0 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
15e1c0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
15e1e0 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,b, |
15e200 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
15e220 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
15e240 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
15e260 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b | .SELECT.*,.'x'.FROM.t2.ORDER.BY+ |
15e280 | 2b 61 3b 0a 82 09 93 66 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c | +a;....f....CREATE.TABLE.t2(a,b, |
15e2a0 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | c,d,PRIMARY.KEY(d))WITHOUT.ROWID |
15e2c0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 | ;.CREATE.UNIQUE.INDEX.t2bc.ON.t2 |
15e2e0 | 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 | (b,c);.INSERT.INTO.t2(a,b,c,d).V |
15e300 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c | ALUES(1,2,3,4),(5,6,7,8),(9,2,3, |
15e320 | 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | 10),(11,12,13,14).ON.CONFLICT(c, |
15e340 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 | b).DO.UPDATE.SET.a=a+1000;.SELEC |
15e360 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 73 71 6c 69 74 65 | T.*,.'x'.FROM.t2.ORDER.BY.sqlite |
15e380 | 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 2d 31 3b 0a 82 06 93 65 04 00 84 11 43 52 45 41 54 45 20 | _source_id().-1;....e....CREATE. |
15e3a0 | 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | TABLE.t2(a,b,c,d,PRIMARY.KEY(d)) |
15e3c0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
15e3e0 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
15e400 | 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t2(a,b,c,d).VALUES(1,2,3,4),(5,6 |
15e420 | 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f | ,7,8),(9,2,3,10),(11,12,13,14).O |
15e440 | 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | N.CONFLICT(c,b).DO.UPDATE.SET.a= |
15e460 | 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 | a+1000;.SELECT.*,.'x'.FROM.t2.OR |
15e480 | 44 45 52 20 42 59 20 72 6f 75 6e 64 28 31 2c 31 29 4c 49 4d 49 54 20 35 31 3b 0a 82 06 93 64 04 | DER.BY.round(1,1)LIMIT.51;....d. |
15e4a0 | 00 84 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t2(a,b,c,d,PRIMA |
15e4c0 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
15e4e0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
15e500 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
15e520 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
15e540 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
15e560 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
15e580 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 6f 75 6e 64 28 31 2c 31 29 4c 49 4d 49 54 | FROM.t2.ORDER.BY.round(1,1)LIMIT |
15e5a0 | 20 2d 31 3b 0a 82 0e 93 63 04 00 84 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | .-1;....c...!CREATE.TABLE.t2(a,b |
15e5c0 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
15e5e0 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
15e600 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(a,b,c,d). |
15e620 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
15e640 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
15e660 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
15e680 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 6f 75 6e 64 | CT.*,.'x'.FROM.t2.ORDER.BY.round |
15e6a0 | 28 31 2c 31 29 4c 49 4d 49 54 20 22 61 22 2c 22 62 22 20 2d 31 3b 0a 82 06 93 62 04 00 84 11 43 | (1,1)LIMIT."a","b".-1;....b....C |
15e6c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t2(a,b,c,d,PRIMARY.K |
15e6e0 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
15e700 | 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t2bc.ON.t2(b,c);.INSERT |
15e720 | 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t2(a,b,c,d).VALUES(1,2,3,4 |
15e740 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 | ),(5,6,7,8),(9,2,3,10),(11,12,13 |
15e760 | 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,14).ON.CONFLICT(c,b).DO.UPDATE. |
15e780 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d | SET.a=a+1000;.SELECT.*,.'x'.FROM |
15e7a0 | 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 6f 75 6e 64 28 31 2c 31 29 4c 49 4d 49 54 20 0d 31 3b | .t2.ORDER.BY.round(1,1)LIMIT..1; |
15e7c0 | 0a 82 00 93 61 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ....a....CREATE.TABLE.t2(a,b,c,d |
15e7e0 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15e800 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15e820 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15e840 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 | ES(1,2,3,4),(5,6,7,8),(9,2,3,10) |
15e860 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15e880 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
15e8a0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 35 32 30 30 31 2d 30 31 2d | ,.'x'.FROM.t2.ORDER.BY.52001-01- |
15e8c0 | 30 31 31 3b 0a 81 76 93 60 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | 011;..v.`...qCREATE.TABLE.t2(a,b |
15e8e0 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
15e900 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
15e920 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(a,b,c,d). |
15e940 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
15e960 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
15e980 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
15e9a0 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 35 31 3b 0a 81 | CT.*,.'x'.FROM.t2.ORDER.BY.51;.. |
15e9c0 | 7d 93 5f 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | }._....CREATE.TABLE.t2(a,b,c,d,P |
15e9e0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
15ea00 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
15ea20 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
15ea40 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
15ea60 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
15ea80 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15eaa0 | 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 7a 65 72 6f 62 6c 6f 62 28 31 29 | 'x'.FROM.t2.GROUP.BY.zeroblob(1) |
15eac0 | 81 7d 93 5e 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | .}.^....CREATE.TABLE.t2(a,b,c,d, |
15eae0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(d))WITHOUT.ROWID;.CR |
15eb00 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(b,c |
15eb20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(a,b,c,d).VALUE |
15eb40 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,7,8),(9,2,3,10), |
15eb60 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
15eb80 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c | O.UPDATE.SET.a=a+1000;.SELECT.*, |
15eba0 | 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 61 76 67 28 31 29 20 2b 61 3b | .'x'.FROM.t2.GROUP.BY.avg(1).+a; |
15ebc0 | 0a 81 7a 93 5d 04 00 83 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ..z.]...yCREATE.TABLE.t2(a,b,c,d |
15ebe0 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15ec00 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15ec20 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15ec40 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 | ES(1,2,3,4),(5,6,7,8),(9,2,3,10) |
15ec60 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
15ec80 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a | DO.UPDATE.SET.a=a+1000;.SELECT.* |
15eca0 | 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 61 2c 62 20 2d 31 3b 0a 81 | ,.'x'.FROM.t2.GROUP.BY.a,b.-1;.. |
15ecc0 | 76 93 5c 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | v.\...qCREATE.TABLE.t2(a,b,c,d,P |
15ece0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
15ed00 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
15ed20 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
15ed40 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
15ed60 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
15ed80 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+1000;.SELECT.*,. |
15eda0 | 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2d 31 3b 0a 81 76 93 5b 04 00 83 | 'x'.FROM.t2.GROUP.BY.-1;..v.[... |
15edc0 | 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | qCREATE.TABLE.t2(a,b,c,d,PRIMARY |
15ede0 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
15ee00 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
15ee20 | 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t2(a,b,c,d).VALUES(1,2,3 |
15ee40 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c | ,4),(5,6,7,8),(9,2,3,10),(11,12, |
15ee60 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
15ee80 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 20 52 | E.SET.a=a+1000;.SELECT.*,.'x'..R |
15eea0 | 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 0e 93 5a 04 00 84 21 43 52 45 41 54 | OM.t2.ORDER.BY.+a;....Z...!CREAT |
15eec0 | 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | E.TABLE.t2(a,b,c,d,PRIMARY.KEY(d |
15eee0 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
15ef00 | 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t2bc.ON.t2(b,c);.INSERT.INT |
15ef20 | 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t2(a,b,c,d).VALUES(1,2,3,4),(5 |
15ef40 | 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | ,6,7,8),(9,2,3,10),(11,12,13,14) |
15ef60 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
15ef80 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 20 72 61 6e 64 6f 6d 28 29 2f 27 78 | a=a+1000;.SELECT.*,..random()/'x |
15efa0 | 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 | '.FROM.t2.ORDER.BY.randomblob(1) |
15efc0 | 20 2b 61 3b 0a 82 12 93 59 04 00 84 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | .+a;....Y...)CREATE.TABLE.t2(a,b |
15efe0 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
15f000 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
15f020 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(a,b,c,d). |
15f040 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
15f060 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
15f080 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 32 30 30 31 2d 30 | ,b).DO.UPDATE.SET.a=a+10002001-0 |
15f0a0 | 31 2d 30 31 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 | 1-01;.SELECT.*,.'x'.FROM.t2.ORDE |
15f0c0 | 52 20 42 59 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 20 2b 61 3b 0a 82 00 93 58 04 | R.BY.strftime(1,1,1,1).+a;....X. |
15f0e0 | 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t2(a,b,c,d,PRIMA |
15f100 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
15f120 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
15f140 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
15f160 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
15f180 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
15f1a0 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 32 30 30 31 2d 30 31 2d 30 31 3b 0a 53 45 4c 45 | ATE.SET.a=a+10002001-01-01;.SELE |
15f1c0 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 | CT.*,.'x'.FROM.t2.ORDER.BY.+a;.. |
15f1e0 | 01 93 57 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | ..W....CREATE.TABLE.t2(a,b,c,d,P |
15f200 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
15f220 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
15f240 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
15f260 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
15f280 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
15f2a0 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 2e 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 | .UPDATE.SET.a=a+100.;.SELECT.*,. |
15f2c0 | 72 6f 75 6e 64 28 31 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 | round(1,A).'x'.FROM.t2.ORDER.BY. |
15f2e0 | 2b 61 3b 0a 81 79 93 56 04 00 83 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c | +a;..y.V...wCREATE.TABLE.t2(a,b, |
15f300 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | c,d,PRIMARY.KEY(d))WITHOUT.ROWID |
15f320 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 | ;.CREATE.UNIQUE.INDEX.t2bc.ON.t2 |
15f340 | 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 | (b,c);.INSERT.INTO.t2(a,b,c,d).V |
15f360 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c | ALUES(1,2,3,4),(5,6,7,8),(9,2,3, |
15f380 | 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | 10),(11,12,13,14).ON.CONFLICT(c, |
15f3a0 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 2e 3b 0a 53 45 4c 45 43 | b).DO.UPDATE.SET.a=a+100.;.SELEC |
15f3c0 | 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 4e 4f 54 2b 61 3b | T.*,.'x'.FROM.t2.GROUP.BY.NOT+a; |
15f3e0 | 0a 82 0b 93 55 04 00 84 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ....U....CREATE.TABLE.t2(a,b,c,d |
15f400 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
15f420 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
15f440 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(a,b,c,d).VALU |
15f460 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 | ES(1,2,3,4),(5,6,7,8),(9,2,3,10) |
15f480 | 2c 28 31 31 2c 31 32 2c 20 3f 31 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | ,(11,12,.?113,14).ON.CONFLICT(c, |
15f4a0 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 45 58 50 4c 41 49 | b).DO.UPDATE.SET.a=a+1000;EXPLAI |
15f4c0 | 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | N.QUERY.PLAN.SELECT.*,.'x'.FROM. |
15f4e0 | 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 93 54 04 00 83 71 43 52 45 41 54 45 20 54 | t2.ORDER.BY.+a;..v.T...qCREATE.T |
15f500 | 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 | ABLE.t2(a,b,c,d,PRIMARY.KEY(d))W |
15f520 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
15f540 | 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t2bc.ON.t2(b,c);.INSERT.INTO.t |
15f560 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
15f580 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 2e 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(.1,12,13,14).ON |
15f5a0 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
15f5c0 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 | +1000;.SELECT.*,.'x'.FROM.t2.ORD |
15f5e0 | 45 52 20 42 59 20 61 2c 62 0a 81 7f 93 53 04 00 84 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.a,b....S....CREATE.TABLE.t |
15f600 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
15f620 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
15f640 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,b, |
15f660 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
15f680 | 39 2c 32 2c 33 2c 31 30 29 2c 28 2e 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(.1,12,13,14).ON.CONFL |
15f6a0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
15f6c0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 | .SELECT.*,.'x'.FROM.t2.GROUP.BY. |
15f6e0 | 72 61 6e 64 6f 6d 28 29 20 2b 61 3b 0a 81 76 93 52 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c | random().+a;..v.R...qCREATE.TABL |
15f700 | 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 | E.t2(a,b,c,d,PRIMARY.KEY(d))WITH |
15f720 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
15f740 | 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 | 2bc.ON.t2(b,c);.INSERT.INTO.t2(a |
15f760 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,8 |
15f780 | 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 2d 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f | ),(9,2,3,10),(-1,12,13,14).ON.CO |
15f7a0 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 7e 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=~+10 |
15f7c0 | 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 | 00;.SELECT.*,.'x'.FROM.t2.ORDER. |
15f7e0 | 42 59 20 2b 61 3b 0a 82 02 93 51 04 00 84 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | BY.+a;....Q....CREATE.TABLE.t2(a |
15f800 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
15f820 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
15f840 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(a,b,c,d |
15f860 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
15f880 | 2c 33 2c 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b | ,3,+++++++++++++++++++++++++++++ |
15f8a0 | 2b 2b 2b 62 29 20 44 4f 20 55 50 44 01 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | +++b).DO.UPD.TE.SET.a=a+1000;.SE |
15f8c0 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 2c 61 2c 62 20 46 52 4f 4d 20 74 32 20 | LECT.DISTINCT*,.'x',a,b.FROM.t2. |
15f8e0 | 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7d 93 50 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c | ORDER.BY.+a;..}.P....CREATE.TABL |
15f900 | 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 | E.t2(a,b,c,d,PRIMARY.KEY(d))WITH |
15f920 | 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | OUT.ROWID;.CREATE.UNIQUE.INDEX.t |
15f940 | 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 | 2bc.ON.t2(b,c);.INSERT.INTO.t2(a |
15f960 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,8 |
15f980 | 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f | ),(9,2,3,.total_changes()).ON.CO |
15f9a0 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=a+10 |
15f9c0 | 30 30 3b 0a 53 45 4c 45 43 54 2b 61 76 67 28 31 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 | 00;.SELECT+avg(1).FROM.t2.ORDER. |
15f9e0 | 42 59 20 2b 20 61 76 67 28 31 29 61 3b 0a 81 76 93 4f 04 00 83 71 43 52 45 41 54 45 20 54 41 42 | BY.+.avg(1)a;..v.O...qCREATE.TAB |
15fa00 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
15fa20 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
15fa40 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
15fa60 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | a,b,c,d).VALUES(1,2,3,4),(5,6,7, |
15fa80 | 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 | 8),(9,2,3,.total_changes()).ON.C |
15faa0 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
15fac0 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 61 76 67 28 3f 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 | 000;.SELECT.avg(?).FROM.t2.ORDER |
15fae0 | 20 42 59 20 2b 61 3b 0a 81 76 93 4e 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | .BY.+a;..v.N...qCREATE.TABLE.t2( |
15fb00 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 | a,b,c,d,PRIMARY.KEY(d))WITHOUT.R |
15fb20 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t2bc.O |
15fb40 | 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c | N.t2(b,c);.INSERT.INTO.t2(a,b,c, |
15fb60 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | d).VALUES(1,2,3,4),(5,6,7,8),(9, |
15fb80 | 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | 2,3,.total_changes()).ON.CONFLIC |
15fba0 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
15fbc0 | 45 4c 45 43 54 20 40 31 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 64 00 | ELECT.@1.'x'.FROM.t2.ORDER.BY.d. |
15fbe0 | 3b 0a 81 76 93 4d 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c | ;..v.M...qCREATE.TABLE.t2(a,b,c, |
15fc00 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | d,PRIMARY.KEY(d))WITHOUT.ROWID;. |
15fc20 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 | CREATE.UNIQUE.INDEX.t2bc.ON.t2(b |
15fc40 | 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | ,c);.INSERT.INTO.t2(a,b,c,d).VAL |
15fc60 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 | UES(1,2,3,4),(5,6,7,8),(9,2,3,.t |
15fc80 | 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 | otal_changes()).ON.CONFLICT(c,b) |
15fca0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
15fcc0 | 40 31 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 23 61 3b 0a 82 08 93 4c | @1.'x'.FROM.t2.ORDER.BY.#a;....L |
15fce0 | 04 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ....CREATE.TABLE.t2(a,b,c,d,PRIM |
15fd00 | 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(d))WITHOUT.ROWID;.CREATE |
15fd20 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);.I |
15fd40 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t2(a,b,c,d).VALUES(1, |
15fd60 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 | 2,3,4),(5,6,7,8),(9,2,3,.total_c |
15fd80 | 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | hanges()).ON.CONFLICT(c,b).DO.UP |
15fda0 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f | DATE.SET.a=a+1000;.SELECT.*,.gro |
15fdc0 | 75 70 5f 63 6f 6e 63 61 74 28 43 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 | up_concat(C,1).'x'.FROM.t2.ORDER |
15fde0 | 20 42 59 20 2b 61 3b 0a 82 08 93 4b 04 00 84 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | .BY.+a;....K....CREATE.TABLE.t2( |
15fe00 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 | a,b,c,d,PRIMARY.KEY(d))WITHOUT.R |
15fe20 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t2bc.O |
15fe40 | 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c | N.t2(b,c);.INSERT.INTO.t2(a,b,c, |
15fe60 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | d).VALUES(1,2,3,4),(5,6,7,8),(9, |
15fe80 | 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | 2,3,.total_changes()).ON.CONFLIC |
15fea0 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
15fec0 | 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 3f 2c 31 29 20 27 78 27 20 46 | ELECT.*,.group_concat(?,1).'x'.F |
15fee0 | 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 82 08 93 4a 04 00 84 15 43 52 45 41 | ROM.t2.GROUP.BY.+a;....J....CREA |
15ff00 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
15ff20 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
15ff40 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c);.INSERT.IN |
15ff60 | 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t2(a,b,c,d).VALUES(1,2,3,4),( |
15ff80 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 | 5,6,7,8),(9,2,3,.total_changes() |
15ffa0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
15ffc0 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 | .a=a+1000;.SELECT.*,.group_conca |
15ffe0 | 74 28 31 3c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | t(1<1).'x'.FROM.t2.ORDER.BY.+a;. |
160000 | 0d 00 00 00 1e 01 4b 00 1f 03 1e 06 1c fb 1b f0 1a ef 19 f2 18 cc 17 aa 16 8c 15 7e 14 76 13 71 | ......K....................~.v.q |
160020 | 12 63 11 5e 10 59 0f 4a 0e 45 0d 40 0c 36 0b 3c 0a 37 09 31 08 3b 07 45 06 47 05 51 04 5b 03 55 | .c.^.Y.J.E.@.6.<.7.1.;.E.G.Q.[.U |
160040 | 02 53 01 4b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .S.K............................ |
160060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1600a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1600c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1600e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
160140 | 00 00 00 00 00 00 00 00 00 00 00 82 04 94 06 04 00 84 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ...................CREATE.TABLE. |
160160 | 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | t2(a,b,c,d,PRIMARY.KEY(d))WITHOU |
160180 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
1601a0 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 | c.ON.t2(b,c);.INSERT.INTO.t2(a,b |
1601c0 | 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ,c,d).VALUES(1,2,3,4),(5,6,7,8), |
1601e0 | 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | (9,2,3,10),(11,12,13,14).ON.CONF |
160200 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
160220 | 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 20 40 31 27 78 27 20 46 52 4f 4d 20 74 32 20 | ;.SELECT.DISTINCT.@1'x'.FROM.t2. |
160240 | 4f 52 44 45 52 20 42 59 20 2b 61 3b 56 41 43 55 55 4d 0a 81 7e 94 05 04 00 84 01 43 52 45 41 54 | ORDER.BY.+a;VACUUM..~......CREAT |
160260 | 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | E.TABLE.t2(a,b,c,d,PRIMARY.KEY(d |
160280 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
1602a0 | 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t2bc.ON.t2(b,c);.INSERT.INT |
1602c0 | 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t2(a,b,c,d).VALUES(1,2,3,4),(5 |
1602e0 | 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | ,6,7,8),(9,2,3,10),(11,12,13,14) |
160300 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
160320 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 20 40 31 27 78 27 20 | a=a+1000;.SELECT.DISTINCT.@1'x'. |
160340 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 23 61 3b 0a 82 02 94 04 04 00 84 09 43 52 45 | FROM.t2.ORDER.BY.#a;.........CRE |
160360 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t2(a,b,c,d,PRIMARY.KEY |
160380 | 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | (d))WITHOUT.ROWID;.CREATE.UNIQUE |
1603a0 | 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 | .INDEX.t2bc.ON.t2(b,c);.INSERT.I |
1603c0 | 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c | NTO.t2(a,b,c,d).VALUES(1,2,3,4), |
1603e0 | 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | (5,6,7,8),(9,2,3,10),(11,12,13,1 |
160400 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
160420 | 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 20 40 31 20 7c | T.a=a+1000;.SELECT.DISTINCT.@1.| |
160440 | 7c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 72 94 03 04 | |.'x'.FROM.t2.ORDER.BY.+a;..r... |
160460 | 00 83 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ..iCREATE.TABLE.t2(a,b,c,d,PRIMA |
160480 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
1604a0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
1604c0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
1604e0 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
160500 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
160520 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 | ATE.SET.a=a+1000;.SELECT.DISTINC |
160540 | 54 20 22 61 22 4c 49 4d 49 54 22 61 22 2c 22 62 22 81 72 94 02 04 00 83 69 43 52 45 41 54 45 20 | T."a"LIMIT"a","b".r.....iCREATE. |
160560 | 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | TABLE.t2(a,b,c,d,PRIMARY.KEY(d)) |
160580 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
1605a0 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
1605c0 | 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t2(a,b,c,d).VALUES(1,2,3,4),(5,6 |
1605e0 | 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f | ,7,8),(9,2,3,10),(11,12,13,14).O |
160600 | 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | N.CONFLICT(c,b).DO.UPDATE.SET.a= |
160620 | 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 20 22 61 22 2c 22 62 22 52 | a+1000;.SELECT.DISTINCT."a","b"R |
160640 | 4f 4d 20 74 32 3b 0a 81 7a 94 01 04 00 83 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | OM.t2;..z.....yCREATE.TABLE.t2(a |
160660 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
160680 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
1606a0 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(a,b,c,d |
1606c0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
1606e0 | 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,3,10),(11,12,13,14).ON.CONFLICT |
160700 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
160720 | 4c 45 43 54 20 44 49 53 54 49 4e 43 54 20 22 61 22 2c 22 62 22 4f 52 44 45 52 20 42 59 20 22 61 | LECT.DISTINCT."a","b"ORDER.BY."a |
160740 | 22 2c 22 62 22 81 72 94 00 04 00 83 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | ","b".r.....iCREATE.TABLE.t2(a,b |
160760 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
160780 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
1607a0 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(a,b,c,d). |
1607c0 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
1607e0 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
160800 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
160820 | 43 54 20 44 49 53 54 49 4e 43 54 20 22 61 22 2c 22 62 22 2c 22 61 22 2c 22 62 22 81 72 93 7f 04 | CT.DISTINCT."a","b","a","b".r... |
160840 | 00 83 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ..iCREATE.TABLE.t2(a,b,c,d,PRIMA |
160860 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
160880 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
1608a0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
1608c0 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
1608e0 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
160900 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 | ATE.SET.a=a+1000;.SELECT.DISTINC |
160920 | 54 20 22 61 22 2c 22 62 22 20 22 61 22 2c 22 62 22 82 02 93 7e 04 00 84 09 43 52 45 41 54 45 20 | T."a","b"."a","b"...~....CREATE. |
160940 | 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | TABLE.t2(a,b,c,d,PRIMARY.KEY(d)) |
160960 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
160980 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
1609a0 | 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t2(a,b,c,d).VALUES(1,2,3,4),(5,6 |
1609c0 | 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f | ,7,8),(9,2,3,10),(11,12,13,14).O |
1609e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | N.CONFLICT(c,b).DO.UPDATE.SET.a= |
160a00 | 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 2c 2a 2c 20 27 78 27 2c 61 2c | a+1000;.SELECT.DISTINC,*,.'x',a, |
160a20 | 62 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 01 93 7d 04 00 84 07 43 | b.FROM.t2.ORDER.BY.+a;....}....C |
160a40 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b | REATE.TABLE.t2(a,b,c,d,PRIMARY.K |
160a60 | 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | EY(d))WITHOUT.ROWID;.CREATE.UNIQ |
160a80 | 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 | UE.INDEX.t2bc.ON.t2(b,c);.INSERT |
160aa0 | 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t2(a,b,c,d).VALUES(1,2,3,4 |
160ac0 | 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 | ),(5,6,7,8),(9,2,3,10),(11,12,13 |
160ae0 | 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 | ,14).ON.CONFLICT(c,b).DO.UPDATE. |
160b00 | 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 2d 72 6f 75 6e 64 28 31 2c | SET.a=a+1000;.SELECT.*,-round(1, |
160b20 | 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 93 7c | 1).'x'.FROM.t2.ORDER.BY.+a;..v.| |
160b40 | 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ...qCREATE.TABLE.t2(a,b,c,d,PRIM |
160b60 | 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(d))WITHOUT.ROWID;.CREATE |
160b80 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);.I |
160ba0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t2(a,b,c,d).VALUES(1, |
160bc0 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
160be0 | 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | 12,13,14).ON.CONFLICT(c,b).DO.UP |
160c00 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 2a 27 78 27 | DATE.SET.a=a+1000;.SELECT.*,*'x' |
160c20 | 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 06 93 7b 04 00 84 11 43 52 | .FROM.t2.ORDER.BY.+a;....{....CR |
160c40 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t2(a,b,c,d,PRIMARY.KE |
160c60 | 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | Y(d))WITHOUT.ROWID;.CREATE.UNIQU |
160c80 | 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 | E.INDEX.t2bc.ON.t2(b,c);.INSERT. |
160ca0 | 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 | INTO.t2(a,b,c,d).VALUES(1,2,3,4) |
160cc0 | 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c | ,(5,6,7,8),(9,2,3,10),(11,12,13, |
160ce0 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
160d00 | 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 74 6f 74 61 6c 5f 63 68 61 | ET.a=a+1000;.SELECT.*,.total_cha |
160d20 | 6e 67 65 73 28 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | nges().'x'.FROM.t2.ORDER.BY.+a;. |
160d40 | 82 01 93 7a 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | ...z....CREATE.TABLE.t2(a,b,c,d, |
160d60 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(d))WITHOUT.ROWID;.CR |
160d80 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(b,c |
160da0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(a,b,c,d).VALUE |
160dc0 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,7,8),(9,2,3,10), |
160de0 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
160e00 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c | O.UPDATE.SET.a=a+1000;.SELECT.*, |
160e20 | 20 72 6f 75 6e 64 28 3f 3c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 | .round(?<A).'x'.FROM.t2.ORDER.BY |
160e40 | 20 2b 61 3b 0a 82 01 93 79 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | .+a;....y....CREATE.TABLE.t2(a,b |
160e60 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
160e80 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
160ea0 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(a,b,c,d). |
160ec0 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
160ee0 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
160f00 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
160f20 | 43 54 20 2a 2c 20 72 6f 75 6e 64 28 3f 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 | CT.*,.round(?,A).'x'.FROM.t2.ORD |
160f40 | 45 52 20 42 59 20 2b 61 3b 0a 82 0b 93 78 04 00 84 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.+a;....x....CREATE.TABLE.t |
160f60 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
160f80 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
160fa0 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,b, |
160fc0 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
160fe0 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
161000 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
161020 | 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 44 29 20 | .SELECT.*,.round(2001-01-011,D). |
161040 | 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 01 93 77 04 00 84 | 'x'.FROM.t2.ORDER.BY.+a;....w... |
161060 | 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | .CREATE.TABLE.t2(a,b,c,d,PRIMARY |
161080 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
1610a0 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
1610c0 | 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t2(a,b,c,d).VALUES(1,2,3 |
1610e0 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c | ,4),(5,6,7,8),(9,2,3,10),(11,12, |
161100 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
161120 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 | E.SET.a=a+1000;.SELECT.*,.round( |
161140 | 31 2c 42 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 01 | 1,B).'x'.FROM.t2.ORDER.BY.+a;... |
161160 | 93 76 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 | .v....CREATE.TABLE.t2(a,b,c,d,PR |
161180 | 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(d))WITHOUT.ROWID;.CREA |
1611a0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b | TE.UNIQUE.INDEX.t2bc.ON.t2(b,c); |
1611c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t2(a,b,c,d).VALUES( |
1611e0 | 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 | 1,2,3,4),(5,6,7,8),(9,2,3,10),(1 |
161200 | 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 | 1,12,13,14).ON.CONFLICT(c,b).DO. |
161220 | 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 72 | UPDATE.SET.a=a+1000;.SELECT.*,.r |
161240 | 6f 75 6e 64 28 31 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b | ound(1,A).'x'.FROM.t2.ORDER.BY.+ |
161260 | 58 3b 0a 82 0a 93 75 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 | X;....u....CREATE.TABLE.t2(a,b,c |
161280 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | ,d,PRIMARY.KEY(d))WITHOUT.ROWID; |
1612a0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 | .CREATE.UNIQUE.INDEX.t2bc.ON.t2( |
1612c0 | 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 | b,c);.INSERT.INTO.t2(a,b,c,d).VA |
1612e0 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 | LUES(1,2,3,4),(5,6,7,8),(9,2,3,1 |
161300 | 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | 0),(11,12,13,14).ON.CONFLICT(c,b |
161320 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
161340 | 20 2a 2c 20 72 6f 75 6e 64 28 31 2c 31 29 4f 52 20 27 2b 32 20 64 61 79 73 78 27 20 46 52 4f 4d | .*,.round(1,1)OR.'+2.daysx'.FROM |
161360 | 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 01 93 74 04 00 84 07 43 52 45 41 54 45 20 | .t2.ORDER.BY.+a;....t....CREATE. |
161380 | 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | TABLE.t2(a,b,c,d,PRIMARY.KEY(d)) |
1613a0 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
1613c0 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
1613e0 | 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t2(a,b,c,d).VALUES(1,2,3,4),(5,6 |
161400 | 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f | ,7,8),(9,2,3,10),(11,12,13,14).O |
161420 | 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | N.CONFLICT(c,b).DO.UPDATE.SET.a= |
161440 | 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 31 2c 31 29 26 27 78 27 | a+1000;.SELECT.*,.round(1,1)&'x' |
161460 | 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 04 93 73 04 00 84 0d 43 52 | .FROM.t2.ORDER.BY.+a;....s....CR |
161480 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t2(a,b,c,d,PRIMARY.KE |
1614a0 | 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | Y(d))WITHOUT.ROWID;.CREATE.UNIQU |
1614c0 | 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 | E.INDEX.t2bc.ON.t2(b,c);.INSERT. |
1614e0 | 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 | INTO.t2(a,b,c,d).VALUES(1,2,3,4) |
161500 | 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c | ,(5,6,7,8),(9,2,3,10),(11,12,13, |
161520 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
161540 | 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 20 2d 31 | ET.a=a+1000;.SELECT.*,.round(.-1 |
161560 | 31 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 0a | 1,A).'x'.FROM.t2.ORDER.BY.+a;... |
161580 | 93 72 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 | .r....CREATE.TABLE.t2(a,b,c,d,PR |
1615a0 | 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(d))WITHOUT.ROWID;.CREA |
1615c0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b | TE.UNIQUE.INDEX.t2bc.ON.t2(b,c); |
1615e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t2(a,b,c,d).VALUES( |
161600 | 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 | 1,2,3,4),(5,6,7,8),(9,2,3,10),(1 |
161620 | 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 | 1,12,13,14).ON.CONFLICT(c,b).DO. |
161640 | 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 6c | UPDATE.SET.a=a+1000;.SELECT.*,.l |
161660 | 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f | ast_insert_rowid().'x'.FROM.t2.O |
161680 | 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 1a 93 71 04 00 84 39 43 52 45 41 54 45 20 54 41 42 4c 45 | RDER.BY.+a;....q...9CREATE.TABLE |
1616a0 | 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | .t2(a,b,c,d,PRIMARY.KEY(d))WITHO |
1616c0 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
1616e0 | 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(b,c);.INSERT.INTO.t2(a, |
161700 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
161720 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
161740 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
161760 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 63 68 61 6e 67 65 73 28 29 2f 43 55 52 52 45 4e 54 5f 44 | 0;.SELECT.*,.changes()/CURRENT_D |
161780 | 41 54 45 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 61 6e 64 6f 6d 62 6c | ATE'x'.FROM.t2.ORDER.BY.randombl |
1617a0 | 6f 62 28 31 29 20 2b 61 3b 0a 82 1e 93 70 04 00 84 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ob(1).+a;....p...ACREATE.TABLE.t |
1617c0 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
1617e0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
161800 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,b, |
161820 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
161840 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
161860 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
161880 | 0a 53 45 4c 45 43 54 20 2a 2c 20 63 68 61 6e 67 65 73 28 29 2f 20 74 6f 74 61 6c 5f 63 68 61 6e | .SELECT.*,.changes()/.total_chan |
1618a0 | 67 65 73 28 29 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 61 6e 64 6f 6d | ges()'x'.FROM.t2.ORDER.BY.random |
1618c0 | 62 6c 6f 62 28 31 29 20 2b 61 3b 0a 82 22 93 6f 04 00 84 49 43 52 45 41 54 45 20 54 41 42 4c 45 | blob(1).+a;..".o...ICREATE.TABLE |
1618e0 | 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | .t2(a,b,c,d,PRIMARY.KEY(d))WITHO |
161900 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
161920 | 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(b,c);.INSERT.INTO.t2(a, |
161940 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
161960 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
161980 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
1619a0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 63 68 61 6e 67 65 73 28 29 2f 20 6c 61 73 74 5f 69 6e 73 | 0;.SELECT.*,.changes()/.last_ins |
1619c0 | 65 72 74 5f 72 6f 77 69 64 28 29 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 | ert_rowid()'x'.FROM.t2.ORDER.BY. |
1619e0 | 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 2b 61 3b 0a 81 79 93 6e 04 00 83 77 43 52 45 41 54 45 | randomblob(1).+a;..y.n...wCREATE |
161a00 | 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 | .TABLE.t2(a,b,c,d,PRIMARY.KEY(d) |
161a20 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | )WITHOUT.ROWID;.CREATE.UNIQUE.IN |
161a40 | 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | DEX.t2bc.ON.t2(b,c);.INSERT.INTO |
161a60 | 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | .t2(a,b,c,d).VALUES(1,2,3,4),(5, |
161a80 | 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a | 6,7,8),(9,2,3,10),(11,12,13,14). |
161aa0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ON.CONFLICT(c,b).DO.UPDATE.SET.a |
161ac0 | 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 41 53 43 20 46 52 4f 4d 20 74 | =a+1000;.SELECT.*,.'x'ASC.FROM.t |
161ae0 | 32 20 4f 52 44 45 52 20 42 59 20 41 61 3b 0a 81 7d 93 6d 04 00 83 7f 43 52 45 41 54 45 20 54 41 | 2.ORDER.BY.Aa;..}.m....CREATE.TA |
161b00 | 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 | BLE.t2(a,b,c,d,PRIMARY.KEY(d))WI |
161b20 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
161b40 | 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | .t2bc.ON.t2(b,c);.INSERT.INTO.t2 |
161b60 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
161b80 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 | ,8),(9,2,3,10),(11,12,13,14).ON. |
161ba0 | 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b | CONFLICT(c,b).DO.UPDATE.SET.a=a+ |
161bc0 | 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 54 | 1000;.SELECT.*,.'x'.FROM.t2.ORDT |
161be0 | 20 49 4e 44 45 58 45 44 20 42 59 20 60 61 60 0a 82 07 93 6c 04 00 84 13 43 52 45 41 54 45 20 54 | .INDEXED.BY.`a`....l....CREATE.T |
161c00 | 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 | ABLE.t2(a,b,c,d,PRIMARY.KEY(d))W |
161c20 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
161c40 | 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t2bc.ON.t2(b,c);.INSERT.INTO.t |
161c60 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
161c80 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
161ca0 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
161cc0 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 | +1000;.SELECT.*,.'x'.FROM.t2.ORD |
161ce0 | 45 52 20 42 59 2b 34 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 7e 61 79 73 0a 82 07 93 6b 04 | ER.BY+4.COLLATE.nocase~ays....k. |
161d00 | 00 84 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t2(a,b,c,d,PRIMA |
161d20 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
161d40 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
161d60 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(a,b,c,d).VALUES(1,2 |
161d80 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
161da0 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
161dc0 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 | ATE.SET.a=a+1000;.SELECT.*,.'x'. |
161de0 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 34 20 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 | FROM.t2.ORDER.BY+4.COLLATE.nocas |
161e00 | 65 64 61 79 73 0a 81 79 93 6a 04 00 83 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c | edays..y.j...wCREATE.TABLE.t2(a, |
161e20 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(d))WITHOUT.ROW |
161e40 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
161e60 | 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 | t2(b,c);.INSERT.INTO.t2(a,b,c,d) |
161e80 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c | .VALUES(1,2,3,4),(5,6,7,8),(9,2, |
161ea0 | 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 3,10),(11,12,13,14).ON.CONFLICT( |
161ec0 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c | c,b).DO.UPDATE.SET.a=a+1000;.SEL |
161ee0 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 33 20 64 61 | ECT.*,.'x'.FROM.t2.ORDER.BY+3.da |
161f00 | 79 73 0a 81 79 93 69 04 00 83 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 | ys..y.i...wCREATE.TABLE.t2(a,b,c |
161f20 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | ,d,PRIMARY.KEY(d))WITHOUT.ROWID; |
161f40 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 | .CREATE.UNIQUE.INDEX.t2bc.ON.t2( |
161f60 | 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 | b,c);.INSERT.INTO.t2(a,b,c,d).VA |
161f80 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 | LUES(1,2,3,4),(5,6,7,8),(9,2,3,1 |
161fa0 | 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | 0),(11,12,13,14).ON.CONFLICT(c,b |
161fc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
161fe0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 32 20 44 45 53 43 0a | .*,.'x'.FROM.t2.ORDER.BY+2.DESC. |
162000 | 0d 00 00 00 1f 00 ea 00 1e f4 1d ea 1c e4 1b d8 1a d2 19 d0 18 ce 17 d4 16 d3 15 cb 14 c8 13 c0 | ................................ |
162020 | 12 bf 11 ab 10 d5 0f d0 0e cc 0d c7 0c c2 0b c8 0a ce 09 c9 08 ef 07 eb 06 ea 05 e5 04 eb 03 ea | ................................ |
162040 | 02 e5 01 eb 00 ea 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
162060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
162080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1620a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1620c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1620e0 | 00 00 00 00 00 00 00 00 00 00 81 7d 94 25 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ...........}.%....CREATE.TABLE.t |
162100 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
162120 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
162140 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(c,b, |
162160 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
162180 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
1621a0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
1621c0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 | .SELECT.*,.'x'.FROM.t2.GROUP.BY. |
1621e0 | 7a 65 72 6f 62 6c 6f 62 28 31 29 81 76 94 24 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 | zeroblob(1).v.$...qCREATE.TABLE. |
162200 | 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | t2(a,b,c,d,PRIMARY.KEY(d))WITHOU |
162220 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
162240 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 | c.ON.t2(b,c);.INSERT.INTO.t2(c,b |
162260 | 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 20 72 6f 75 6e 64 28 31 2c | ,c,d).VALUES(1,2,3,4),(.round(1, |
162280 | 31 29 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | 1),2,3,10),(11,12,13,14).ON.CONF |
1622a0 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
1622c0 | 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 | ;.SELECT.*,.'x'.FROM.t2.GROUP.BY |
1622e0 | 20 2b 61 3b 0a 82 01 94 23 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | .+a;....#....CREATE.TABLE.t2(a,b |
162300 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
162320 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
162340 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 61 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(c,b,a,d). |
162360 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
162380 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
1623a0 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
1623c0 | 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 6f 75 6e 64 | CT.*,.'x'.FROM.t2.ORDER.BY.round |
1623e0 | 28 31 2c 31 29 20 2b 61 3b 0a 81 7d 94 22 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | (1,1).+a;..}."....CREATE.TABLE.t |
162400 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
162420 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
162440 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(c,b, |
162460 | 61 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | a,d).VALUES(1,2,3,4),(5,6,7,8),( |
162480 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
1624a0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
1624c0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 | .SELECT.*,.'x'.FROM.t2.ORDER.BY. |
1624e0 | 2b 61 3b 52 45 49 4e 44 45 58 0a 81 76 94 21 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 | +a;REINDEX..v.!...qCREATE.TABLE. |
162500 | 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | t2(a,b,c,d,PRIMARY.KEY(d))WITHOU |
162520 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
162540 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 | c.ON.t2(b,c);.INSERT.INTO.t2(c,b |
162560 | 2c 61 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 33 2c 38 29 2c | ,a,d).VALUES(1,2,3,4),(5,6,3,8), |
162580 | 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | (9,2,3,10),(11,12,13,14).ON.CONF |
1625a0 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
1625c0 | 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 | ;.SELECT.*,.'x'.FROM.t2.ORDER.BY |
1625e0 | 20 2b 61 3b 0a 82 01 94 20 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | .+a;.........CREATE.TABLE.t2(a,b |
162600 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
162620 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
162640 | 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 63 2c 63 2c 64 29 20 | 2(b,c);.INSERT.INTO.t2(a,c,c,d). |
162660 | 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 | VALUES(1,2,3,4),(5,6,7,8),(9,2,3 |
162680 | 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 | ,10),(11,12,13,14).ON.CONFLICT(c |
1626a0 | 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 | ,b).DO.UPDATE.SET.a=a+1000;.SELE |
1626c0 | 43 54 20 2a 2c 20 72 6f 75 6e 64 28 3f 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 | CT.*,.round(?,A).'x'.FROM.t2.ORD |
1626e0 | 45 52 20 42 59 20 2b 61 3b 0a 81 7d 94 1f 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.+a;..}......CREATE.TABLE.t |
162700 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
162720 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
162740 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 63 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,c, |
162760 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
162780 | 39 2c 32 2c 33 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,.total_changes()).ON.CONFL |
1627a0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
1627c0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 | .SELECT.*,.'x'.FROM.t2.ORDER.BY. |
1627e0 | 2b 61 3b 41 4e 41 4c 59 5a 45 0a 82 00 94 1e 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 | +a;ANALYZE.........CREATE.TABLE. |
162800 | 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | t2(a,b,c,d,PRIMARY.KEY(d))WITHOU |
162820 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
162840 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 63 | c.ON.t2(b,c);.INSERT.INTO.t2(a,c |
162860 | 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a 65 | ,c,d).VALUES(1,2,3,4),(5,6,7,.ze |
162880 | 72 6f 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | roblob(12001-01-01)),(11,12,13,1 |
1628a0 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
1628c0 | 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 | T.a=a+1000;.SELECT.*,.'x'.FROM.t |
1628e0 | 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 56 94 1d 04 00 83 31 43 52 45 41 54 45 20 54 41 | 2.ORDER.BY.+a;..V.....1CREATE.TA |
162900 | 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 | BLE.t2(a,b,c,d,PRIMARY.KEY(d))WI |
162920 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | THOUT.ROWID;.CREATE.UNIQUE.INDEX |
162940 | 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | .t2bc.ON.t2(b,c);.INSERT.INTO.t2 |
162960 | 28 61 2c 62 2c 64 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,d,d).VALUES(1,2,3,4),(5,6,7 |
162980 | 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 | ,8),(9,2,3,10),(11,12,13,14).ON. |
1629a0 | 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b | CONFLICT(c,b).DO.UPDATE.SET.a=a+ |
1629c0 | 31 30 30 30 3b 0a 53 3b 0a 82 01 94 1c 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | 1000;.S;.........CREATE.TABLE.t2 |
1629e0 | 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 | (a,b,c,d,PRIMARY.KEY(d))WITHOUT. |
162a00 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 | ROWID;.CREATE.UNIQUE.INDEX.t2bc. |
162a20 | 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 | ON.t2(b,c);.INSERT.INTO.t2(a,b,c |
162a40 | 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 37 2c 36 2c 37 2c 38 29 2c 28 39 | ,d).VALUES(1,2,3,4),(7,6,7,8),(9 |
162a60 | 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 | ,2,3,10),(11,12,13,14).ON.CONFLI |
162a80 | 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a | CT(c,b).DO.UPDATE.SET.a=a+1000;. |
162aa0 | 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 31 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 | SELECT.*,.round(1,A).'x'.FROM.t2 |
162ac0 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 94 1b 04 00 83 71 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;..v.....qCREATE.TAB |
162ae0 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
162b00 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
162b20 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
162b40 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 3f 2c | a,b,c,d).VALUES(1,2,3,4),(5,6,?, |
162b60 | 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 8),(9,2,3,10),(11,12,13,14).ON.C |
162b80 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
162ba0 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 | 000;.SELECT.*,.'x'.FROM.t2.ORDER |
162bc0 | 20 42 59 20 2b 61 3b 0a 81 76 94 1a 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | .BY.+a;..v.....qCREATE.TABLE.t2( |
162be0 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 | a,b,c,d,PRIMARY.KEY(d))WITHOUT.R |
162c00 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t2bc.O |
162c20 | 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c | N.t2(b,c);.INSERT.INTO.t2(a,b,c, |
162c40 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 43 55 52 52 45 4e | d).VALUES(1,2,3,4),(5,6,7,CURREN |
162c60 | 54 5f 54 49 4d 45 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | T_TIME),(11,12,13,14).ON.CONFLIC |
162c80 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
162ca0 | 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 | ELECT.*,.'x'.FROM.t2.ORDER.BY.+a |
162cc0 | 3b 0a 82 01 94 19 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c | ;.........CREATE.TABLE.t2(a,b,c, |
162ce0 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | d,PRIMARY.KEY(d))WITHOUT.ROWID;. |
162d00 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 | CREATE.UNIQUE.INDEX.t2bc.ON.t2(b |
162d20 | 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | ,c);.INSERT.INTO.t2(a,b,c,d).VAL |
162d40 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 | UES(1,2,3,4),(5,6,7,8),(9,2,3,10 |
162d60 | 29 2c 28 39 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 | ),(91,12,13,14).ON.CONFLICT(c,b) |
162d80 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
162da0 | 2a 2c 20 72 6f 75 6e 64 28 3f 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 | *,.round(?,A).'x'.FROM.t2.ORDER. |
162dc0 | 42 59 20 2b 61 3b 0a 82 01 94 18 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | BY.+a;.........CREATE.TABLE.t2(a |
162de0 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
162e00 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
162e20 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(a,b,c,d |
162e40 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
162e60 | 2c 33 2c 31 30 29 2c 28 31 39 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,3,10),(19,12,13,14).ON.CONFLICT |
162e80 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
162ea0 | 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 31 2c 41 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f | LECT.*,.round(1,A).'x'.FROM.t2.O |
162ec0 | 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 94 17 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 | RDER.BY.+a;.........CREATE.TABLE |
162ee0 | 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | .t2(a,b,c,d,PRIMARY.KEY(d))WITHO |
162f00 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
162f20 | 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(b,c);.INSERT.INTO.t2(a, |
162f40 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
162f60 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 32 30 30 31 2d 30 31 2d 30 31 2c 31 32 2c 31 33 2c | ,(9,2,3,10),(112001-01-01,12,13, |
162f80 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
162fa0 | 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | ET.a=a+1000;.SELECT.*,.'x'.FROM. |
162fc0 | 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 01 94 16 04 00 84 07 43 52 45 41 54 45 20 54 | t2.ORDER.BY.+a;.........CREATE.T |
162fe0 | 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 | ABLE.t2(a,b,c,d,PRIMARY.KEY(d))W |
163000 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
163020 | 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t2bc.ON.t2(b,c);.INSERT.INTO.t |
163040 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
163060 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
163080 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.c=a |
1630a0 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 3f 2c 41 29 20 27 78 27 20 | +1000;.SELECT.*,.round(?,A).'x'. |
1630c0 | 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 52 94 15 04 00 83 29 43 52 45 | FROM.t2.ORDER.BY.+a;..R.....)CRE |
1630e0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 | ATE.TABLE.t2(a,b,c,d,PRIMARY.KEY |
163100 | 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | (d))WITHOUT.ROWID;.CREATE.UNIQUE |
163120 | 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 | .INDEX.t2bc.ON.t2(b,c);.INSERT.I |
163140 | 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c | NTO.t2(a,b,c,d).VALUES(1,2,3,4), |
163160 | 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 | (5,6,7,8),(9,2,3,10),(11,12,13,1 |
163180 | 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 4).ON.CONFLICT(c,b).DO.UPDATE.SE |
1631a0 | 54 20 61 3d 61 2b 64 00 30 3b 0a 82 10 94 14 04 00 84 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 | T.a=a+d.0;........%CREATE.TABLE. |
1631c0 | 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | t2(a,b,c,d,PRIMARY.KEY(d))WITHOU |
1631e0 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
163200 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 | c.ON.t2(b,c);.INSERT.INTO.t2(a,b |
163220 | 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ,c,d).VALUES(1,2,3,4),(5,6,7,8), |
163240 | 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | (9,2,3,10),(11,12,13,14).ON.CONF |
163260 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
163280 | 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 53 45 4c 45 43 54 20 44 49 53 54 49 | ;EXPLAIN.QUERY.PLAN.SELECT.DISTI |
1632a0 | 4e 43 54 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 81 | NCT*,.'x'.FROM.t2.GROUP.BY.+a;.. |
1632c0 | 7d 94 13 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | }......CREATE.TABLE.t2(a,b,c,d,P |
1632e0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
163300 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 | ATE.UNIQUE.INDEX.t2bc.ON.t2(b,c) |
163320 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t2(a,b,c,d).VALUES |
163340 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 | (1,2,3,4),(5,6,7,8),(9,2,3,10),( |
163360 | 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f | 11,12,13,14).ON.CONFLICT(c,b).DO |
163380 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 73 75 6d | .UPDATE.SET.a=a+1000;.SELECT.sum |
1633a0 | 28 3f 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 61 76 67 28 31 29 20 2b 61 3b 0a | (?).FROM.t2.ORDER.BY.avg(1).+a;. |
1633c0 | 82 04 94 12 04 00 84 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | ........CREATE.TABLE.t2(a,b,c,d, |
1633e0 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(d))WITHOUT.ROWID;.CR |
163400 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(b,c |
163420 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(a,b,c,d).VALUE |
163440 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,7,8),(9,2,3,10), |
163460 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
163480 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 73 75 | O.UPDATE.SET.a=a+1000;.SELECT.su |
1634a0 | 6d 28 31 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 61 76 67 28 b1 29 20 2b 20 61 | m(1).FROM.t2.ORDER.BY.avg(.).+.a |
1634c0 | 76 67 28 31 29 61 3b 0a 81 7f 94 11 04 00 84 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | vg(1)a;.........CREATE.TABLE.t2( |
1634e0 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 | a,b,c,d,PRIMARY.KEY(d))WITHOUT.R |
163500 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t2bc.O |
163520 | 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c | N.t2(b,c);.INSERT.INTO.t2(a,b,c, |
163540 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | d).VALUES(1,2,3,4),(5,6,7,8),(9, |
163560 | 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | 2,3,10),(11,12,13,14).ON.CONFLIC |
163580 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
1635a0 | 45 4c 45 43 54 20 73 75 6d 28 31 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 61 76 | ELECT.sum(1).FROM.t2.ORDER.BY.av |
1635c0 | 67 28 31 29 25 59 20 2b 61 3b 0a 82 04 94 10 04 00 84 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | g(1)%Y.+a;.........CREATE.TABLE. |
1635e0 | 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 | t2(a,b,c,d,PRIMARY.KEY(d))WITHOU |
163600 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 | T.ROWID;.CREATE.UNIQUE.INDEX.t2b |
163620 | 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 | c.ON.t2(b,c);.INSERT.INTO.t2(a,b |
163640 | 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ,c,d).VALUES(1,2,3,4),(5,6,7,8), |
163660 | 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 | (9,2,3,10),(11,12,13,14).ON.CONF |
163680 | 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 | LICT(c,b).DO.UPDATE.SET.a=a+1000 |
1636a0 | 3b 0a 53 45 4c 45 43 54 20 73 75 6d 28 31 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 | ;.SELECT.sum(1).FROM.t2.ORDER.BY |
1636c0 | 20 61 76 67 28 31 29 20 2b 20 63 6f 75 6e 74 28 31 29 0a 81 7d 94 0f 04 00 83 7f 43 52 45 41 54 | .avg(1).+.count(1)..}......CREAT |
1636e0 | 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 | E.TABLE.t2(a,b,c,d,PRIMARY.KEY(d |
163700 | 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | ))WITHOUT.ROWID;.CREATE.UNIQUE.I |
163720 | 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | NDEX.t2bc.ON.t2(b,c);.INSERT.INT |
163740 | 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t2(a,b,c,d).VALUES(1,2,3,4),(5 |
163760 | 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 | ,6,7,8),(9,2,3,10),(11,12,13,14) |
163780 | 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | .ON.CONFLICT(c,b).DO.UPDATE.SET. |
1637a0 | 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 61 66 66 69 6e 69 74 79 28 31 29 20 74 32 20 | a=a+1000;.SELECT.affinity(1).t2. |
1637c0 | 47 52 4f 55 50 20 42 59 20 7a 65 72 6f 62 6c 6f 62 28 31 29 81 76 94 0e 04 00 83 71 43 52 45 41 | GROUP.BY.zeroblob(1).v.....qCREA |
1637e0 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
163800 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
163820 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c);.INSERT.IN |
163840 | 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t2(a,b,c,d).VALUES(1,2,3,4),( |
163860 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | 5,6,7,8),(9,2,3,10),(11,12,13,14 |
163880 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
1638a0 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 4e 4f 54 27 78 27 20 46 52 4f 4d 20 74 32 | .a=a+1000;.SELECT.NOT'x'.FROM.t2 |
1638c0 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7e 94 0d 04 00 84 01 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;..~......CREATE.TAB |
1638e0 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
163900 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
163920 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
163940 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | a,b,c,d).VALUES(1,2,3,4),(5,6,7, |
163960 | 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 8),(9,2,3,10),(11,12,13,14).ON.C |
163980 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
1639a0 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 3f 49 53 27 78 27 20 46 52 4f 4d 20 | 000;.SELECT.DISTINCT?IS'x'.FROM. |
1639c0 | 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7e 94 0c 04 00 84 01 43 52 45 41 54 45 20 54 | t2.ORDER.BY.+a;..~......CREATE.T |
1639e0 | 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 | ABLE.t2(a,b,c,d,PRIMARY.KEY(d))W |
163a00 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
163a20 | 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t2bc.ON.t2(b,c);.INSERT.INTO.t |
163a40 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
163a60 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
163a80 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
163aa0 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 3f 2c 41 27 78 27 20 46 52 4f | +1000;.SELECT.DISTINCT?,A'x'.FRO |
163ac0 | 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 02 94 0b 04 00 84 09 43 52 45 41 54 45 | M.t2.ORDER.BY.+a;.........CREATE |
163ae0 | 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 | .TABLE.t2(a,b,c,d,PRIMARY.KEY(d) |
163b00 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | )WITHOUT.ROWID;.CREATE.UNIQUE.IN |
163b20 | 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | DEX.t2bc.ON.t2(b,c);.INSERT.INTO |
163b40 | 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | .t2(a,b,c,d).VALUES(1,2,3,4),(5, |
163b60 | 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a | 6,7,8),(9,2,3,10),(11,12,13,14). |
163b80 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ON.CONFLICT(c,b).DO.UPDATE.SET.a |
163ba0 | 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 3f 2c 20 27 78 27 20 61 | =a+1000;.SELECT.DISTINCT?,.'x'.a |
163bc0 | 2c 62 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 08 94 0a 04 00 84 15 | ,b.FROM.t2.ORDER.BY.+a;......... |
163be0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 | CREATE.TABLE.t2(a,b,c,d,PRIMARY. |
163c00 | 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 | KEY(d))WITHOUT.ROWID;.CREATE.UNI |
163c20 | 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 | QUE.INDEX.t2bc.ON.t2(b,c);.INSER |
163c40 | 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c | T.INTO.t2(a,b,c,d).VALUES(1,2,3, |
163c60 | 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 | 4),(5,6,7,8),(9,2,3,10),(11,12,1 |
163c80 | 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | 3,14).ON.CONFLICT(c,b).DO.UPDATE |
163ca0 | 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c | .SET.a=a+1000;.SELECT.DISTINCT*, |
163cc0 | 20 27 78 27 2c 61 2c 62 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 56 41 43 | .'x',a,b.FROM.t2.ORDER.BY.+a;VAC |
163ce0 | 55 55 4d 0a 82 02 94 09 04 00 84 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c | UUM.........CREATE.TABLE.t2(a,b, |
163d00 | 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | c,d,PRIMARY.KEY(d))WITHOUT.ROWID |
163d20 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 | ;.CREATE.UNIQUE.INDEX.t2bc.ON.t2 |
163d40 | 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 | (b,c);.INSERT.INTO.t2(a,b,c,d).V |
163d60 | 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c | ALUES(1,2,3,4),(5,6,7,8),(9,2,3, |
163d80 | 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c | 10),(11,12,13,14).ON.CONFLICT(c, |
163da0 | 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 | b).DO.UPDATE.SET.a=a+1000;.SELEC |
163dc0 | 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 2c 61 2c 20 2a 46 52 4f 4d 20 74 32 20 4f 52 44 | T.DISTINCT*,.'x',a,.*FROM.t2.ORD |
163de0 | 45 52 20 42 59 20 2b 61 3b 0a 82 06 94 08 04 00 84 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.+a;.........CREATE.TABLE.t |
163e00 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
163e20 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
163e40 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(a,b, |
163e60 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
163e80 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
163ea0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
163ec0 | 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 20 61 2c 62 2c 61 2c 62 20 46 | .SELECT.DISTINCT*,.'x'.a,b,a,b.F |
163ee0 | 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 08 94 07 04 00 84 15 43 52 45 41 | ROM.t2.ORDER.BY.+a;.........CREA |
163f00 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
163f20 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
163f40 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c);.INSERT.IN |
163f60 | 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t2(a,b,c,d).VALUES(1,2,3,4),( |
163f80 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | 5,6,7,8),(9,2,3,10),(11,12,13,14 |
163fa0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
163fc0 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 2a 2c 20 27 78 27 | .a=a+1000;.SELECT.DISTINCT*,.'x' |
163fe0 | 20 61 2c 62 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 56 41 43 55 55 4d 0a | .a,b.FROM.t2.ORDER.BY.+a;VACUUM. |
164000 | 0d 00 00 00 1f 00 f6 00 1f 03 1d f9 1c fc 1c 02 1b 08 1a 0e 19 14 18 1a 17 20 16 1d 15 11 14 0a | ................................ |
164020 | 12 fd 11 fb 11 01 10 07 0f 06 0e 05 0c fc 0b de 0a ae 09 b4 08 da 07 e0 06 e6 05 ec 04 f2 03 ee | ................................ |
164040 | 02 ea 01 f0 00 f6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
164060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
164080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1640a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1640c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1640e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 76 94 44 04 00 83 71 43 52 | .......................v.D...qCR |
164100 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 | EATE.TABLE.t2(a,b,c,d,PRIMARY.KE |
164120 | 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | Y(d))WITHOUT.ROWID;.CREATE.UNIQU |
164140 | 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 | E.INDEX.t2bc.ON.t2(c,c);.INSERT. |
164160 | 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 | INTO.t2(a,b,c,d).VALUES(1,2,3,4) |
164180 | 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c | ,(5,6,7,8),(9,2,3,10),(11,12,13, |
1641a0 | 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 14).ON.CONFLICT(c,b).DO.UPDATE.S |
1641c0 | 45 54 20 61 3d 61 2b 20 31 3d 31 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 | ET.a=a+.1=1;.SELECT.*,.'x'.FROM. |
1641e0 | 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 94 43 04 00 83 71 43 52 45 41 54 45 20 54 | t2.ORDER.BY.+a;..v.C...qCREATE.T |
164200 | 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 | ABLE.t2(a,b,c,d,PRIMARY.KEY(d))W |
164220 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | ITHOUT.ROWID;.CREATE.UNIQUE.INDE |
164240 | 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | X.t2bc.ON.t2(c,c);.INSERT.INTO.t |
164260 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
164280 | 37 2c 38 29 2c 28 39 2c 20 73 75 62 73 74 72 28 31 2c 31 2c 31 29 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,.substr(1,1,1),13,14).ON |
1642a0 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
1642c0 | 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 | +1000;.SELECT.*,.'x'.FROM.t2.ORD |
1642e0 | 45 52 20 42 59 20 2b 61 3b 0a 82 00 94 42 04 00 84 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.+a;....B....CREATE.TABLE.t |
164300 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
164320 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
164340 | 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c | .ON.t2(c,c);.INSERT.INTO.t2(a,b, |
164360 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 32 30 30 31 2d 30 | c,d).VALUES(1,2,3,4),(5,6,2001-0 |
164380 | 31 2d 30 31 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 32 30 30 31 2d 30 31 2d 30 31 31 33 2c 31 34 | 1-013,10),(11,12,2001-01-0113,14 |
1643a0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
1643c0 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 | .a=a+1000;.SELECT.*,.'x'.FROM.t2 |
1643e0 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 00 94 41 04 00 84 05 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;....A....CREATE.TAB |
164400 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
164420 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
164440 | 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(c,c);.INSERT.INTO.t2( |
164460 | 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 2d 75 | a,b,c,d).VALUES(1,2,3,4),(5,6,-u |
164480 | 6e 69 63 6f 64 65 28 31 29 2c 31 30 29 2c 28 31 31 2c 31 32 2c 32 30 30 31 2d 30 31 2d 30 31 31 | nicode(1),10),(11,12,2001-01-011 |
1644a0 | 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 | 3,14).ON.CONFLICT(c,b).DO.UPDATE |
1644c0 | 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f | .SET.a=a+1000;.SELECT.*,.'x'.FRO |
1644e0 | 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 94 40 04 00 83 71 43 52 45 41 54 45 | M.t2.ORDER.BY.+a;..v.@...qCREATE |
164500 | 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 | .TABLE.t2(a,b,c,d,PRIMARY.KEY(d) |
164520 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | )WITHOUT.ROWID;.CREATE.UNIQUE.IN |
164540 | 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | DEX.t2bc.ON.t2(c,c);.INSERT.INTO |
164560 | 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | .t2(a,b,c,d).VALUES(1,2,3,4),(5, |
164580 | 36 2c 2d 75 6e 69 63 6f 64 65 28 31 29 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a | 6,-unicode(1),10),(11,12,13,14). |
1645a0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ON.CONFLICT(c,b).DO.UPDATE.SET.a |
1645c0 | 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f | =a+1000;.SELECT.*,.'x'.FROM.t2.O |
1645e0 | 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 94 3f 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 | RDER.BY.+a;..v.?...qCREATE.TABLE |
164600 | 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | .t2(a,b,c,d,PRIMARY.KEY(d))WITHO |
164620 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
164640 | 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(c,c);.INSERT.INTO.t2(a, |
164660 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 20 75 6e 69 63 6f 64 65 28 31 29 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(.unicode(1),6,7,8) |
164680 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
1646a0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
1646c0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 | 0;.SELECT.*,.'x'.FROM.t2.ORDER.B |
1646e0 | 59 20 2b 61 3b 0a 81 76 94 3e 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c | Y.+a;..v.>...qCREATE.TABLE.t2(a, |
164700 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(d))WITHOUT.ROW |
164720 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
164740 | 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 | t2(c,c);.INSERT.INTO.t2(a,b,c,d) |
164760 | 20 56 41 4c 55 45 53 28 20 69 6e 73 74 72 28 3f 2c 31 29 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c | .VALUES(.instr(?,1),6,7,8),(9,2, |
164780 | 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 3,10),(11,12,13,14).ON.CONFLICT( |
1647a0 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c | c,b).DO.UPDATE.SET.a=a+1000;.SEL |
1647c0 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | ECT.*,.'x'.FROM.t2.ORDER.BY.+a;. |
1647e0 | 81 76 94 3d 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | .v.=...qCREATE.TABLE.t2(a,b,c,d, |
164800 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(d))WITHOUT.ROWID;.CR |
164820 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 63 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(c,c |
164840 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(a,b,c,d).VALUE |
164860 | 53 28 20 69 6e 73 74 72 28 31 2c 3f 29 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(.instr(1,?),6,7,8),(9,2,3,10), |
164880 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
1648a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c | O.UPDATE.SET.a=a+1000;.SELECT.*, |
1648c0 | 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 56 94 3c 04 00 | .'x'.FROM.t2.ORDER.BY.+a;..V.<.. |
1648e0 | 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .1CREATE.TABLE.t2(a,b,c,d,PRIMAR |
164900 | 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | Y.KEY(d))WITHOUT.ROWID;.CREATE.U |
164920 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 3c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t2bc.ON.t2(b<c);.INS |
164940 | 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t2(a,b,c,d).VALUES(1,2, |
164960 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
164980 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
1649a0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 3b 0a 81 76 94 3b 04 00 83 71 43 52 45 41 | TE.SET.a=a+1000;.S;..v.;...qCREA |
1649c0 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
1649e0 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
164a00 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 bb 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c)..INSERT.IN |
164a20 | 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t2(a,b,c,d).VALUES(1,2,3,4),( |
164a40 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | 5,6,7,8),(9,2,3,10),(11,12,13,14 |
164a60 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
164a80 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 | .a=a+1000;.SELECT.*,.'x'.FROM.t2 |
164aa0 | 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 2c 94 3a 04 00 84 5d 43 52 45 41 54 45 20 54 41 42 | .ORDER.BY.+a;..,.:...]CREATE.TAB |
164ac0 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
164ae0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
164b00 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c | t2bc.ON.t2(b,c);EXPLAIN.QUERY.PL |
164b20 | 41 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | AN.INSERT.INTO.t2(a,b,c,d).VALUE |
164b40 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,7,8),(9,2,3,10), |
164b60 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
164b80 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 45 58 50 4c 41 49 4e 20 51 55 | O.UPDATE.SET.a=a+1000;EXPLAIN.QU |
164ba0 | 45 52 59 20 50 4c 41 4e 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f | ERY.PLAN.SELECT.*,.'x'.FROM.t2.O |
164bc0 | 52 44 45 52 20 42 59 20 2b 61 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 82 1a | RDER.BY.+a;EXPLAIN.QUERY.PLAN... |
164be0 | 94 39 04 00 84 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 | .9...9CREATE.TABLE.t2(a,b,c,d,PR |
164c00 | 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | IMARY.KEY(d))WITHOUT.ROWID;.CREA |
164c20 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b | TE.UNIQUE.INDEX.t2bc.ON.t2(b,c); |
164c40 | 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | EXPLAIN.QUERY.PLAN.INSERT.INTO.t |
164c60 | 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c | 2(a,b,c,d).VALUES(1,2,3,4),(5,6, |
164c80 | 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e | 7,8),(9,2,3,10),(11,12,13,14).ON |
164ca0 | 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 | .CONFLICT(c,b).DO.UPDATE.SET.a=a |
164cc0 | 2b 31 30 30 30 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 0a 53 45 4c 45 43 54 20 | +1000;EXPLAIN.QUERY.PLAN.SELECT. |
164ce0 | 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 05 94 38 | *,.'x'.FROM.t2.ORDER.BY.+a;....8 |
164d00 | 04 00 84 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ....CREATE.TABLE.t2(a,b,c,d,PRIM |
164d20 | 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(d))WITHOUT.ROWID;.CREATE |
164d40 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 45 58 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);EX |
164d60 | 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 20 56 41 | PLAIN.INSERT.INTO.t2(a,b,c,d).VA |
164d80 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 | LUES(1,2,3,4),(5,6,7,8),(9,2,3,1 |
164da0 | 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | 0),(11,12,13,14).ON.CONFLICT(c,b |
164dc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
164de0 | 20 44 49 53 54 49 4e 43 54 20 40 31 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 | .DISTINCT.@1'x'.FROM.t2.ORDER.BY |
164e00 | 20 40 31 3b 0a 81 7d 94 37 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 | .@1;..}.7....CREATE.TABLE.t2(a,b |
164e20 | 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | ,c,d,PRIMARY.KEY(d))WITHOUT.ROWI |
164e40 | 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 | D;.CREATE.UNIQUE.INDEX.t2bc.ON.t |
164e60 | 32 28 62 2c 63 29 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | 2(b,c);EXPLAIN.INSERT.INTO.t2(a, |
164e80 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 7a | b,c,d).VALUES(1,2,3,4),(5,6,7,.z |
164ea0 | 65 72 6f 62 6c 6f 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | eroblob(1)),(11,12,13,14).ON.CON |
164ec0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.a=a+100 |
164ee0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 62 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 | 0;.SELECT.*,.a,b.FROM.t2.GROUP.B |
164f00 | 59 20 2b 61 3b 0a 81 7d 94 36 04 00 83 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c | Y.+a;..}.6....CREATE.TABLE.t2(a, |
164f20 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(d))WITHOUT.ROW |
164f40 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
164f60 | 74 32 28 62 2c 63 29 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 | t2(b,c);EXPLAIN.INSERT.INTO.t2(a |
164f80 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 20 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,. |
164fa0 | 7a 65 72 6f 62 6c 6f 62 28 31 29 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f | zeroblob(1)),(11,12,13,14).ON.CO |
164fc0 | 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 | NFLICT(c,b).DO.UPDATE.SET.a=a+10 |
164fe0 | 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 | 00;.SELECT.*,.'x'.FROM.t2.GROUP. |
165000 | 42 59 20 2b 61 3b 0a 81 76 94 35 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 | BY.+a;..v.5...qCREATE.TABLE.t2(a |
165020 | 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f | ,b,c,d,PRIMARY.KEY(d))WITHOUT.RO |
165040 | 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e | WID;.CREATE.UNIQUE.INDEX.t2bc.ON |
165060 | 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 | .t2(b,c);.INSERT.INTO.t2(c,b,c,d |
165080 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 | ).VALUES(1,2,3,4),(5,6,7,8),(9,2 |
1650a0 | 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,3,10),(11,12,13,14).ON.CONFLICT |
1650c0 | 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 | (c,b).DO.UPDATE.SET.a=a+1000;.SE |
1650e0 | 4c 45 43 54 20 61 76 67 28 31 29 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b | LECT.avg(1).FROM.t2.ORDER.BY.+a; |
165100 | 0a 81 76 94 34 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 | ..v.4...qCREATE.TABLE.t2(a,b,c,d |
165120 | 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | ,PRIMARY.KEY(d))WITHOUT.ROWID;.C |
165140 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c | REATE.UNIQUE.INDEX.t2bc.ON.t2(b, |
165160 | 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | c);.INSERT.INTO.t2(c,b,c,d).VALU |
165180 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 | ES(1,2,3,4),(5,6,7,8),(9,2,3,10) |
1651a0 | 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 | ,(11,12,13,14).ON.CONFLICT(c,b). |
1651c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 4e | DO.UPDATE.SET.a=a+1000;.SELECT.N |
1651e0 | 4f 54 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7e 94 33 04 | OT'x'.FROM.t2.ORDER.BY.+a;..~.3. |
165200 | 00 84 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 | ...CREATE.TABLE.t2(a,b,c,d,PRIMA |
165220 | 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | RY.KEY(d))WITHOUT.ROWID;.CREATE. |
165240 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e | UNIQUE.INDEX.t2bc.ON.t2(b,c);.IN |
165260 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t2(c,b,c,d).VALUES(1,2 |
165280 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 | ,3,4),(5,6,7,8),(9,2,3,10),(11,1 |
1652a0 | 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 | 2,13,14).ON.CONFLICT(c,b).DO.UPD |
1652c0 | 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 | ATE.SET.a=a+1000;.SELECT.DISTINC |
1652e0 | 54 2a 2c 20 61 2c 20 2a 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 09 94 | T*,.a,.*FROM.t2.ORDER.BY.+a;.... |
165300 | 32 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | 2....CREATE.TABLE.t2(a,b,c,d,PRI |
165320 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
165340 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
165360 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(c,b,c,d).VALUES(1 |
165380 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
1653a0 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
1653c0 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 73 71 | PDATE.SET.a=a+1000;.SELECT.*,.sq |
1653e0 | 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 32 20 4f 52 44 | lite_source_id().a,b.FROM.t2.ORD |
165400 | 45 52 20 42 59 20 2b 61 3b 0a 82 03 94 31 04 00 84 0b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ER.BY.+a;....1....CREATE.TABLE.t |
165420 | 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 | 2(a,b,c,d,PRIMARY.KEY(d))WITHOUT |
165440 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 | .ROWID;.CREATE.UNIQUE.INDEX.t2bc |
165460 | 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c | .ON.t2(b,c);.INSERT.INTO.t2(c,b, |
165480 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
1654a0 | 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c | 9,2,3,10),(11,12,13,14).ON.CONFL |
1654c0 | 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b | ICT(c,b).DO.UPDATE.SET.a=a+1000; |
1654e0 | 0a 53 45 4c 45 43 54 20 2a 2c 20 72 6f 75 6e 64 28 31 2c 31 29 4f 52 20 27 78 27 20 46 52 4f 4d | .SELECT.*,.round(1,1)OR.'x'.FROM |
165500 | 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 82 08 94 30 04 00 84 15 43 52 45 41 54 45 20 | .t2.ORDER.BY.+a;....0....CREATE. |
165520 | 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 | TABLE.t2(a,b,c,d,PRIMARY.KEY(d)) |
165540 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | WITHOUT.ROWID;.CREATE.UNIQUE.IND |
165560 | 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EX.t2bc.ON.t2(b,c);.INSERT.INTO. |
165580 | 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t2(c,b,c,d).VALUES(1,2,3,4),(5,6 |
1655a0 | 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f | ,7,8),(9,2,3,10),(11,12,13,14).O |
1655c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | N.CONFLICT(c,b).DO.UPDATE.SET.a= |
1655e0 | 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 | a+1000;.SELECT.*,.group_concat(1 |
165600 | 2c 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 7f 94 | ,1).'x'.FROM.t2.ORDER.BY.+a;.... |
165620 | 2f 04 00 84 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 | /....CREATE.TABLE.t2(a,b,c,d,PRI |
165640 | 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | MARY.KEY(d))WITHOUT.ROWID;.CREAT |
165660 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a | E.UNIQUE.INDEX.t2bc.ON.t2(b,c);. |
165680 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t2(c,b,c,d).VALUES(1 |
1656a0 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 | ,2,3,4),(5,6,7,8),(9,2,3,10),(11 |
1656c0 | 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 | ,12,13,14).ON.CONFLICT(c,b).DO.U |
1656e0 | 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 63 6f | PDATE.SET.a=a+1000;.SELECT.*,.co |
165700 | 75 6e 74 28 31 29 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | unt(1).'x'.FROM.t2.ORDER.BY.+a;. |
165720 | 81 76 94 2e 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c | .v.....qCREATE.TABLE.t2(a,b,c,d, |
165740 | 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | PRIMARY.KEY(d))WITHOUT.ROWID;.CR |
165760 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 | EATE.UNIQUE.INDEX.t2bc.ON.t2(b,c |
165780 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t2(c,b,c,d).VALUE |
1657a0 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c | S(1,2,3,4),(5,6,7,8),(9,2,3,10), |
1657c0 | 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 | (11,12,13,14).ON.CONFLICT(c,b).D |
1657e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c | O.UPDATE.SET.a=a+1000;.SELECT.*, |
165800 | 20 61 2c 62 20 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 3b 0a 81 76 94 2d 04 00 | .a,b.FROM.t2.GROUP.BY.+a;..v.-.. |
165820 | 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 | .qCREATE.TABLE.t2(a,b,c,d,PRIMAR |
165840 | 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 | Y.KEY(d))WITHOUT.ROWID;.CREATE.U |
165860 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 | NIQUE.INDEX.t2bc.ON.t2(b,c);.INS |
165880 | 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t2(c,b,c,d).VALUES(1,2, |
1658a0 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 | 3,4),(5,6,7,8),(9,2,3,10),(11,12 |
1658c0 | 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 | ,13,14).ON.CONFLICT(c,b).DO.UPDA |
1658e0 | 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 20 2a 46 | TE.SET.a=a+1000;.SELECT.*,.a,.*F |
165900 | 52 4f 4d 20 74 32 20 cf 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 94 2c 04 00 83 71 43 52 45 41 | ROM.t2..RDER.BY.+a;..v.,...qCREA |
165920 | 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 | TE.TABLE.t2(a,b,c,d,PRIMARY.KEY( |
165940 | 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | d))WITHOUT.ROWID;.CREATE.UNIQUE. |
165960 | 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e | INDEX.t2bc.ON.t2(b,c);.INSERT.IN |
165980 | 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t2(c,b,c,d).VALUES(1,2,3,4),( |
1659a0 | 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 | 5,6,7,8),(9,2,3,10),(11,12,13,14 |
1659c0 | 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ).ON.CONFLICT(c,b).DO.UPDATE.SET |
1659e0 | 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 20 2a 46 52 4f 4d 20 74 32 | .a=a+1000;.SELECT.*,.a,.*FROM.t2 |
165a00 | 20 57 48 45 52 45 20 42 59 20 2b 61 3b 0a 81 76 94 2b 04 00 83 71 43 52 45 41 54 45 20 54 41 42 | .WHERE.BY.+a;..v.+...qCREATE.TAB |
165a20 | 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 | LE.t2(a,b,c,d,PRIMARY.KEY(d))WIT |
165a40 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | HOUT.ROWID;.CREATE.UNIQUE.INDEX. |
165a60 | 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | t2bc.ON.t2(b,c);.INSERT.INTO.t2( |
165a80 | 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c | c,b,c,d).VALUES(1,2,3,4),(5,6,7, |
165aa0 | 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 | 8),(9,2,3,10),(11,12,13,14).ON.C |
165ac0 | 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 | ONFLICT(c,b).DO.UPDATE.SET.a=a+1 |
165ae0 | 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 61 2c 20 2a 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 | 000;.SELECT.*,.a,.*FROM.t2.ORDER |
165b00 | 20 42 59 20 ab 61 3b 0a 81 76 94 2a 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | .BY..a;..v.*...qCREATE.TABLE.t2( |
165b20 | 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 | a,b,c,d,PRIMARY.KEY(d))WITHOUT.R |
165b40 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f | OWID;.CREATE.UNIQUE.INDEX.t2bc.O |
165b60 | 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c | N.t2(b,c);.INSERT.INTO.t2(c,b,c, |
165b80 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c | d).VALUES(1,2,3,4),(5,6,7,8),(9, |
165ba0 | 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 | 2,3,10),(11,12,13,14).ON.CONFLIC |
165bc0 | 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 | T(c,b).DO.UPDATE.SET.a=a+1000;.S |
165be0 | 45 4c 45 43 54 20 2a 2c 20 61 2c 20 2a 46 52 4f 4d 20 74 32 20 47 52 4f 55 50 20 42 59 20 2b 61 | ELECT.*,.a,.*FROM.t2.GROUP.BY.+a |
165c00 | 3b 0a 81 76 94 29 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c | ;..v.)...qCREATE.TABLE.t2(a,b,c, |
165c20 | 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | d,PRIMARY.KEY(d))WITHOUT.ROWID;. |
165c40 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 | CREATE.UNIQUE.INDEX.t2bc.ON.t2(b |
165c60 | 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c | ,c);.INSERT.INTO.t2(c,b,c,d).VAL |
165c80 | 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 | UES(1,2,3,4),(5,6,7,8),(9,2,3,10 |
165ca0 | 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 | ),(11,12,13,14).ON.CONFLICT(c,b) |
165cc0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 | .DO.UPDATE.SET.a=a+1000;.SELECT. |
165ce0 | 2a 2c 20 2a 2c 20 2a 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 79 94 28 | *,.*,.*FROM.t2.ORDER.BY.+a;..y.( |
165d00 | 04 00 83 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d | ...wCREATE.TABLE.t2(a,b,c,d,PRIM |
165d20 | 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | ARY.KEY(d))WITHOUT.ROWID;.CREATE |
165d40 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 | .UNIQUE.INDEX.t2bc.ON.t2(b,c);.I |
165d60 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t2(c,b,c,d).VALUES(1, |
165d80 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c | 2,3,4),(5,6,7,8),(9,2,3,10),(11, |
165da0 | 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 | 12,13,14).ON.CONFLICT(c,b).DO.UP |
165dc0 | 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 | DATE.SET.a=a+1000;.SELECT.*,.'x' |
165de0 | 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 2b 32 20 44 45 53 43 0a 82 06 94 27 04 00 84 | .FROM.t2.ORDER.BY+2.DESC....'... |
165e00 | 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 | .CREATE.TABLE.t2(a,b,c,d,PRIMARY |
165e20 | 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e | .KEY(d))WITHOUT.ROWID;.CREATE.UN |
165e40 | 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 62 2c 63 29 3b 0a 49 4e 53 45 | IQUE.INDEX.t2bc.ON.t2(b,c);.INSE |
165e60 | 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t2(c,b,c,d).VALUES(1,2,3 |
165e80 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c | ,4),(5,6,7,8),(9,2,3,10),(11,12, |
165ea0 | 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 | 13,14).ON.CONFLICT(c,b).DO.UPDAT |
165ec0 | 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 | E.SET.a=a+1000;.SELECT.*,.'x'.FR |
165ee0 | 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 72 6f 75 6e 64 28 31 2c 31 29 4c 49 4d 49 54 20 2d | OM.t2.ORDER.BY.round(1,1)LIMIT.- |
165f00 | 31 3b 0a 81 79 94 26 04 00 83 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 | 1;..y.&...wCREATE.TABLE.t2(a,b,c |
165f20 | 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | ,d,PRIMARY.KEY(d))WITHOUT.ROWID; |
165f40 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 | .CREATE.UNIQUE.INDEX.t2bc.ON.t2( |
165f60 | 62 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 63 2c 62 2c 63 2c 64 29 20 56 41 | b,c);.INSERT.INTO.t2(c,b,c,d).VA |
165f80 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c 33 2c 31 | LUES(1,2,3,4),(5,6,7,8),(9,2,3,1 |
165fa0 | 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 63 2c 62 | 0),(11,12,13,14).ON.CONFLICT(c,b |
165fc0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 30 30 30 3b 0a 53 45 4c 45 43 54 | ).DO.UPDATE.SET.a=a+1000;.SELECT |
165fe0 | 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 4e 4f 54 2b 61 3b 0a | .*,.'x'.FROM.t2.ORDER.BY.NOT+a;. |
166000 | 0d 00 00 00 22 00 a7 00 1f 06 1e 0c 1d 7f 1c cd 1b 19 1a 60 19 23 18 40 17 5d 16 7a 15 97 14 ae | ...."..............`.#.@.].z.... |
166020 | 13 cf 12 e2 11 f8 11 12 10 2f 0f 4c 0e 69 0d 86 0c a3 0b c0 0a d3 09 f4 09 10 08 2c 07 3f 06 55 | ........./.L.i.............,.?.U |
166040 | 05 72 04 8f 03 b0 02 cd 01 ea 00 a7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .r.............................. |
166060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
166080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1660a0 | 00 00 00 00 00 00 00 82 3f 94 66 04 00 85 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ........?.f....CREATE.TABLE.t2(x |
1660c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 43 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRICARY.KEY,.y.INT.UNIQ |
1660e0 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a | UE)/*WIT.ROWI******************* |
166100 | 2a 2a 2a 2a 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | ****b);.INSERT.INTO.t3.VALUES(1, |
166120 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2a 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5)*(6,7),(3,1),(8,9) |
166140 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 2a 2a 2a | ,(6,11),(1,1);.IUE)/*WIT.ROWI*** |
166160 | 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 4e 41 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 | *************NAERT.INTO.t2(y,y). |
166180 | 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 62 6f 62 28 32 32 30 30 31 2d 30 31 2d 30 31 29 20 61 | SELECT.randombbob(22001-01-01).a |
1661a0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
1661c0 | 49 43 54 28 78 29 79 3d 6d 61 78 28 74 32 2e 79 2c 75 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 | ICT(x)y=max(t2.y,uCOLLATE.binary |
1661e0 | 64 65 64 2e 79 29 3b 0a 49 0a 81 5f 94 65 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ded.y);.I.._.e...CCREATE.TABLE.t |
166200 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 | 2(x.INTEGER.PR,MARY.KEY,.y.INT.U |
166220 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
166240 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
166260 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
166280 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
1662a0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | (x,y).SELECT@1=1.a,b.FROM.t3.WHE |
1662c0 | 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 64 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c | RE.true...y;.._.d...CCREATE.TABL |
1662e0 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PR,MARY.KEY,.y.IN |
166300 | 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
166320 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
166340 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
166360 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
166380 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | .t2(x,y).SELECT.1=1.a,b.FROM.t3. |
1663a0 | 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5b 94 63 04 00 83 3b 43 52 45 41 54 45 20 54 | WHERE.true...y;..[.c...;CREATE.T |
1663c0 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PR,MARY.KEY,.y |
1663e0 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
166400 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
166420 | 56 41 4c 55 45 53 28 31 2c 34 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,4),(3,4),(1,5),(6,7),(3 |
166440 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
166460 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
166480 | 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 62 04 00 83 43 43 52 45 41 54 45 20 54 41 | HERE.true...y;.._.b...CCREATE.TA |
1664a0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PR,MARY.KEY,.y. |
1664c0 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
1664e0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
166500 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 37 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,7),(1,7),(6,7),(3, |
166520 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
166540 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 | TO.t2(x,y).SELECT.1=1.a,b.FROM.t |
166560 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 61 04 00 83 43 43 52 45 41 54 45 | 3.WHERE.true...y;.._.a...CCREATE |
166580 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PR,MARY.KEY, |
1665a0 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
1665c0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
1665e0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,7),(6,7), |
166600 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
166620 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 20 61 2c 62 20 46 52 4f | .INTO.t2(x,y).SELECT@1=1.a,b.FRO |
166640 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 66 94 60 04 00 83 51 43 52 45 | M.t3.WHERE.true...y;..f.`...QCRE |
166660 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PR,MARY.K |
166680 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
1666a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
1666c0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,7),(6, |
1666e0 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
166700 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 6f 75 6e 64 28 31 2c | ERT.INTO.t2(x,y).SELECT.round(1, |
166720 | 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 | 1).a,b.FROM.t3.WHERE.true...y;.. |
166740 | 69 94 5f 04 00 83 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | i._...WCREATE.TABLE.t2(x.INTEGER |
166760 | 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PR,MARY.KEY,.y.INT.UNIQUE)/*WIT |
166780 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
1667a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
1667c0 | 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,7),(6,7),(3,1),(8,9),(6,11), |
1667e0 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
166800 | 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | T.randomblob(1).a,b.FROM.t3.WHER |
166820 | 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 60 94 5e 04 00 83 45 43 52 45 41 54 45 20 54 41 42 4c 45 | E.true...y;..`.^...ECREATE.TABLE |
166840 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PR,MARY.KEY,.y.INT |
166860 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
166880 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
1668a0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,7),(6,7),(3,1), |
1668c0 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
1668e0 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 62 20 46 52 4f 4d | t2(x,y).SELECT.random().a,b.FROM |
166900 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 81 60 94 5d 04 00 83 45 43 52 45 41 54 45 20 54 | .t3.WHERE.true...`.]...ECREATE.T |
166920 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PR,MARY.KEY,.y |
166940 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
166960 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
166980 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,7),(6,7),(3 |
1669a0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
1669c0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 62 20 | NTO.t2(x,y).SELECT.random().a,b. |
1669e0 | 46 52 4f 4d 20 74 33 00 57 48 45 52 45 20 74 72 75 65 0a 00 81 5b 94 5c 04 00 83 3b 43 52 45 41 | FROM.t3.WHERE.true...[.\...;CREA |
166a00 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PR,MARY.KE |
166a20 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
166a40 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
166a60 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,7),(6,7 |
166a80 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
166aa0 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 | RT.INTO.t2(x,y).SELECT.a,b.FROM. |
166ac0 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 69 94 5b 04 00 83 57 43 52 45 41 54 | t3.WHERE.true...y;..i.[...WCREAT |
166ae0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PR,MARY.KEY |
166b00 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
166b20 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
166b40 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,7),(6,7) |
166b60 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
166b80 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 32 30 30 31 2d 30 31 2d 30 31 | T.INTO.t2(x,y).SELECT.2001-01-01 |
166ba0 | 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a | 1=1.a,b.FROM.t3.WHERE.true...y;. |
166bc0 | 81 5f 94 5a 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | ._.Z...CCREATE.TABLE.t2(x.INTEGE |
166be0 | 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PR,MARY.KEY,.y.INT.UNIQUE)/*WI |
166c00 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
166c20 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
166c40 | 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,7),(6,7),(3,1),(8,9),(6,11) |
166c60 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
166c80 | 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 | CT.1=1.a,b.FROM.t3.WHERE.true... |
166ca0 | 79 3b 0a 81 5f 94 59 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | y;.._.Y...CCREATE.TABLE.t2(x.INT |
166cc0 | 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PR,MARY.KEY,.y.INT.UNIQUE)/ |
166ce0 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
166d00 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
166d20 | 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,7),(6,7),(3,1),(8,9),(6, |
166d40 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
166d60 | 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 00 57 48 45 52 45 20 74 72 75 65 | ELECT.1=1.a,b.FROM.t3.WHERE.true |
166d80 | 0a 00 20 79 3b 0a 81 5f 94 58 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | ...y;.._.X...CCREATE.TABLE.t2(x. |
166da0 | 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PR,MARY.KEY,.y.INT.UNIQU |
166dc0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
166de0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
166e00 | 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,7),(6,7),(3,1),(8,9), |
166e20 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
166e40 | 29 20 53 45 4c 45 43 54 20 31 3d 2d 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | ).SELECT.1=-.a,b.FROM.t3.WHERE.t |
166e60 | 72 75 65 0a 00 20 79 3b 0a 81 5f 94 57 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | rue...y;.._.W...CCREATE.TABLE.t2 |
166e80 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PR,MARY.KEY,.y.INT.UN |
166ea0 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
166ec0 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
166ee0 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
166f00 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
166f20 | 78 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 26 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | x,y).SELECT@1=1&a,b.FROM.t3.WHER |
166f40 | 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 56 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 | E.true...y;.._.V...CCREATE.TABLE |
166f60 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PR,MARY.KEY,.y.INT |
166f80 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
166fa0 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
166fc0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
166fe0 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
167000 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | t2(x,y).SELECT@1=1.a,b.FROM.t3.W |
167020 | 48 45 52 45 20 32 30 30 31 2d 30 31 2d 30 31 81 5f 94 55 04 00 83 43 43 52 45 41 54 45 20 54 41 | HERE.2001-01-01._.U...CCREATE.TA |
167040 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PR,MARY.KEY,.y. |
167060 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
167080 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
1670a0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
1670c0 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
1670e0 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 | TO.t2(x,y).SELECT@1=1.a,b.FROM.t |
167100 | 33 00 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 62 94 54 04 00 83 49 43 52 45 41 54 45 | 3.WHERE.true...y;..b.T...ICREATE |
167120 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PR,MARY.KEY, |
167140 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
167160 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
167180 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
1671a0 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
1671c0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 20 61 2c 20 40 31 62 20 | .INTO.t2(x,y).SELECT@1=1.a,.@1b. |
1671e0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 66 94 53 04 00 83 51 | FROM.t3.WHERE.true...y;..f.S...Q |
167200 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PR,MAR |
167220 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
167240 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
167260 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
167280 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
1672a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 6f 75 6e 64 | INSERT.INTO.t2(x,y).SELECT.round |
1672c0 | 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 | (1,1).a,b.FROM.t3.WHERE.true...y |
1672e0 | 3b 0a 81 69 94 52 04 00 83 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;..i.R...WCREATE.TABLE.t2(x.INTE |
167300 | 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PR,MARY.KEY,.y.INT.UNIQUE)/* |
167320 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
167340 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
167360 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
167380 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
1673a0 | 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | LECT.randomblob(1).a,b.FROM.t3.W |
1673c0 | 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5b 94 51 04 00 83 3b 43 52 45 41 54 45 20 54 41 | HERE.true...y;..[.Q...;CREATE.TA |
1673e0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PR,MARY.KEY,.y. |
167400 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
167420 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
167440 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
167460 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
167480 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
1674a0 | 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 65 94 50 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 | ERE.true...y;..e.P...OCREATE.TAB |
1674c0 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PR,MARY.KEY,.y.I |
1674e0 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
167500 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
167520 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
167540 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
167560 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 6c 69 6b 65 6c 79 28 31 29 62 20 46 | O.t2(x,y).SELECT.a,.likely(1)b.F |
167580 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 4f 04 00 83 43 43 | ROM.t3.WHERE.true...y;.._.O...CC |
1675a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PR,MARY |
1675c0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
1675e0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
167600 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
167620 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
167640 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 3e 61 2c | NSERT.INTO.t2(x,y).SELECT.1=1>a, |
167660 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 4e 04 00 | b.FROM.t3.WHERE.true...y;.._.N.. |
167680 | 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 2c 4d | .CCREATE.TABLE.t2(x.INTEGER.PR,M |
1676a0 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
1676c0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
1676e0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
167700 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
167720 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 | ;.INSERT.INTO.t2(x,y).SELECT.1=1 |
167740 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5f 94 | .a,b.FROM.t3.WHERE.true...y;.._. |
167760 | 4d 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | M...CCREATE.TABLE.t2(x.INTEGER.P |
167780 | 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 2c 49 51 55 45 29 2f 2a 57 49 54 20 52 | R,MARY.KEY,.y.INT.U,IQUE)/*WIT.R |
1677a0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
1677c0 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
1677e0 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
167800 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 40 | ,1);.INSERT.INTO.t2(x,y).SELECT@ |
167820 | 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a | 1=1.a,b.FROM.t3.WHERE.true...y;. |
167840 | 81 5f 94 4c 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | ._.L...CCREATE.TABLE.t2(x.INTEGE |
167860 | 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 2c 49 51 55 45 29 2f 2a 57 49 | R.PR,MARY.KEY,.y.INT.U,IQUE)/*WI |
167880 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
1678a0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
1678c0 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
1678e0 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
167900 | 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 | CT.1=1.a,b.FROM.t3.WHERE.true... |
167920 | 79 3b 0a 82 39 94 4b 04 00 84 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | y;..9.K...wCREATE.TABLE.t2(x.INT |
167940 | 45 47 45 52 20 44 45 53 43 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.DESCARY.KEY,.y.INT.UNIQUE)/ |
167960 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
167980 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
1679a0 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
1679c0 | 31 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | 11),(8,9),(6,11),(1,1);.INSERT.I |
1679e0 | 4e 54 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | NT(1,1);.INSERT.INTO.t2(x,y).SEL |
167a00 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
167a20 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
167a40 | 20 20 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | .."a","b""a",excluded.y);.INSy;. |
167a60 | 81 35 94 4a 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .5.J...oCREATE.TABLE.t2(x.INTEGE |
167a80 | 52 20 44 45 46 41 55 4c 54 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.DEFAULT.KEY,.y.INT.UNIQUE)/*WI |
167aa0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
167ac0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
167ae0 | 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | ),(1,5),(.?16,7),(3,1),(8,9),(6, |
167b00 | 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 41 4e 41 4c 59 5a 45 0a 83 30 94 49 04 00 86 | 11),(1,1);VACUUM;ANALYZE..0.I... |
167b20 | 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 29 2f 2a 57 49 54 20 | eCREATE.TABLE.t2(x.INTEGE)/*WIT. |
167b40 | 52 57 49 44 2a 03 2c 45 20 54 41 42 74 72 75 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 43 4c 45 20 | RWID*.,E.TABtruAUTOINCREMENTCLE. |
167b60 | 20 49 4e 20 79 20 49 4e 54 20 55 4e 20 51 55 45 29 2f 2a 57 49 54 20 52 57 49 44 2a 03 e8 0a 43 | .IN.y.INT.UN.QUE)/*WIT.RWID*...C |
167b80 | 52 45 41 54 45 20 32 28 78 2c 79 29 20 61 45 4c 2c 62 29 3b 0a 64 65 64 2e 78 29 3b 0a 49 4e 53 | REATE.2(x,y).aEL,b);.ded.x);.INS |
167ba0 | 45 52 54 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 20 6a 73 6f | ERT.INSERT.INTO.t3.VALUES(1,.jso |
167bc0 | 6e 5f 74 79 70 65 28 31 2c 31 29 32 29 2c 28 33 2c 34 29 28 28 31 2c 35 29 2c 28 36 2c 37 29 2c | n_type(1,1)2),(3,4)((1,5),(6,7), |
167be0 | 28 33 2c 31 29 2c 28 98 2c 39 29 2c 28 36 2c ff 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(.,9),(6,.1),(1,1);.INSERT |
167c00 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 65 4c 45 43 54 20 61 2c 62 20 6a 73 6f 6e 5f 61 72 | .INTO.t2(x,y).SeLECT.a,b.json_ar |
167c20 | 72 61 79 28 31 2c 31 2c 31 29 74 72 75 65 0a 20 20 2f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | ray(1,1,1)true.../N.CONFLICT(x). |
167c40 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 fa 00 00 fa 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y....lude |
167c60 | 64 2e 78 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 6c 45 43 54 | d.x);.INSERT.INTO.t2(x,y).SElECT |
167c80 | 20 61 28 62 20 46 52 4f 57 49 44 2a 2f 3b 0a 43 52 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 6f | .a(b.FROWID*/;.CRM.t3.WHERE.truo |
167ca0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 01 29 20 45 20 79 3c 65 a7 a7 a7 a7 a7 a7 a7 a7 a7 | ...ON.CONFLICT(.).E.y<e......... |
167cc0 | a7 ae a7 a7 a7 a7 a7 a7 a7 a7 a7 3b 0a 81 2e 94 48 04 00 82 61 43 52 45 41 54 45 20 54 41 42 4c | ...........;....H...aCREATE.TABL |
167ce0 | 45 20 74 32 28 78 20 22 61 22 2c 22 62 22 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 22 61 22 2c | E.t2(x."a","b".PRIMARY.KEY,."a", |
167d00 | 22 62 22 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | "b"NIQUE)/*WIT.ROWID*/;.CREATE.T |
167d20 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
167d40 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 | UES(1,2),(3,4),(1,5),(.?16,7),(3 |
167d60 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 0a 81 | ,1),(8,9),(6,11),(1,1);VACUUM;.. |
167d80 | 09 94 47 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 | ..G....CREATE.TABLE.t2(a,b,c,d,P |
167da0 | 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | RIMARY.KEY(d))WITHOUT.ROWID;.CRE |
167dc0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 74 32 28 64 29 20 56 | ATE.UNIQUE.INDEX.t2bc.ON.t2(d).V |
167de0 | 41 4c 55 45 53 28 31 4e 0a 53 45 4c 45 43 54 20 2a 2c 20 27 63 2c 64 29 20 56 41 20 74 32 20 4f | ALUES(1N.SELECT.*,.'c,d).VA.t2.O |
167e00 | 52 44 45 52 20 42 59 20 2b 61 3b 0a 81 76 94 46 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 | RDER.BY.+a;..v.F...qCREATE.TABLE |
167e20 | 20 74 32 28 61 2c 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f | .t2(a,b,c,d,PRIMARY.KEY(d))WITHO |
167e40 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 | UT.ROWID;.CREATE.UNIQUE.INDEX.t2 |
167e60 | 62 63 20 4f 4e 20 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c | bc.ON.t2(c,c);.INSERT.INTO.t2(a, |
167e80 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
167ea0 | 2c 28 39 2c 32 2c 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e | ,(9,2,3,10),(11,12,13,14).ON.CON |
167ec0 | 46 4c 49 43 54 28 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 3d 61 2b 31 30 30 | FLICT(c,b).DO.UPDATE.SET.c=a+100 |
167ee0 | 30 3b 0a 53 45 4c 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 | 0;.SELECT.*,.'x'.FROM.t2.ORDER.B |
167f00 | 59 20 2b 61 3b 0a 81 76 94 45 04 00 83 71 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 61 2c | Y.+a;..v.E...qCREATE.TABLE.t2(a, |
167f20 | 62 2c 63 2c 64 2c 50 52 49 4d 41 52 59 20 4b 45 59 28 64 29 29 57 49 54 48 4f 55 54 20 52 4f 57 | b,c,d,PRIMARY.KEY(d))WITHOUT.ROW |
167f40 | 49 44 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 32 62 63 20 4f 4e 20 | ID;.CREATE.UNIQUE.INDEX.t2bc.ON. |
167f60 | 74 32 28 63 2c 63 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 61 2c 62 2c 63 2c 64 29 | t2(c,c);.INSERT.INTO.t2(a,b,c,d) |
167f80 | 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 39 2c 32 2c | .VALUES(1,2,3,4),(5,6,7,8),(9,2, |
167fa0 | 33 2c 31 30 29 2c 28 31 31 2c 31 32 2c 31 33 2c 31 34 29 0a 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | 3,10),(11,12,13,14).ON.CONFLICT( |
167fc0 | 63 2c 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 61 2b 31 3c 30 30 3b 0a 53 45 4c | c,b).DO.UPDATE.SET.a=a+1<00;.SEL |
167fe0 | 45 43 54 20 2a 2c 20 27 78 27 20 46 52 4f 4d 20 74 32 20 4f 52 44 45 52 20 42 59 20 2b 61 3b 0a | ECT.*,.'x'.FROM.t2.ORDER.BY.+a;. |
168000 | 0d 00 00 00 1f 00 cb 00 1f 71 1e e2 1e 2a 1d 67 1b d6 1a 4b 19 34 17 ef 17 60 15 dd 15 18 13 8d | .........q...*.g...K.4...`...... |
168020 | 12 a6 11 b3 10 30 0f 3e 0e 5f 0d 50 0c 71 0b 5a 0a 7b 09 9c 08 75 07 4e 06 5c 05 45 04 63 03 84 | .....0.>._.P.q.Z.{...u.N.\.E.c.. |
168040 | 02 a5 01 b3 00 cb 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
168060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
168080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1680a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1680c0 | 00 00 00 00 00 00 00 00 00 00 00 81 64 95 05 04 00 83 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ............d.....MCREATE.TABLE. |
1680e0 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
168100 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
168120 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
168140 | 53 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 33 2c 31 29 2c 28 | S(1,.sqlite_source_id()),(3,1),( |
168160 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
168180 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 20 7c 7c 20 62 20 46 | 2(x,y).SELECT.a,.random().||.b.F |
1681a0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 81 6e 95 04 04 00 83 61 43 52 45 41 54 | ROM.t3.WHERE.true...n.....aCREAT |
1681c0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
1681e0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
168200 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
168220 | 74 33 20 56 41 4c 55 45 53 28 31 2c 20 68 65 78 28 31 29 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,.hex(1)),(1,5),(6,7) |
168240 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
168260 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 | T.INTO.t2(x,y).SELECT.sqlite_sou |
168280 | 72 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 | rce_id().a,b.FROM.t3.ORDER.BY."a |
1682a0 | 22 2c 22 62 22 81 5b 95 03 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | ","b".[.....;CREATE.TABLE.t2(x.I |
1682c0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
1682e0 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
168300 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 20 68 | a,b);.INSERT.INTO.t3.VALUES(1,.h |
168320 | 65 78 28 31 29 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ex(1)),(1,5),(6,7),(3,1),(8,9),( |
168340 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
168360 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 | .SELECT.a,b.FROM.t3.WHERE.round( |
168380 | 31 2c 42 29 81 5b 95 02 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | 1,B).[.....;CREATE.TABLE.t2(x.IN |
1683a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
1683c0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
1683e0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 20 27 61 | ,b);.INSERT.INTO.t3.VALUES(1,.'a |
168400 | 27 27 62 27 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | ''b'),(1,5),(6,7),(3,1),(8,9),(6 |
168420 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
168440 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 31 | SELECT.a,b.FROM.t3.WHERE.round(1 |
168460 | 2c 42 29 81 5e 95 01 04 00 83 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | ,B).^.....ACREATE.TABLE.t2(x.INT |
168480 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
1684a0 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
1684c0 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 30 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(0,2),( |
1684e0 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
168500 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
168520 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 4e 4f 54 22 61 | ELECT.a,b.FROM.t3.ORDER.BY.NOT"a |
168540 | 22 2c 22 62 22 82 13 95 00 04 00 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | ","b".......+CREATE.TABLE.t2(x.I |
168560 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
168580 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
1685a0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 30 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(0,2) |
1685c0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
1685e0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
168600 | 20 53 45 4c 45 43 54 20 61 2c 3f 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,?.FROM.t3.WHERE.true.. |
168620 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
168640 | 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 6e 94 7f | max(."a",excluded.y);.INSy;..n.. |
168660 | 04 00 83 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...aCREATE.TABLE.t2(x.INTEGER.PR |
168680 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
1686a0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
1686c0 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 30 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(0,2),(3,4),(1 |
1686e0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
168700 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
168720 | 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 62 20 46 52 4f 4d 20 74 33 20 4f 52 | ,.sqlite_source_id()b.FROM.t3.OR |
168740 | 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 23 94 7e 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 | DER.BY."a","b".#.~...KCREATE.TAB |
168760 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
168780 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
1687a0 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
1687c0 | 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 2c 37 29 2c 28 33 2c 31 | LUES(.sqlite_source_id(),7),(3,1 |
1687e0 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
168800 | 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 30 | O.t2(y,y).SELECT.randomblob(2200 |
168820 | 31 2d 30 31 2d 30 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | 1-01-01).a,b.FROM.t3.WHERE.true. |
168840 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
168860 | 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 94 7d 04 00 84 4b 43 52 45 | =max(t2.y,uded.y);.I..#.}...KCRE |
168880 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
1688a0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
1688c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
1688e0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 2c | O.t3.VALUES(.sqlite_source_id(), |
168900 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
168920 | 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c | ERT.INTO.t2(y,y).SELECT.randombl |
168940 | 6f 62 28 31 30 30 31 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | ob(1001-01-011).a,b.FROM.t3.WHER |
168960 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
168980 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 81 5b 94 7c | E.SET.y=max(t2.y,uded.y);.I..[.| |
1689a0 | 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...;CREATE.TABLE.t2(x.INTEGER.PR |
1689c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
1689e0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
168a00 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 | ERT.INTO.t3.VALUES(.sqlite_sourc |
168a20 | 65 5f 69 64 28 29 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | e_id(),7),(3,1),(8,9),(6,11),(1, |
168a40 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
168a60 | 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 81 5b 94 7b 04 | ,b.FROM.t3.ORDER.BY."a","b".[.{. |
168a80 | 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..;CREATE.TABLE.t2(x.INTEGER.PRI |
168aa0 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
168ac0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
168ae0 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 20 68 65 78 28 31 29 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(.hex(1),4),(1, |
168b00 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
168b20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
168b40 | 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 13 94 7a 04 00 | b.FROM.t3.ORDER.BY."a","b"...z.. |
168b60 | 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .+CREATE.TABLE.t2(x.INTEGER.PRIM |
168b80 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
168ba0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
168bc0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 20 68 65 78 28 31 29 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(.hex(1),4),(1,5 |
168be0 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
168c00 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 3f | ;.INSERT.INTO.t2(x,y).SELECT.a,? |
168c20 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
168c40 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 | T(x).DO.UPDATE.SET.y=max(."a",ex |
168c60 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 5b 94 79 04 00 83 3b 43 52 45 41 54 45 20 | cluded.y);.INSy;..[.y...;CREATE. |
168c80 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
168ca0 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
168cc0 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
168ce0 | 20 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(.avg(1),4),(1,5),(6,7),( |
168d00 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
168d20 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
168d40 | 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 0b 94 78 04 00 84 1b 43 52 45 41 54 45 20 54 | ORDER.BY."a","b"...x....CREATE.T |
168d60 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
168d80 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
168da0 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
168dc0 | 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 34 29 2c 28 20 61 76 67 28 31 29 2c 37 29 2c 28 33 | VALUES(.avg(1),4),(.avg(1),7),(3 |
168de0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
168e00 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
168e20 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
168e40 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 ac 75 64 65 64 2e 79 29 3b 79 3b 0a 81 | DATE.SET.y=max(t2.y.uded.y);y;.. |
168e60 | 5b 94 77 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | [.w...;CREATE.TABLE.t2(x.INTEGER |
168e80 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
168ea0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
168ec0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 20 2f 2a 20 2a 2f 33 2c 34 29 | INSERT.INTO.t3.VALUES(./*.*/3,4) |
168ee0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
168f00 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
168f20 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 81 6e | T.a,b.FROM.t3.ORDER.BY."a","b".n |
168f40 | 94 76 04 00 83 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .v...aCREATE.TABLE.t2(x.INTEGER. |
168f60 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
168f80 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
168fa0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 20 2f 2a 20 2a 2f 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES./*.*/(3,4), |
168fc0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
168fe0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
169000 | 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | .sqlite_source_id().a,b.FROM.t3. |
169020 | 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 7f 94 75 04 00 86 03 43 52 45 41 54 45 20 54 | ORDER.BY."a","b"...u....CREATE.T |
169040 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
169060 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
169080 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
1690a0 | 53 45 4c 45 43 54 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | SELECT(1,2),(3,4),(1,5),(6,7),(3 |
1690c0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
1690e0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
169100 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
169120 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=max(t2.y,excluded.y); |
169140 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
169160 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
169180 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 | (x).DO.UPDATE.SET.y=excluded.y.W |
1691a0 | 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 6f 94 74 04 00 83 63 43 52 45 41 54 | HERE.y<excluded.y;..o.t...cCREAT |
1691c0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
1691e0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
169200 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 | EATE.TABLE.t3(a,b.char(1));.INSE |
169220 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
169240 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
169260 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 | );.INSERT.INTO.t2(x,y).SELECT.ze |
169280 | 72 6f 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 | roblob(1).a,b.FROM.t3.ORDER.BY." |
1692a0 | 61 22 2c 22 62 22 81 63 94 73 04 00 83 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | a","b".c.s...KCREATE.TABLE.t2(x. |
1692c0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
1692e0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
169300 | 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | (a,b.char(1));.INSERT.INTO.t3.VA |
169320 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
169340 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
169360 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
169380 | 52 45 20 72 6f 75 6e 64 28 31 2c 42 29 83 07 94 72 04 00 86 13 43 52 45 41 54 45 20 54 41 42 4c | RE.round(1,B)...r....CREATE.TABL |
1693a0 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
1693c0 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
1693e0 | 41 42 4c 45 20 74 33 28 61 2c 62 20 55 4e 49 51 55 45 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ABLE.t3(a,b.UNIQUE));.INSERT.INT |
169400 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
169420 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
169440 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
169460 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
169480 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
1694a0 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
1694c0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
1694e0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
169500 | 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 41 94 71 04 00 83 07 | d.y.WHERE.y<excluded.y;..A.q.... |
169520 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
169540 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
169560 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | /;.CREATE.TABLE.t3(R.PRIMARY.KEY |
169580 | 2c 20 79 20 49 61 2c 62 29 3b 52 45 49 4e 44 45 58 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | ,.y.Ia,b);REINDEX.INSERT.INTO.t3 |
1695a0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
1695c0 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 3b 0a 82 7f 94 | 3,1),(8,9),(6,11),(1,1);.IN;.... |
1695e0 | 70 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | p....CREATE.TABLE.t2(x.INTEGER.P |
169600 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
169620 | 4f 57 49 44 2a 2a 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID**;.CREATE.TABLE.t3(a,b);.IN |
169640 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
169660 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
169680 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
1696a0 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
1696c0 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
1696e0 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
169700 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
169720 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
169740 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
169760 | 81 0b 94 6f 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | ...o....CREATE.TABLE.t2(x.INTEGE |
169780 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.INT.UNIQUE)/*WI |
1697a0 | 54 20 52 00 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | T.R.WHERE.true...ON.CONFLICT(x). |
1697c0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=excluded.y.WHERE |
1697e0 | 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 41 94 6e 04 00 85 07 43 52 45 41 54 45 20 54 41 | .y<excluded.y;..A.n....CREATE.TA |
169800 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
169820 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 2a 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*W*T.ROWID*/;.CREATE |
169840 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
169860 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ALUES(1,2),(3,(6,7),(3,1),(8,9), |
169880 | 28 36 2c 31 31 29 2c 28 31 2c 31 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | (6,11),(1,1,4),(1,5),(6,7),(3,1) |
1698a0 | 2c 28 46 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(F,9),(6,11),(1,1);.INSERT.INTO |
1698c0 | 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 30 31 2d | .t2(y,y).SELECT.randomblob(2001- |
1698e0 | 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | 01-011).a,b.FROM.t3.WHERE.true.. |
169900 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 43 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SEC.y= |
169920 | 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 13 94 6d 04 00 84 2b 43 52 45 41 | max(t2.y,uded.y);.I....m...+CREA |
169940 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
169960 | 59 2c 20 79 20 49 4e 54 20 55 2c 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.U,IQUE)/*WIT.ROWID*/;.C |
169980 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
1699a0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
1699c0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
1699e0 | 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 | RT.INTO.t2(y,y).SELECT.1=1.a,b.F |
169a00 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
169a20 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 | x).DO.UPDATE.SET.y=max(t2.y,uded |
169a40 | 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 07 94 6c 04 00 86 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .y);.INSy;....l....CREATE.TABLE. |
169a60 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 22 61 22 2c | t2(x.INTEGER.PRIMARY.KEY,.y."a", |
169a80 | 22 62 22 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | "b"QUE)/*WIT.ROWID*/;.CREATE.TAB |
169aa0 | 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LE.t3(a,b.char(1));.INSERT.INTO. |
169ac0 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
169ae0 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
169b00 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
169b20 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
169b40 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(t2.y,excluded. |
169b60 | 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | y);.INSERT.INTO.t2(x,y).SELECT.a |
169b80 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
169ba0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e | ICT(x).DO.UPDATE.SET.y=excluded. |
169bc0 | 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0d 94 6b 04 00 86 1f 43 52 | y.WHERE.y<excluded.y;....k....CR |
169be0 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
169c00 | 4b 45 59 2c 20 71 75 6f 74 65 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 40 20 2a 2a 2a 2a 2a | KEY,.quote.UNIQUE)/*WIT.R@.***** |
169c20 | 2a 2a 2a 2a 49 44 2a 00 7f 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | ****ID*...CREATE.TABLE.t3(a,b);. |
169c40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
169c60 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 74 65 73 74 31 | ,(1,5),(6,7),(3,1),(8,9),(6test1 |
169c80 | 2c 31 31 29 2c 28 31 2c 31 28 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1(;.INSERT.INTO.t2(x,y). |
169ca0 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 17 20 | SELECT.a,b.FROM.t3.WHERE.true... |
169cc0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 80 00 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO..PDATE.SET.y=m |
169ce0 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 78 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ax(t2.y,excluded.x);.INSERT.INTO |
169d00 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 00 04 00 00 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELEC....b.FROM.t3.WHER |
169d20 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 30 49 00 80 28 78 49 20 33 2c 31 29 2c 28 38 2c | E.true...ON.CONF0I..(xI.3,1),(8, |
169d40 | 39 29 2c 28 36 2c 79 3d 65 65 78 74 72 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | 9),(6,y=eextrded.y.WHERE.y<exclu |
169d60 | 64 65 64 2e 79 10 0a 81 3f 94 6a 04 00 83 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y...?.j....CREATE.TABLE.t2(x |
169d80 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 43 55 52 52 45 4e 54 5f 54 49 | .INTEGER.PRIMARY.KEY,.CURRENT_TI |
169da0 | 4d 45 53 54 41 4d 50 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | MESTAMPy.INT.UNIQUE)/*WIT.ROWID* |
169dc0 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
169de0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
169e00 | 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | (.?16,7),(3,1),(8,9),(6,11),(1,1 |
169e20 | 29 3b 56 41 43 55 55 4d 3b 0a 81 34 94 69 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | );VACUUM;..4.i...mCREATE.TABLE.t |
169e40 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 22 61 22 2c 22 62 22 | 2(x.INTEGER.PRIMARY.KEY,."a","b" |
169e60 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
169e80 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
169ea0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 | (1,2),(3,4),(1,5),(.?16,7),(3,1) |
169ec0 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 56 41 43 55 55 | ,(8,9),(6,11),(1,1);VACUUM;VACUU |
169ee0 | 4d 0a 81 0b 94 68 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | M....h....CREATE.TABLE.t2(x.INTE |
169f00 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 29 20 79 20 55 4e 49 45 43 54 20 61 2c 62 20 46 52 | GER.PRIMARY.KEY).y.UNIECT.a,b.FR |
169f20 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
169f40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 | ).DO.UPDATE.SET.y=excluded.y.WHE |
169f60 | 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 0b 94 67 04 00 82 1b 43 52 45 41 54 45 20 | RE.y<excluded.y;....g....CREATE. |
169f80 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 29 00 | TABLE.t2(x.INTEGER.PRIMARY.KEY). |
169fa0 | 79 20 55 4e 49 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | y.UNIECT.a,b.FROM.t3.WHERE.true. |
169fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
169fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
16a000 | 0d 00 00 00 14 01 55 00 1e 69 1c dc 1b 4f 19 c2 18 32 16 a1 15 14 13 7d 11 e6 10 59 0e d2 0d 45 | ......U..i...O...2.....}...Y...E |
16a020 | 0b be 0a 32 08 a2 07 10 05 84 04 01 02 e2 01 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ...2...........U................ |
16a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16a140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 09 95 19 04 00 86 17 43 52 45 | .............................CRE |
16a160 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
16a180 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
16a1a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
16a1c0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 | O.t3.VALUES(1,2),(3,4),(1,.sqlit |
16a1e0 | 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | e_source_id()),(6,11),(1,1);.INS |
16a200 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
16a220 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
16a240 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
16a260 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
16a280 | 20 61 2c 20 74 72 69 6d 28 31 2c 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | .a,.trim(1,1)b.FROM.t3.WHERE.tru |
16a2a0 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
16a2c0 | 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 | .y=excluded.y.WHERE.y<excluded.y |
16a2e0 | 3b 0a 82 1b 95 18 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;........;CREATE.TABLE.t2(x.INTE |
16a300 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
16a320 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
16a340 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
16a360 | 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 | ,4),(1,.sqlite_source_id()),(6,1 |
16a380 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
16a3a0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
16a3c0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
16a3e0 | 28 20 20 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b | (.."a","b""a",excluded.y);.INSy; |
16a400 | 0a 82 7f 95 17 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | .........CREATE.TABLE.t2(x.INTEG |
16a420 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
16a440 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
16a460 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
16a480 | 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 31 | 4),(1,.sqlite_source_id()),(6,11 |
16a4a0 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
16a4c0 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
16a4e0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 20 6c 61 73 | CONFLICT(x).DO.UPDATE.SET.y=.las |
16a500 | 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t_insert_rowid();.INSERT.INTO.t2 |
16a520 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
16a540 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
16a560 | 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 | ET.y=excluded.y.WHERE.y<excluded |
16a580 | 2e 79 3b 0a 83 08 95 16 04 00 86 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;.........CREATE.TABLE.t2(x.IN |
16a5a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
16a5c0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
16a5e0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
16a600 | 28 33 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 | (3,4),(1,.sqlite_source_id()),(6 |
16a620 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
16a640 | 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | SELECT.a,.random()b.FROM.t3.WHER |
16a660 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
16a680 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
16a6a0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
16a6c0 | 4d 44 2a 2f 3b 0a 43 52 45 41 54 45 20 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | MD*/;.CREATE.ue...ON.CONFLICT(x) |
16a6e0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 00 00 | .DO.UPDATE.SET.y=excluded.y.WH.. |
16a700 | 00 64 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0e 95 15 04 00 86 21 43 52 45 41 54 45 20 54 | .dy<excluded.y;........!CREATE.T |
16a720 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
16a740 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
16a760 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
16a780 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 | VALUES(1,2),(3,4),(1,.sqlite_sou |
16a7a0 | 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | rce_id()),(6,11),(1,1);.INSERT.I |
16a7c0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 62 20 | NTO.t2(x,y).SELECT.a,.random()b. |
16a7e0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
16a800 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
16a820 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
16a840 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
16a860 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
16a880 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 56 41 43 55 55 | luded.y.WHERE.y<excluded.y;VACUU |
16a8a0 | 4d 0a 83 0c 95 14 04 00 86 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | M.........CREATE.TABLE.t2(x.INTE |
16a8c0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
16a8e0 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
16a900 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
16a920 | 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 | ,4),(1,.sqlite_source_id()),(6,1 |
16a940 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
16a960 | 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 20 7c 7c 20 62 20 46 52 4f 4d 20 74 33 20 57 48 | LECT.a,.random().||.b.FROM.t3.WH |
16a980 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
16a9a0 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
16a9c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
16a9e0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
16aa00 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
16aa20 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 08 95 13 04 00 86 15 43 52 45 41 54 45 | ERE.y<excluded.y;.........CREATE |
16aa40 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
16aa60 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
16aa80 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
16aaa0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 | 3.VALUES(1,2),(3,4),(1,.sqlite_s |
16aac0 | 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 2e 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | ource_id()),(6,.1),(1,1);.INSERT |
16aae0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 | .INTO.t2(x,y).SELECT.a,.random() |
16ab00 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
16ab20 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
16ab40 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | xcluded.y);.INSERT.INTO.t2(x,y). |
16ab60 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
16ab80 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
16aba0 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 03 | xcluded.y.WHERE.y<excluded.y;... |
16abc0 | 95 12 04 00 86 0b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | ......CREATE.TABLE.t2(x.INTEGER. |
16abe0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
16ac00 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
16ac20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
16ac40 | 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 31 2c 31 31 29 2c 28 | (1,.sqlite_source_id()),(1,11),( |
16ac60 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
16ac80 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
16aca0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
16acc0 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
16ace0 | 79 29 20 53 45 4c 45 43 54 20 61 2c 20 27 61 27 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | y).SELECT.a,.'a'b.FROM.t3.WHERE. |
16ad00 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
16ad20 | 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 | SET.y=excluded.y.WHERE.y<exclude |
16ad40 | 64 2e 79 3b 0a 83 09 95 11 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;.........CREATE.TABLE.t2(x.I |
16ad60 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
16ad80 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
16ada0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
16adc0 | 2c 28 33 2c 32 30 2e 31 2d 30 31 2d 30 31 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ,(3,20.1-01-014),(1,5),(6,7),(3, |
16ade0 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
16ae00 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
16ae20 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
16ae40 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
16ae60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
16ae80 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
16aea0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
16aec0 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 03 95 10 04 00 86 0b 43 52 45 41 54 45 | ERE.y<excluded.y;.........CREATE |
16aee0 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
16af00 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
16af20 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
16af40 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 27 61 27 27 62 27 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,.'a''b'),(6,7), |
16af60 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
16af80 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 | .INTO.t2(x,y).SELECT.a,b.FROM.t3 |
16afa0 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
16afc0 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(t2.y,excluded.y |
16afe0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
16b000 | 20 27 61 27 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | .'a'b.FROM.t3.WHERE.true...ON.CO |
16b020 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
16b040 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 09 95 0f 04 00 86 | ed.y.WHERE.y<excluded.y;........ |
16b060 | 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
16b080 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
16b0a0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
16b0c0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 20 7a 65 72 6f 62 6c | .INTO.t3.VALUES(1,2),(3,..zerobl |
16b0e0 | 6f 62 28 36 30 30 31 2d 30 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | ob(6001-01-011)),(3,1),(8,9),(6, |
16b100 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
16b120 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
16b140 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
16b160 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | x(t2.y,excluded.y);.INSERT.INTO. |
16b180 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
16b1a0 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
16b1c0 | 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 | .SET.y=excluded.y.WHERE.y<exclud |
16b1e0 | 65 64 2e 79 3b 0a 83 13 95 0e 04 00 86 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | ed.y;........+CREATE.TABLE.t2(x. |
16b200 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
16b220 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
16b240 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
16b260 | 29 2c 28 33 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 32 32 30 30 31 2d 30 31 2d 30 31 30 30 31 2d 30 | ),(3,..zeroblob(22001-01-01001-0 |
16b280 | 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | 1-011)),(3,1),(8,9),(6,11),(1,1) |
16b2a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
16b2c0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
16b2e0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
16b300 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
16b320 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
16b340 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
16b360 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 13 95 | cluded.y.WHERE.y<excluded.y;.... |
16b380 | 0d 04 00 86 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | ....+CREATE.TABLE.t2(x.INTEGER.P |
16b3a0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
16b3c0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
16b3e0 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 20 7a 65 | SERT.INTO.t3.VALUES(1,2),(3,..ze |
16b400 | 72 6f 62 6c 6f 62 28 32 30 32 30 30 31 2d 30 31 2d 30 31 30 31 2d 30 31 2d 30 31 31 29 29 2c 28 | roblob(202001-01-0101-01-011)),( |
16b420 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
16b440 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
16b460 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
16b480 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 | PDATE.SET.y=max(t2.y,excluded.y) |
16b4a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
16b4c0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
16b4e0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 | T(x).DO.UPDATE.SET.y=excluded.y. |
16b500 | 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 09 95 0c 04 00 86 17 43 52 45 41 | WHERE.y<excluded.y;.........CREA |
16b520 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
16b540 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
16b560 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
16b580 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 32 30 | .t3.VALUES(1,2),(3,..zeroblob(20 |
16b5a0 | 30 31 2d 30 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | 01-01-011)),(3,1),(8,9),(6,11),( |
16b5c0 | 33 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 3,1);.INSERT.INTO.t2(x,y).SELECT |
16b5e0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
16b600 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
16b620 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
16b640 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
16b660 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
16b680 | 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b | y=excluded.y.WHERE.y<excluded.y; |
16b6a0 | 0a 83 0d 95 0b 04 00 86 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | .........CREATE.TABLE.t2(x.INTEG |
16b6c0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
16b6e0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
16b700 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
16b720 | 20 20 7a 65 72 6f 62 6c 6f 62 28 32 30 30 31 2d 30 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 | ..zeroblob(2001-01-011)),(3,1),( |
16b740 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
16b760 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
16b780 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
16b7a0 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 | SET.y=max(t2.y,excluded.y);.INSE |
16b7c0 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 27 61 27 62 20 46 | RT.INTO.t2(x,y).SELECT.a,.'a'b.F |
16b7e0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
16b800 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
16b820 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0c 95 0a 04 00 86 1d 43 52 45 41 54 45 | ERE.y<excluded.y;.........CREATE |
16b840 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
16b860 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
16b880 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
16b8a0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 32 30 30 31 | 3.VALUES(1,2),(3,..zeroblob(2001 |
16b8c0 | 2d 30 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | -01-011)),(3,1),(8,9),(6,11),(1, |
16b8e0 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 2d | 1);.INSERT.INTO.t2(x,y).SELECT.- |
16b900 | 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | 1.a,b.FROM.t3.WHERE.true...ON.CO |
16b920 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
16b940 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | .y,excluded.y);.INSERT.INTO.t2(x |
16b960 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
16b980 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
16b9a0 | 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 | .y=excluded.y.WHERE.y<excluded.y |
16b9c0 | 3b 0a 83 09 95 09 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;.........CREATE.TABLE.t2(x.INTE |
16b9e0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
16ba00 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
16ba20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
16ba40 | 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 32 30 30 31 2d 30 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c | ,..zeroblob(2001-01-011)),(3,1), |
16ba60 | 28 38 2c 31 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,1),(6,11),(1,1);.INSERT.INTO. |
16ba80 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
16baa0 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
16bac0 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 | .SET.y=max(t2.y,excluded.y);.INS |
16bae0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
16bb00 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
16bb20 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=excluded.y.WHERE |
16bb40 | 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 09 95 08 04 00 86 17 43 52 45 41 54 45 20 54 41 | .y<excluded.y;.........CREATE.TA |
16bb60 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
16bb80 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
16bba0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
16bbc0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 31 32 30 30 31 2d 30 | ALUES(1,2),(3,..zeroblob(12001-0 |
16bbe0 | 31 2d 30 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | 1-01)),(3,1),(8,9),(6,11),(1,1); |
16bc00 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
16bc20 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
16bc40 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
16bc60 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
16bc80 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
16bca0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
16bcc0 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 09 95 07 | luded.y.WHERE.y<excluded.y;..... |
16bce0 | 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t2(x.INTEGER.PR |
16bd00 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
16bd20 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
16bd40 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 20 20 7a 65 72 | ERT.INTO.t3.VALUES(1,2),(3,..zer |
16bd60 | 6f 62 6c 6f 62 28 31 30 30 31 2d 30 31 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | oblob(1001-01-011)),(3,1),(8,9), |
16bd80 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
16bda0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
16bdc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
16bde0 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
16be00 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
16be20 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
16be40 | 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 | ATE.SET.y=excluded.y.WHERE.y<exc |
16be60 | 6c 75 64 65 64 2e 79 3b 0a 83 13 95 06 04 00 86 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | luded.y;........+CREATE.TABLE.t2 |
16be80 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
16bea0 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
16bec0 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
16bee0 | 31 2c 32 29 2c 28 32 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(2,4),(1,5),(6,7),(3,1),(8, |
16bf00 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
16bf20 | 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 | x,y).SELECT.total_changes()GLOB. |
16bf40 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
16bf60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
16bf80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
16bfa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
16bfc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
16bfe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
16c000 | 0d 09 a3 00 1a 00 93 00 1e 71 1c db 1b bc 1a dd 19 fe 18 6a 16 d2 16 1c 15 64 13 de 12 fc 11 62 | .........q.........j.....d.....b |
16c020 | 0f b9 0e 22 0c 8b 0b 74 0a 95 09 a9 08 84 07 6a 06 53 05 39 04 1c 02 ff 01 ce 00 93 00 00 00 00 | ..."...t.......j.S.9............ |
16c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 37 95 33 04 00 84 73 43 52 45 41 54 | ....................7.3...sCREAT |
16c0a0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
16c0c0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
16c0e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
16c100 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
16c120 | 2c 28 33 2c 31 29 2c 28 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(.randomblob(1),1);.INSER |
16c140 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 | T.INTO.t2(x,y).SELECT.zeroblob(1 |
16c160 | 29 47 4c 4f 42 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 20 61 2c | )GLOB.randomblob(12001-01-01).a, |
16c180 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
16c1a0 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
16c1c0 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 95 32 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 | xcluded.y);.I..-.2..._CREATE.TAB |
16c1e0 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
16c200 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
16c220 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
16c240 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
16c260 | 29 2c 28 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(.randomblob(1),1);.INSERT.INT |
16c280 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 47 4c 4f 42 | O.t2(x,y).SELECT.zeroblob(1)GLOB |
16c2a0 | 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | .randomblob(1).a,b.FROM.t3.WHERE |
16c2c0 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
16c2e0 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 | .SET.y=max(t2.y,excluded.y);.I.. |
16c300 | 19 95 31 04 00 84 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | ..1...7CREATE.TABLE.t2(x.INTEGER |
16c320 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
16c340 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
16c360 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
16c380 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 33 31 | ,(1,5),(6,7),(3,.randomblob(2031 |
16c3a0 | 2d 30 31 2d 30 31 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | -01-011)),(1,1);.INSERT.INTO.t2( |
16c3c0 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | x,y).SELECT.a,b.FROM.t3.WHERE.tr |
16c3e0 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
16c400 | 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 19 95 30 | T.y=max(."a",excluded.y);.I....0 |
16c420 | 04 00 84 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...7CREATE.TABLE.t2(x.INTEGER.PR |
16c440 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
16c460 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
16c480 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
16c4a0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 31 2d 30 31 | ,5),(6,7),(3,.randomblob(1001-01 |
16c4c0 | 2d 30 31 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | -011)),(1,1);.INSERT.INTO.t2(x,y |
16c4e0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
16c500 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
16c520 | 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 16 95 2f 04 00 84 | =max(."a",excluded.y);.I..../... |
16c540 | 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | 1CREATE.TABLE.t2(x.INTEGER.PRIMA |
16c560 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
16c580 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
16c5a0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
16c5c0 | 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 2c 28 31 2c 4e 4f 54 | ,(6,7),(3,.randomblob(1)),(1,NOT |
16c5e0 | 3f 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | ?);.INSERT.INTO.t2(x,y).SELECT.a |
16c600 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
16c620 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c | ICT(x).DO.UPDATE.SET.y=max(."a", |
16c640 | 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 13 95 2e 04 00 84 2b 43 52 45 41 54 | excluded.y);.INSy;........+CREAT |
16c660 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
16c680 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
16c6a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
16c6c0 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
16c6e0 | 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 2c 28 31 2c 3f 29 3b 0a 49 4e 53 45 52 | ,(3,.randomblob(1)),(1,?);.INSER |
16c700 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
16c720 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
16c740 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(."a",excluded. |
16c760 | 79 29 3b 0a 49 4e 53 79 3b 0a 82 16 95 2d 04 00 84 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | y);.INSy;....-...1CREATE.TABLE.t |
16c780 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
16c7a0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
16c7c0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
16c7e0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 | (1,2),(3,4),(1,5),(6,7),(3,.rand |
16c800 | 6f 6d 62 6c 6f 62 28 31 29 29 2c 28 31 2c 3f 20 2d 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | omblob(1)),(1,?.-1);.INSERT.INTO |
16c820 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
16c840 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
16c860 | 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(."a",excluded.y);.IN |
16c880 | 53 79 3b 0a 82 1b 95 2c 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | Sy;....,...;CREATE.TABLE.t2(x.IN |
16c8a0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
16c8c0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
16c8e0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
16c900 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 | (3,4),(1,5),(6,7),(3,.randomblob |
16c920 | 28 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | (1)),(1,1);.INSERT.INTO.t2(x,y). |
16c940 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
16c960 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
16c980 | 61 78 28 20 20 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 | ax(.."a","b""a",excluded.y);.INS |
16c9a0 | 79 3b 0a 00 00 00 06 04 00 81 68 95 2b 04 00 83 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | y;........h.+...UCREATE.TABLE.t2 |
16c9c0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
16c9e0 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
16ca00 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
16ca20 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 6a 73 6f 6e 28 | 1,2),(3,4),(1,5),(6,7),(3,.json( |
16ca40 | 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 1)),(1,1);.INSERT.INTO.t2(x,y).S |
16ca60 | 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f | ELECT.sqlite_source_id().a,b.FRO |
16ca80 | 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 81 5b 95 2a 04 00 83 3b 43 52 45 | M.t3.ORDER.BY."a","b".[.*...;CRE |
16caa0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
16cac0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
16cae0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
16cb00 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
16cb20 | 37 29 2c 28 33 2c 20 63 6f 61 6c 65 73 63 65 28 31 2c 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,.coalesce(1,1)),(1,1);.INS |
16cb40 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
16cb60 | 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 13 95 29 04 00 84 2b 43 52 45 41 | .t3.ORDER.BY."a","b"...)...+CREA |
16cb80 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
16cba0 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
16cbc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
16cbe0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
16cc00 | 29 2c 28 33 2c 20 27 61 27 27 62 27 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,.'a''b'),(6,11),(1,1);.INSE |
16cc20 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 | RT.INTO.t2(x,y).SELECT.a,b.FROM. |
16cc40 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
16cc60 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 | O.UPDATE.SET.y=max(."a",excluded |
16cc80 | 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 13 95 28 04 00 86 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .y);.INSy;....(...+CREATE.TABLE. |
16cca0 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
16ccc0 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
16cce0 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
16cd00 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 20 6a 73 6f 6e 5f | S(1,2),(3,4),(1,5),(6,7),(.json_ |
16cd20 | 67 72 6f 75 70 5f 61 72 72 61 79 28 3f 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | group_array(?),1);.INSERT.INTO.t |
16cd40 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f | 2(x,y).SELECT.total_changes()GLO |
16cd60 | 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | B.a,b.FROM.t3.WHERE.true...ON.CO |
16cd80 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
16cda0 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | .y,excluded.y);.INSERT.INTO.t2(x |
16cdc0 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
16cde0 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
16ce00 | 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 | .y=excluded.y.WHERE.y<excluded.y |
16ce20 | 3b 0a 83 13 95 27 04 00 86 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;....'...+CREATE.TABLE.t2(x.INTE |
16ce40 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
16ce60 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
16ce80 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
16cea0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 | ,4),(1,5),(6,7),(.json_group_arr |
16cec0 | 61 79 28 31 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | ay(1),1);.INSERT.INTO.t2(x,y).SE |
16cee0 | 4c 45 43 54 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 40 61 2c 62 20 46 52 4f | LECT.total_changes()GLOB@a,b.FRO |
16cf00 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
16cf20 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
16cf40 | 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | ed.y);.INSERT.INTO.t2(x,y).SELEC |
16cf60 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
16cf80 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
16cfa0 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 25 95 26 04 00 86 | ed.y.WHERE.y<excluded.y;..%.&... |
16cfc0 | 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | OCREATE.TABLE.t2(x.INTEGER.PRIMA |
16cfe0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
16d000 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
16d020 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
16d040 | 2c 28 36 2c 37 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 2c 31 29 3b | ,(6,7),(.json_group_array(1),1); |
16d060 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 | .INSERT.INTO.t2(x,y).SELECT.tota |
16d080 | 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 | l_changes()GLOB.json_array(1,1,1 |
16d0a0 | 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | ).a,b.FROM.t3.WHERE.true...ON.CO |
16d0c0 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
16d0e0 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | .y,excluded.y);.INSERT.INTO.t2(x |
16d100 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
16d120 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
16d140 | 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 | .y=excluded.y.WHERE.y<excluded.y |
16d160 | 3b 0a 83 16 95 25 04 00 86 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;....%...1CREATE.TABLE.t2(x.INTE |
16d180 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
16d1a0 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
16d1c0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
16d1e0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 | ,4),(1,5),(6,7),(.json_group_arr |
16d200 | 61 79 28 20 2d 31 31 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | ay(.-11),1);.INSERT.INTO.t2(x,y) |
16d220 | 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 61 2c 62 20 | .SELECT.total_changes()GLOB.a,b. |
16d240 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
16d260 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
16d280 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
16d2a0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
16d2c0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
16d2e0 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 5e 95 24 | luded.y.WHERE.y<excluded.y;..^.$ |
16d300 | 04 00 83 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...ACREATE.TABLE.t2(x.INTEGER.PR |
16d320 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
16d340 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
16d360 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
16d380 | 2c 35 29 2c 28 36 2c 32 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,2),(3,1),(8,9),(6,11),(1, |
16d3a0 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
16d3c0 | 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 76 65 72 61 22 2c 22 62 22 83 02 | ,b.FROM.t3.ORDER.BY."vera","b".. |
16d3e0 | 95 23 04 00 86 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .#....CREATE.TABLE.t2(x.INTEGER. |
16d400 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
16d420 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
16d440 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
16d460 | 28 31 2c 35 29 2c 28 20 3f 3d 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | (1,5),(.?=6,7),(3,1),(8,9),(6,11 |
16d480 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
16d4a0 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
16d4c0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
16d4e0 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t2.y,excluded.y);.INSERT.INTO.t2 |
16d500 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
16d520 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
16d540 | 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 | ET.y=excluded.y.WHERE.y<excluded |
16d560 | 2e 79 3b 0a 81 34 95 22 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;..4."...mCREATE.TABLE.t2(x.IN |
16d580 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
16d5a0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
16d5c0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
16d5e0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | (3,4),(1,5),(.?16,7),(3,1),(8,9) |
16d600 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 56 41 43 55 55 4d 0a 81 32 95 21 | ,(6,11),(1,1);VACUUM;VACUUM..2.! |
16d620 | 04 00 82 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...iCREATE.TABLE.t2(x.INTEGER.PR |
16d640 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
16d660 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
16d680 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
16d6a0 | 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,5),(.?16,7),(3,1),(8,9),(6,11), |
16d6c0 | 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 44 52 4f 50 0a 83 14 95 20 04 00 86 2d 43 52 45 41 54 45 | (1,1);VACUUM;DROP........-CREATE |
16d6e0 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
16d700 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
16d720 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
16d740 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c | 3.VALUES(1,2),(3,4),(1,5),(.?16, |
16d760 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
16d780 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f | ERT.INTO.t2(x,y).SELECT.group_co |
16d7a0 | 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | ncat(1,1).a,b.FROM.t3.WHERE.true |
16d7c0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
16d7e0 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.y);.INSERT.I |
16d800 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
16d820 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
16d840 | 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 | DATE.SET.y=excluded.y.WHERE.y<ex |
16d860 | 63 6c 75 64 65 64 2e 79 3b 0a 83 10 95 1f 04 00 86 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | cluded.y;........%CREATE.TABLE.t |
16d880 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
16d8a0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
16d8c0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
16d8e0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 | (1,2),(3,4),(1,5),(.?16,7),(3,1) |
16d900 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
16d920 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
16d940 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
16d960 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
16d980 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 | SERT.INTO.t2(x,y).SELECT.a,.rand |
16d9a0 | 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | omblob(1)b.FROM.t3.WHERE.true... |
16d9c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
16d9e0 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 5b | xcluded.y.WHERE.y<excluded.y;..[ |
16da00 | 95 1e 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .....;CREATE.TABLE.t2(x.INTEGER. |
16da20 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
16da40 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
16da60 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
16da80 | 28 31 2c 34 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,4),(6,7),(3,1),(8,9),(6,11),( |
16daa0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
16dac0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 3f 2c 42 29 81 5b 95 | .a,b.FROM.t3.WHERE.round(?,B).[. |
16dae0 | 1d 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | ....;CREATE.TABLE.t2(x.INTEGER.P |
16db00 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
16db20 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
16db40 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
16db60 | 31 2c 34 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,4),(6,7),(3,1),(8,9),(6,11),(1 |
16db80 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
16dba0 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 31 2c 42 29 82 1b 95 1c | a,b.FROM.t3.WHERE.round(1,B).... |
16dbc0 | 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...;CREATE.TABLE.t2(x.INTEGER.PR |
16dbe0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
16dc00 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
16dc20 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
16dc40 | 2c 31 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,1),(6,7),(3,1),(8,9),(6,11),(1, |
16dc60 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
16dc80 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
16dca0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 49 4e 28 20 20 22 79 22 | ICT(x).DO.UPDATE.SET.y=mIN(.."y" |
16dcc0 | 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 12 95 1b 04 | ,"b""a",excluded.y);.INSy;...... |
16dce0 | 00 86 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..)CREATE.TABLE.t2(x.INTEGER.PRI |
16dd00 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
16dd20 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
16dd40 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
16dd60 | 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | .sqlite_source_id()),(6,11),(1,1 |
16dd80 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 | );.INSERT.INTO.t2(x,y).SELECT.sq |
16dda0 | 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | lite_source_id().a,b.FROM.t3.WHE |
16ddc0 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
16dde0 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | TE.SET.y=max(t2.y,excluded.y);.I |
16de00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
16de20 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
16de40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 | ).DO.UPDATE.SET.y=excluded.y.WHE |
16de60 | 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0b 95 1a 04 00 86 1b 43 52 45 41 54 45 20 | RE.y<excluded.y;.........CREATE. |
16de80 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
16dea0 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
16dec0 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
16dee0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 20 73 71 6c 69 74 65 5f 73 6f | .VALUES(1,2),(3,4),(1,.sqlite_so |
16df00 | 75 72 63 65 5f 69 64 28 29 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | urce_id()),(6,11),(1,1);.INSERT. |
16df20 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
16df40 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
16df60 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 | PDATE.SET.y=max(t2.y,excluded.y) |
16df80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 | ;.INSERT.INTO.t2(x,y).SELECT.a,. |
16dfa0 | 7a 65 72 6f 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | zeroblob(1)b.FROM.t3.WHERE.true. |
16dfc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
16dfe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
16e000 | 0d 00 00 00 1b 01 37 00 1e cf 1d 9e 1c 77 1b 46 1a 62 19 27 18 4b 17 74 15 f1 14 da 13 c7 12 b4 | ......7......w.F.b.'.K.t........ |
16e020 | 11 92 10 6f 0f 20 0d d7 0c a7 0b 80 0a 45 09 0a 07 cb 06 99 05 b7 04 90 03 6d 02 46 01 37 00 00 | ...o.........E...........m.F.7.. |
16e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
16e120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 0b 95 4e 04 00 84 1b 43 | ..........................N....C |
16e140 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
16e160 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
16e180 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
16e1a0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
16e1c0 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
16e1e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 54 2e 20 2a 46 52 | NSERT.INTO.t2(x,y).SELECT.T..*FR |
16e200 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
16e220 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e | ).DO.UPDATE.SET.y=max(t2.y,uded. |
16e240 | 79 29 3b 79 3b 0a 82 23 95 4d 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | y);y;..#.M...KCREATE.TABLE.t2(x. |
16e260 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
16e280 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
16e2a0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
16e2c0 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
16e2e0 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
16e300 | 29 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 28 31 29 20 7c 7c 20 20 61 2c 62 20 46 52 4f | ).SELECT.DISTINCT(1).||..a,b.FRO |
16e320 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
16e340 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
16e360 | 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1f 95 4c 04 00 84 43 43 52 45 41 54 45 20 54 41 42 4c | ed.y);.INSy;....L...CCREATE.TABL |
16e380 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
16e3a0 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
16e3c0 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
16e3e0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
16e400 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
16e420 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 44 49 53 54 49 4e 43 54 28 31 29 20 61 2c 62 20 | .t2(x,y).SELECT.DISTINCT(1).a,b. |
16e440 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
16e460 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
16e480 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 23 95 4b 04 00 84 4b 43 52 45 41 54 45 20 54 | luded.y);.INSy;..#.K...KCREATE.T |
16e4a0 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
16e4c0 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
16e4e0 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
16e500 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
16e520 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
16e540 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 3a 65 72 6f 62 6c 6f 62 28 31 29 20 7c | NTO.t2(x,y).SELECT.:eroblob(1).| |
16e560 | 7c 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | |..a,b.FROM.t3.WHERE.true...ON.C |
16e580 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 | ONFLICT(x).DO.UPDATE.SET.y=max(t |
16e5a0 | 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 5e 95 4a 04 00 83 41 43 | 2.y,excluded.y);.INSy;..^.J...AC |
16e5c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
16e5e0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
16e600 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
16e620 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
16e640 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
16e660 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 2d 31 20 61 2c 62 | NSERT.INTO.t2(x,y).SELECT.-1.a,b |
16e680 | 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 2e 95 49 04 00 84 | .FROM.t3.ORDER.BY."a","b"...I... |
16e6a0 | 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | aCREATE.TABLE.t2(x.INTEGER.PRIMA |
16e6c0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
16e6e0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
16e700 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
16e720 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
16e740 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 | .INSERT.INTO.t2(x,y).SELECT..uni |
16e760 | 63 6f 64 65 28 31 29 20 7c 7c 20 72 6f 75 6e 64 28 31 2c 31 29 20 20 61 2c 62 20 46 52 4f 4d 20 | code(1).||.round(1,1)..a,b.FROM. |
16e780 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
16e7a0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 | O.UPDATE.SET.y=max(t2.y,excluded |
16e7c0 | 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 3b 95 48 04 00 84 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .y);.INSy;..;.H...{CREATE.TABLE. |
16e7e0 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
16e800 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
16e820 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
16e840 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
16e860 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
16e880 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c 61 73 | 2(x,y).SELECT..unicode(1).||.las |
16e8a0 | 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 20 7c 7c 20 20 20 61 2c 62 20 46 52 4f 4d 20 74 | t_insert_rowid().||...a,b.FROM.t |
16e8c0 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
16e8e0 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(t2.y,excluded. |
16e900 | 79 29 3b 0a 49 4e 53 79 3b 0a 82 37 95 47 04 00 84 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | y);.INSy;..7.G...sCREATE.TABLE.t |
16e920 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
16e940 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
16e960 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
16e980 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
16e9a0 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
16e9c0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c 61 73 74 | (x,y).SELECT..unicode(1).||.last |
16e9e0 | 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | _insert_rowid()..a,b.FROM.t3.WHE |
16ea00 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 79 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(y).DO.UPDA |
16ea20 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | TE.SET.y=max(t2.y,excluded.y);.I |
16ea40 | 4e 53 79 3b 0a 82 37 95 46 04 00 84 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | NSy;..7.F...sCREATE.TABLE.t2(x.I |
16ea60 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
16ea80 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
16eaa0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
16eac0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
16eae0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
16eb00 | 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c 61 73 74 5f 69 6e 73 65 | .SELECT..unicode(1).||.last_inse |
16eb20 | 72 74 5f 72 6f 77 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | rt_rowid()..a,b.FROM.t3.WHERE.tr |
16eb40 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
16eb60 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | T.y=max(t2.y,excluded.y);.INSy;. |
16eb80 | 82 23 95 45 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .#.E...KCREATE.TABLE.t2(x.INTEGE |
16eba0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.INT.UNIQUE)/*WI |
16ebc0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
16ebe0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
16ec00 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
16ec20 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
16ec40 | 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | CT..unicode(1).||..a,b.FROM.t3.W |
16ec60 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
16ec80 | 44 41 54 45 20 53 45 54 20 79 3d 20 75 6e 6c 69 6b 65 6c 79 28 31 29 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=.unlikely(1)luded.y); |
16eca0 | 0a 49 4e 53 79 3b 0a 82 2c 95 44 04 00 84 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .INSy;..,.D...]CREATE.TABLE.t2(x |
16ecc0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
16ece0 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
16ed00 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
16ed20 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
16ed40 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
16ed60 | 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 20 61 2c 20 72 61 6e | y).SELECT..unicode(1).||..a,.ran |
16ed80 | 64 6f 6d 28 29 20 7c 7c 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | dom().||.b.FROM.t3.WHERE.true... |
16eda0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
16edc0 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 82 45 95 43 04 00 85 0f 43 | ax(t2.y,excluded.y);.IN.E.C....C |
16ede0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
16ee00 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
16ee20 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
16ee40 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
16ee60 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
16ee80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f | NSERT.INTO.t2(x,y).SELECT..unico |
16eea0 | 64 65 28 31 29 20 7c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 7c 20 6c 61 73 74 5f 69 6e 73 65 | de(1).|.randomblob(1)|.last_inse |
16eec0 | 72 74 5f 72 6f 77 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | rt_rowid()..a,b.FROM.t3.WHERE.tr |
16eee0 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
16ef00 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | T.y=max(t2.y,excluded.y);.INSy;. |
16ef20 | 82 4b 95 42 04 00 85 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .K.B....CREATE.TABLE.t2(x.INTEGE |
16ef40 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.INT.UNIQUE)/*WI |
16ef60 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
16ef80 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
16efa0 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
16efc0 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
16efe0 | 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 | CT..unicode(1).|.last_insert_row |
16f000 | 69 64 28 29 7c 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 20 20 61 2c 62 20 46 | id()|.last_insert_rowid()..a,b.F |
16f020 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
16f040 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=max(t2.y,excl |
16f060 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1f 95 41 04 00 84 43 43 52 45 41 54 45 20 54 41 | uded.y);.INSy;....A...CCREATE.TA |
16f080 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
16f0a0 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
16f0c0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
16f0e0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
16f100 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
16f120 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 72 6f 75 6e 64 28 31 2c 31 29 26 61 2c | TO.t2(x,y).SELECT..round(1,1)&a, |
16f140 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
16f160 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
16f180 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1e 95 40 04 00 84 41 43 52 45 41 54 45 | xcluded.y);.INSy;....@...ACREATE |
16f1a0 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
16f1c0 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
16f1e0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
16f200 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
16f220 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
16f240 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 61 76 67 28 31 29 20 61 2c 20 | .INTO.t2(x,y).SELECT..avg(1).a,. |
16f260 | 61 62 73 28 31 29 62 20 46 52 4f 4d 20 74 32 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | abs(1)b.FROM.t2.WHERE.true...ON. |
16f280 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
16f2a0 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 82 0f 95 3f 04 00 84 23 43 52 45 41 | t2.y,excluded.y);.;....?...#CREA |
16f2c0 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
16f2e0 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
16f300 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
16f320 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
16f340 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
16f360 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 61 2c 62 61 2e 20 2a 2c | RT.INTO.t2(x,y).SELECT..a,ba..*, |
16f380 | 52 4f 4d 2c 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM,t3.WHERE.true...ON.CONFLICT( |
16f3a0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 | x).DO.UPDATE.SET.y=max(t2.y,uded |
16f3c0 | 2e 79 29 3b 79 3b 0a 82 0f 95 3e 04 00 84 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .y);y;....>...#CREATE.TABLE.t2(x |
16f3e0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
16f400 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
16f420 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
16f440 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
16f460 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
16f480 | 79 29 20 53 45 4c 45 43 54 20 20 61 2c 62 61 2e 20 2a 2c 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | y).SELECT..a,ba..*,ROM.t3.WHERE. |
16f4a0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
16f4c0 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 79 3b 0a 82 13 95 3d 04 00 | SET.y=max(t2.y,uded.y);y;....=.. |
16f4e0 | 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .+CREATE.TABLE.t2(x.INTEGER.PRIM |
16f500 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
16f520 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
16f540 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
16f560 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
16f580 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 78 29 20 53 45 4c 45 43 54 20 61 2c 3f | ;.INSERT.INTO.t2(x,x).SELECT.a,? |
16f5a0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
16f5c0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 | T(x).DO.UPDATE.SET.y=max(."a",ex |
16f5e0 | 63 6c 75 64 65 64 2e 79 29 3b 41 4e 41 4c 59 5a 45 82 7f 95 3c 04 00 86 03 43 52 45 41 54 45 20 | cluded.y);ANALYZE...<....CREATE. |
16f600 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
16f620 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
16f640 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
16f660 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
16f680 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
16f6a0 | 49 4e 54 4f 20 74 32 28 78 27 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x'y).SELECT.a,b.FROM.t3. |
16f6c0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
16f6e0 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 | PDATE.SET.y=max(t2.y,excluded.y) |
16f700 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
16f720 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
16f740 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 | T(x).DO.UPDATE.SET.y=excluded.y. |
16f760 | 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 53 95 3b 04 00 83 2b 43 52 45 41 | WHERE.y<excluded.y;..S.;...+CREA |
16f780 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
16f7a0 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
16f7c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
16f7e0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
16f800 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
16f820 | 52 54 20 49 4e 54 4f 20 74 32 20 2f 2a 20 2a 2f 53 45 4c 45 43 54 20 61 2e 20 2a 46 52 4f 4d 20 | RT.INTO.t2./*.*/SELECT.a..*FROM. |
16f840 | 74 33 20 60 61 60 52 45 79 3b 0a 81 58 95 3a 04 00 83 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t3.`a`REy;..X.:...5CREATE.TABLE. |
16f860 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
16f880 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
16f8a0 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
16f8c0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
16f8e0 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
16f900 | 32 20 2f 2a 20 2a 2f 53 45 4c 45 43 54 20 61 2e 20 2a 46 52 4f 4d 20 74 33 20 4c 49 4d 49 54 60 | 2./*.*/SELECT.a..*FROM.t3.LIMIT` |
16f920 | 61 60 52 45 79 3b 0a 82 37 95 39 04 00 84 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | a`REy;..7.9...sCREATE.TABLE.t2(x |
16f940 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
16f960 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
16f980 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
16f9a0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
16f9c0 | 2c 28 36 2c 30 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,01),(1,1);.INSERT.INTO.t2(x, |
16f9e0 | 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c 61 73 74 5f 69 6e | y).SELECT..unicode(1).||.last_in |
16fa00 | 73 65 72 74 5f 72 6f 77 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | sert_rowid()..a,b.FROM.t3.WHERE. |
16fa20 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
16fa40 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 | SET.y=max(t2.y,excluded.y);.INSy |
16fa60 | 3b 0a 81 60 95 38 04 00 83 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;..`.8...ECREATE.TABLE.t2(x.INTE |
16fa80 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
16faa0 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
16fac0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
16fae0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 36 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(6,9),(6,1 |
16fb00 | 31 29 2c 28 31 2c 31 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);REPLACE.INTO.t2(x,y).SE |
16fb20 | 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 61 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | LECT.random().a,a.FROM.t3.WHERE. |
16fb40 | 74 72 75 65 0a 00 82 2d 95 37 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | true...-.7..._CREATE.TABLE.t2(x. |
16fb60 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
16fb80 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
16fba0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
16fbc0 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 20 72 61 6e 64 | ),(3,4),(1,5),(6,7),(3,1),(.rand |
16fbe0 | 6f 6d 62 6c 6f 62 28 33 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | omblob(3),1);.INSERT.INTO.t2(x,y |
16fc00 | 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 47 4c 4f 42 20 72 61 6e 64 6f 6d 62 | ).SELECT.zeroblob(1)GLOB.randomb |
16fc20 | 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | lob(1).a,b.FROM.t3.WHERE.true... |
16fc40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
16fc60 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 95 36 04 00 84 4b 43 | ax(t2.y,excluded.y);.I..#.6...KC |
16fc80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
16fca0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
16fcc0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
16fce0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
16fd00 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 2c 31 29 3b 0a 49 | 6,7),(3,1),(.randomblob(1),1);.I |
16fd20 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c | NSERT.INTO.t2(x,y).SELECT.zerobl |
16fd40 | 6f 62 28 41 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | ob(A)GLOB.a,b.FROM.t3.WHERE.true |
16fd60 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
16fd80 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2d | y=max(t2.y,excluded.y);.INSy;..- |
16fda0 | 95 35 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .5..._CREATE.TABLE.t2(x.INTEGER. |
16fdc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
16fde0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
16fe00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
16fe20 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 | (1,5),(6,7),(3,1),(.randomblob(1 |
16fe40 | 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | ),1);.INSERT.INTO.t2(x,y).SELECT |
16fe60 | 20 7a 65 72 6f 62 6c 6f 62 28 31 29 47 4c 4f 42 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 34 29 20 61 | .zeroblob(1)GLOB.randomblob(4).a |
16fe80 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
16fea0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c | ICT(x).DO.UPDATE.SET.y=max(t2.y, |
16fec0 | 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 95 34 04 00 84 5f 43 52 45 41 54 45 20 54 41 | excluded.y);.I..-.4..._CREATE.TA |
16fee0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
16ff00 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
16ff20 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
16ff40 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
16ff60 | 31 29 2c 28 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(.randomblob(1),1);.INSERT.IN |
16ff80 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 47 4c 4f | TO.t2(x,y).SELECT.zeroblob(1)GLO |
16ffa0 | 42 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | B.randomblob(2).a,b.FROM.t3.WHER |
16ffc0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
16ffe0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a | E.SET.y=max(t2.y,excluded.y);.I. |
170000 | 0d 00 00 00 1d 00 43 00 1e d7 1d b9 1c c7 1b d5 1a b9 19 2d 17 a1 16 74 15 4b 14 54 13 21 12 34 | ......C............-...t.K.T.!.4 |
170020 | 11 0a 0f 77 0e 58 0d 39 0c 1f 0b 44 0a 65 09 86 08 a7 07 c8 06 e9 05 fe 05 13 04 28 02 a5 01 22 | ...w.X.9...D.e.............(..." |
170040 | 00 43 00 81 5b 95 6b 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | .C..[.k...;CREATE.TABLE.t2(x.INT |
170060 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
170080 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
1700a0 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
1700c0 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
1700e0 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
170100 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 30 2c | ELECT.a,b.FROM.t3.WHERE.round(0, |
170120 | 42 29 82 7f 95 6a 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | B)...j....CREATE.TABLE.t2(x.INTE |
170140 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
170160 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
170180 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
1701a0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
1701c0 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
1701e0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 6c 69 6b 65 6c 79 28 31 29 | LECT.a,b.FROM.t3.WHERE.likely(1) |
170200 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
170220 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | (t2.y,excluded.y);.INSERT.INTO.t |
170240 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
170260 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
170280 | 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 | SET.y=excluded.y.WHERE.y<exclude |
1702a0 | 64 2e 79 3b 0a 82 7f 95 69 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;....i....CREATE.TABLE.t2(x.I |
1702c0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
1702e0 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
170300 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
170320 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
170340 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
170360 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 5f 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE._rue.. |
170380 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
1703a0 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,excluded.y);.INSERT.INT |
1703c0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
1703e0 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
170400 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.y.WHERE.y<excl |
170420 | 75 64 65 64 2e 79 3b 0a 81 67 95 68 04 00 83 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | uded.y;..g.h...SCREATE.TABLE.t2( |
170440 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
170460 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
170480 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
1704a0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
1704c0 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
1704e0 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 20 60 61 | ,y).SELECT.a,b.FROM.t3.WHERE..`a |
170500 | 60 0a 20 20 49 4e 20 20 28 41 29 4f 52 20 74 72 75 65 0a 81 67 95 67 04 00 83 53 43 52 45 41 54 | `...IN..(A)OR.true..g.g...SCREAT |
170520 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
170540 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
170560 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
170580 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
1705a0 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
1705c0 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
1705e0 | 33 20 57 48 45 52 45 20 20 60 61 60 0a 20 20 49 4e 20 20 28 41 29 4c 49 43 54 28 79 3b 0a 81 67 | 3.WHERE..`a`...IN..(A)LICT(y;..g |
170600 | 95 66 04 00 83 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .f...SCREATE.TABLE.t2(x.INTEGER. |
170620 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
170640 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
170660 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
170680 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
1706a0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
1706c0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 20 60 61 60 0a 20 20 49 4e 20 20 28 39 | .a,b.FROM.t3.WHERE..`a`...IN..(9 |
1706e0 | 29 4c 49 43 54 28 79 3b 0a 81 5b 95 65 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | )LICT(y;..[.e...;CREATE.TABLE.t2 |
170700 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
170720 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
170740 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
170760 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
170780 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
1707a0 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 | x,y).SELECT.a,b.FROM.t3.ORDER.BY |
1707c0 | 20 61 62 73 28 31 29 0a 81 5b 95 64 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | .abs(1)..[.d...;CREATE.TABLE.t2( |
1707e0 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
170800 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
170820 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
170840 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
170860 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
170880 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 | ,y).SELECT.a,b.FROM.t3.ORDER.BY. |
1708a0 | 27 61 27 27 62 27 0a 81 5b 95 63 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | 'a''b'..[.c...;CREATE.TABLE.t2(x |
1708c0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
1708e0 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
170900 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
170920 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
170940 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
170960 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 | y).SELECT.a,b.FROM.t3.ORDER.BY." |
170980 | e1 22 2c 22 62 22 81 5b 95 62 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | .","b".[.b...;CREATE.TABLE.t2(x. |
1709a0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
1709c0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
1709e0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
170a00 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
170a20 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
170a40 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 | ).SELECT.a,b.FROM.t3.ORDER.BY."a |
170a60 | 22 2c 22 62 22 81 5b 95 61 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | ","b".[.a...;CREATE.TABLE.t2(x.I |
170a80 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
170aa0 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
170ac0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
170ae0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
170b00 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
170b20 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 47 52 4f 55 50 20 42 59 28 31 29 3b | .SELECT.a,b.FROM.t3.GROUP.BY(1); |
170b40 | 45 79 3b 0a 81 57 95 60 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | Ey;..W.`...3CREATE.TABLE.t2(x.IN |
170b60 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
170b80 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
170ba0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
170bc0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
170be0 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
170c00 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 28 31 29 52 45 64 65 64 2e 79 3b 0a 82 | SELECT.a,b.FROM.t3.(1)REded.y;.. |
170c20 | 16 95 5f 04 00 84 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | .._...1CREATE.TABLE.t2(x.INTEGER |
170c40 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
170c60 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
170c80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
170ca0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
170cc0 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
170ce0 | 54 20 61 2c 4e 4f 54 3f 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | T.a,NOT?.FROM.t3.WHERE.true...ON |
170d00 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
170d20 | 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1b 95 5e 04 00 84 | (."a",excluded.y);.INSy;....^... |
170d40 | 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ;CREATE.TABLE.t2(x.INTEGER.PRIMA |
170d60 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
170d80 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
170da0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
170dc0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
170de0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 3f 41 | .INSERT.INTO.t2(x,y).SELECT.a,?A |
170e00 | 4e 44 20 74 72 75 65 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ND.true.FROM.t3.WHERE.true...ON. |
170e20 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
170e40 | 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 41 4e 41 4c 59 5a 45 82 1b 95 5d 04 00 84 3b | ."a",excluded.y);ANALYZE...]...; |
170e60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
170e80 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
170ea0 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
170ec0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
170ee0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
170f00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 3f 20 46 | INSERT.INTO.t2(x,y).SELECT.a,?.F |
170f20 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
170f40 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 22 61 22 2c 22 62 22 | x).DO.UPDATE.SET.y=max(.."a","b" |
170f60 | 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 0f 95 5c 04 00 86 23 43 | "a",excluded.y);.INSy;....\...#C |
170f80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
170fa0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
170fc0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
170fe0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
171000 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
171020 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 74 6f 74 | NSERT.INTO.t2(x,y).SELECT.a,.tot |
171040 | 61 6c 5f 63 68 61 6e 67 65 73 28 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | al_changes()b.FROM.t3.WHERE.true |
171060 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
171080 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.y);.INSERT.I |
1710a0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
1710c0 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
1710e0 | 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 | DATE.SET.y=excluded.y.WHERE.y<ex |
171100 | 63 6c 75 64 65 64 2e 79 3b 0a 82 26 95 5b 04 00 84 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | cluded.y;..&.[...QCREATE.TABLE.t |
171120 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
171140 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
171160 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
171180 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
1711a0 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
1711c0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 | (x,y).SELECT.a,.sqlite_source_id |
1711e0 | 28 29 20 7c 7c 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ().||.b.FROM.t3.WHERE.true...ON. |
171200 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
171220 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 81 69 95 5a 04 00 83 57 43 52 45 41 | t2.y,excluded.y);.;..i.Z...WCREA |
171240 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
171260 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
171280 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
1712a0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
1712c0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
1712e0 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d | RT.INTO.t2(x,y).SELECT.a,.random |
171300 | 62 6c 6f 62 28 32 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b | blob(2)b.FROM.t3.WHERE.true...y; |
171320 | 0a 82 2f 95 59 04 00 84 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ../.Y...cCREATE.TABLE.t2(x.INTEG |
171340 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
171360 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
171380 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
1713a0 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
1713c0 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
1713e0 | 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 | ECT.a,.randomblob(12001-01-01)b. |
171400 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
171420 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
171440 | 6c 75 64 65 64 2e 79 29 41 4e 44 20 74 72 75 65 3b 0a 49 0a 81 73 95 58 04 00 83 6b 43 52 45 41 | luded.y)AND.true;.I..s.X...kCREA |
171460 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
171480 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
1714a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
1714c0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
1714e0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
171500 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d | RT.INTO.t2(x,y).SELECT.a,.random |
171520 | 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | blob(12001-01-01)b.FROM.t3.WHERE |
171540 | 20 74 72 75 65 0a 00 20 79 3b 0a 82 25 95 57 04 00 84 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .true...y;..%.W...OCREATE.TABLE. |
171560 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
171580 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
1715a0 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
1715c0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
1715e0 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
171600 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 | 2(x,y).SELECT.a,.randomblob(1)b. |
171620 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
171640 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
171660 | 6c 75 64 65 64 2e 79 29 20 7c 7c 20 74 72 75 65 3b 0a 49 0a 82 29 95 56 04 00 84 57 43 52 45 41 | luded.y).||.true;.I..).V...WCREA |
171680 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
1716a0 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
1716c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
1716e0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
171700 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
171720 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d | RT.INTO.t2(x,y).SELECT.a,.random |
171740 | 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | blob(1)b.FROM.t3.WHERE.true...ON |
171760 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
171780 | 28 20 20 22 79 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b | (.."y","b""a",excluded.y);.INSy; |
1717a0 | 0a 83 08 95 55 04 00 86 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ....U....CREATE.TABLE.t2(x.INTEG |
1717c0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
1717e0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
171800 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
171820 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
171840 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
171860 | 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | ECT.a,.random()b.FROM.t3.WHERE.t |
171880 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
1718a0 | 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 | ET.y=max(t2.y,excluded.y);.INSER |
1718c0 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
1718e0 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
171900 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 | .UPDATE.SET.y=excluded.y.WHERE.y |
171920 | 7c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 08 95 54 04 00 86 15 43 52 45 41 54 45 20 54 41 42 4c | |excluded.y;....T....CREATE.TABL |
171940 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
171960 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
171980 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
1719a0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
1719c0 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
1719e0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 62 20 46 52 4f | .t2(x,y).SELECT.a,.random()b.FRO |
171a00 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
171a20 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
171a40 | 65 64 2e 78 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | ed.x);.INSERT.INTO.t2(x,y).SELEC |
171a60 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
171a80 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
171aa0 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 18 95 53 04 00 84 | ed.y.WHERE.y<excluded.y;....S... |
171ac0 | 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | 5CREATE.TABLE.t2(x.INTEGER.PRIMA |
171ae0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
171b00 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
171b20 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
171b40 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
171b60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 | .INSERT.INTO.t2(x,y).SELECT.a,.r |
171b80 | 61 6e 64 6f 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | andom()b.FROM.t3.WHERE.true...ON |
171ba0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
171bc0 | 28 2d 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 81 6e 95 52 04 00 83 61 43 52 45 | (-"a",excluded.y);.IN.n.R...aCRE |
171be0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
171c00 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
171c20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
171c40 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
171c60 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
171c80 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f | ERT.INTO.t2(x,y).SELECT.a,.rando |
171ca0 | 6d 28 29 20 7c 7c 32 30 30 31 2d 30 31 2d 30 31 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | m().||2001-01-01.b.FROM.t3.WHERE |
171cc0 | 20 74 72 75 65 0a 00 81 6e 95 51 04 00 83 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .true...n.Q...aCREATE.TABLE.t2(x |
171ce0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
171d00 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
171d20 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
171d40 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
171d60 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
171d80 | 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 28 29 20 7c 7c 20 74 72 69 6d 28 31 2c | y).SELECT.a,.random().||.trim(1, |
171da0 | 31 29 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 82 1a 95 50 04 00 84 | 1).b.FROM.t3.WHERE.true.....P... |
171dc0 | 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | 9CREATE.TABLE.t2(x.INTEGER.PRIMA |
171de0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
171e00 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
171e20 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
171e40 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
171e60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 | .INSERT.INTO.t2(x,y).SELECT.a,.r |
171e80 | 61 6e 64 6f 6d 28 29 20 2a 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | andom().*b.FROM.t3.WHERE.true... |
171ea0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
171ec0 | 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 82 25 95 4f 04 00 84 4f 43 | ax(."a",excluded.y);.IN.%.O...OC |
171ee0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
171f00 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
171f20 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
171f40 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
171f60 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
171f80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 64 61 74 | NSERT.INTO.t2(x,y).SELECT.a,.dat |
171fa0 | 65 74 69 6d 65 28 31 2c 31 2c 31 29 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | etime(1,1,1)FROM.t3.WHERE.true.. |
171fc0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
171fe0 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 20 74 72 75 65 3b 0a 49 0a | max(t2.y,excluded.y)AND.true;.I. |
172000 | 0d 00 00 00 1c 00 c9 00 1f 21 1e 42 1d 63 1c 78 1b 8d 1a 0a 18 fb 17 e8 16 c9 15 aa 14 9b 13 6c | .........!.B.c.x...............l |
172020 | 12 45 11 1e 0f ff 0e e0 0d c1 0c a9 0b 91 0a 75 09 60 08 41 07 22 06 03 04 e4 03 5f 02 4c 00 c9 | .E.............u.`.A."....._.L.. |
172040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
172060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
172080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1720a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1720c0 | 00 00 00 00 00 00 00 00 00 82 7f 96 07 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | .................CREATE.TABLE.t2 |
1720e0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
172100 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
172120 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
172140 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
172160 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
172180 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | x,y).SELECT.a,b.FROM.t3.WHERE.tr |
1721a0 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
1721c0 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 78 29 3b 0a 49 4e 53 45 52 54 | T.y=max(t2.y,excluded.x);.INSERT |
1721e0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 | .INTO.t2(x,y).SELECT.a,b.FROM.t3 |
172200 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
172220 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 78 20 57 48 45 52 45 20 79 3c | UPDATE.SET.y=excluded.x.WHERE.y< |
172240 | 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 0f 96 06 04 00 84 23 43 52 45 41 54 45 20 54 41 42 4c 45 | excluded.y;........#CREATE.TABLE |
172260 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PRIMARY.KEY,.y.INT |
172280 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
1722a0 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
1722c0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
1722e0 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
172300 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
172320 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
172340 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 72 29 3b 79 3b 0a 83 | .SET.y=max(t2.y,excluded.r);y;.. |
172360 | 01 96 05 04 00 86 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | .......CREATE.TABLE.t2(x.INTEGER |
172380 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
1723a0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
1723c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
1723e0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
172400 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
172420 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
172440 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
172460 | 2e 79 25 59 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | .y%Y,excluded.y);.INSERT.INTO.t2 |
172480 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
1724a0 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
1724c0 | 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 | ET.y=excluded.y.WHERE.y<excluded |
1724e0 | 2e 79 3b 0a 82 1b 96 04 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;........;CREATE.TABLE.t2(x.IN |
172500 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
172520 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
172540 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
172560 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
172580 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
1725a0 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
1725c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
1725e0 | 61 78 28 20 40 31 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 20 72 6f 75 6e 64 28 31 2c 31 | ax(.@1y,excluded.y)AND.round(1,1 |
172600 | 29 3b 0a 82 1b 96 03 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | );........;CREATE.TABLE.t2(x.INT |
172620 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
172640 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
172660 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
172680 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
1726a0 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
1726c0 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
1726e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
172700 | 78 28 20 40 31 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 20 7c 7c 20 74 72 75 65 3b 0a 49 4e 53 79 | x(.@1y,excluded.y).||.true;.INSy |
172720 | 3b 0a 82 1b 96 02 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;........;CREATE.TABLE.t2(x.INTE |
172740 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
172760 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
172780 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
1727a0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
1727c0 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
1727e0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
172800 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
172820 | 28 20 40 31 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 20 67 6c 6f 62 28 31 2c 31 29 49 4e 53 79 3b | (.@1y,excluded.y).glob(1,1)INSy; |
172840 | 0a 82 1b 96 01 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ........;CREATE.TABLE.t2(x.INTEG |
172860 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
172880 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
1728a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
1728c0 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
1728e0 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
172900 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
172920 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
172940 | 20 40 31 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 20 3e 3d 20 74 72 75 65 3b 0a 49 4e 53 79 3b 0a | .@1y,excluded.y).>=.true;.INSy;. |
172960 | 82 11 96 00 04 00 84 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .......'CREATE.TABLE.t2(x.INTEGE |
172980 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.INT.UNIQUE)/*WI |
1729a0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
1729c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
1729e0 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
172a00 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
172a20 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
172a40 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 | ONFLICT(x).DO.UPDATE.SET.y=max(. |
172a60 | 22 2e 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 25 59 3b 0a 49 0a 82 18 95 7f 04 00 84 35 43 52 45 | ".",excluded.y)%Y;.I........5CRE |
172a80 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
172aa0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
172ac0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
172ae0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
172b00 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
172b20 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
172b40 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
172b60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 2b 32 20 64 61 79 73 61 22 2c | DO.UPDATE.SET.y=max(."+2.daysa", |
172b80 | 65 78 63 6c 75 64 65 64 2e 79 29 25 59 3b 0a 49 0a 82 14 95 7e 04 00 84 2d 43 52 45 41 54 45 20 | excluded.y)%Y;.I....~...-CREATE. |
172ba0 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
172bc0 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
172be0 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
172c00 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
172c20 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
172c40 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
172c60 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
172c80 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 20 2d 31 20 22 2c 65 78 63 6c 75 64 65 64 | PDATE.SET.y=max(.".-1.",excluded |
172ca0 | 2e 79 29 25 59 3b 0a 49 0a 82 14 95 7d 04 00 84 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | .y)%Y;.I....}...-CREATE.TABLE.t2 |
172cc0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
172ce0 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
172d00 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
172d20 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
172d40 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
172d60 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | x,y).SELECT.a,b.FROM.t3.WHERE.tr |
172d80 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
172da0 | 54 20 79 3d 6d 61 78 28 20 22 20 20 2d 31 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 25 59 3b 0a 49 | T.y=max(."..-1",excluded.y)%Y;.I |
172dc0 | 0a 82 1b 95 7c 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ....|...;CREATE.TABLE.t2(x.INTEG |
172de0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
172e00 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
172e20 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
172e40 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
172e60 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
172e80 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
172ea0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
172ec0 | 20 20 22 79 22 2c 4e 4f 54 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | .."y",NOT"a",excluded.y);.INSy;. |
172ee0 | 82 1b 95 7b 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | ...{...;CREATE.TABLE.t2(x.INTEGE |
172f00 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.INT.UNIQUE)/*WI |
172f20 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
172f40 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
172f60 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
172f80 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
172fa0 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
172fc0 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 | ONFLICT(x).DO.UPDATE.SET.y=max(. |
172fe0 | 20 22 79 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 | ."y","b""a",excluded.y);.INSy;.. |
173000 | 1b 95 7a 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | ..z...;CREATE.TABLE.t2(x.INTEGER |
173020 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
173040 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
173060 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
173080 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
1730a0 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
1730c0 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
1730e0 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 | NFLICT(x).DO.UPDATE.SET.y=max(.. |
173100 | 22 79 22 2c 22 62 22 22 61 22 2c 20 74 72 69 6d 28 31 2c 31 29 29 3b 0a 49 4e 53 79 3b 0a 82 23 | "y","b""a",.trim(1,1));.INSy;..# |
173120 | 95 79 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .y...KCREATE.TABLE.t2(x.INTEGER. |
173140 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
173160 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
173180 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
1731a0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
1731c0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
1731e0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
173200 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 22 | FLICT(x).DO.UPDATE.SET.y=max(.." |
173220 | 79 22 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | y",.randomblob(1),excluded.y);.I |
173240 | 4e 53 79 3b 0a 82 23 95 78 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | NSy;..#.x...KCREATE.TABLE.t2(x.I |
173260 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
173280 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
1732a0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
1732c0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
1732e0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
173300 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
173320 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
173340 | 6d 61 78 28 20 20 22 79 22 2c 20 22 79 22 2c 22 62 22 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 | max(.."y",."y","b""b""a",exclude |
173360 | 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2b 95 77 04 00 84 5b 43 52 45 41 54 45 20 54 41 42 4c 45 | d.y);.INSy;..+.w...[CREATE.TABLE |
173380 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PRIMARY.KEY,.y.INT |
1733a0 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
1733c0 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
1733e0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
173400 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
173420 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
173440 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
173460 | 20 53 45 54 20 79 3d 6d 61 78 28 20 20 22 79 22 2c 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 | .SET.y=max(.."y",.."a","b""a","b |
173480 | 22 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 0b 95 76 04 | ""b""a",excluded.y);.INSy;....v. |
1734a0 | 00 84 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t2(x.INTEGER.PRI |
1734c0 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
1734e0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
173500 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
173520 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
173540 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
173560 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
173580 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 49 46 74 32 2e 79 ac 75 | CT(x).DO.UPDATE.SET.y=maIFt2.y.u |
1735a0 | 64 65 64 2e 79 29 3b 79 3b 0a 82 1b 95 75 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ded.y);y;....u...;CREATE.TABLE.t |
1735c0 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
1735e0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
173600 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
173620 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
173640 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
173660 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
173680 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
1736a0 | 45 54 20 79 3d 6d 49 4e 28 20 20 22 79 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 | ET.y=mIN(.."y","b""a",excluded.y |
1736c0 | 29 3b 0a 49 4e 53 79 3b 0a 82 1b 95 74 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | );.INSy;....t...;CREATE.TABLE.t2 |
1736e0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
173700 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
173720 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
173740 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
173760 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
173780 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | x,y).SELECT.a,b.FROM.t3.WHERE.tr |
1737a0 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
1737c0 | 54 20 79 3d 6d 49 4e 28 20 20 22 79 22 2c 22 62 22 20 2d 31 2c 65 78 63 6c 75 64 65 64 2e 79 29 | T.y=mIN(.."y","b".-1,excluded.y) |
1737e0 | 3b 0a 49 4e 53 79 3b 0a 82 0f 95 73 04 00 84 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | ;.INSy;....s...#CREATE.TABLE.t2( |
173800 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
173820 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
173840 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
173860 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
173880 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
1738a0 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
1738c0 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
1738e0 | 20 79 3d 6a e1 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 79 3b 0a 82 0b 95 72 04 | .y=j.x(t2.y,excluded.y);y;....r. |
173900 | 00 84 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t2(x.INTEGER.PRI |
173920 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
173940 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
173960 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
173980 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
1739a0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
1739c0 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
1739e0 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 54 45 4d 50 74 32 2e 79 ac 75 | CT(x).DO.UPDATE.SET.y=TEMPt2.y.u |
173a00 | 64 65 64 2e 79 29 3b 79 3b 0a 82 7f 95 71 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ded.y);y;....q....CREATE.TABLE.t |
173a20 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
173a40 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
173a60 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
173a80 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
173aa0 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
173ac0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
173ae0 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
173b00 | 45 54 20 78 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 78 29 3b 0a 49 4e 53 45 52 | ET.x=max(t2.y,excluded.x);.INSER |
173b20 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
173b40 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
173b60 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 | .UPDATE.SET.y=excluded.y.WHERE.y |
173b80 | 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 67 95 70 04 00 83 53 43 52 45 41 54 45 20 54 41 42 4c | <excluded.y;..g.p...SCREATE.TABL |
173ba0 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
173bc0 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
173be0 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
173c00 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
173c20 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
173c40 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
173c60 | 45 20 74 72 75 65 0a 20 20 49 53 20 20 28 31 29 4c 49 43 54 28 79 3b 0a 81 67 95 6f 04 00 83 53 | E.true...IS..(1)LICT(y;..g.o...S |
173c80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
173ca0 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
173cc0 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
173ce0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
173d00 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
173d20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
173d40 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 49 4e 20 20 28 41 29 4c 49 43 54 28 | ROM.t3.WHERE.true...IN..(A)LICT( |
173d60 | 79 3b 0a 81 5b 95 6e 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | y;..[.n...;CREATE.TABLE.t2(x.INT |
173d80 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
173da0 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
173dc0 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
173de0 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
173e00 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
173e20 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 31 3c | ELECT.a,b.FROM.t3.WHERE.round(1< |
173e40 | 42 29 81 5b 95 6d 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | B).[.m...;CREATE.TABLE.t2(x.INTE |
173e60 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
173e80 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
173ea0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
173ec0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
173ee0 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
173f00 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 31 2f 42 | LECT.a,b.FROM.t3.WHERE.round(1/B |
173f20 | 29 81 5b 95 6c 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ).[.l...;CREATE.TABLE.t2(x.INTEG |
173f40 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
173f60 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
173f80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
173fa0 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
173fc0 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
173fe0 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 31 2d 42 29 | ECT.a,b.FROM.t3.WHERE.round(1-B) |
174000 | 0d 04 a3 00 16 01 83 00 1e 7b 1d 5c 1b d9 1a 56 19 37 18 18 16 95 15 86 13 fd 13 0b 11 81 10 72 | .........{.\...V.7.............r |
174020 | 0f 8a 0d fd 0c 68 0a da 09 4f 07 bb 06 2e 04 a9 03 10 01 83 00 00 00 00 00 00 00 00 00 00 00 00 | .....h...O...................... |
174040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1740a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1740c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1740e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
174180 | 00 00 00 83 09 96 1d 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | ...........CREATE.TABLE.t2(x.INT |
1741a0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
1741c0 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
1741e0 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
174200 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
174220 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
174240 | 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 4f 52 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | ELECT.json(1)OR.a,b.FROM.t3.WHER |
174260 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
174280 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
1742a0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
1742c0 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
1742e0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 | .DO.UPDATE.SET.y=excluded.y.WHER |
174300 | 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0f 96 1c 04 00 86 23 43 52 45 41 54 45 20 54 | E.y<excluded.y;........#CREATE.T |
174320 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
174340 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
174360 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
174380 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
1743a0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
1743c0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 62 20 46 | NTO.t2(x,y).SELECT.json(1).a,b.F |
1743e0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
174400 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=max(t2.y,excl |
174420 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | uded.y);.INSERT.INTO.t2(x,y).SEL |
174440 | 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | ECT.json(1).a,b.FROM.t3.WHERE.tr |
174460 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
174480 | 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e | T.y=excluded.y.WHERE.y<excluded. |
1744a0 | 79 3b 0a 00 00 00 06 04 00 83 01 96 1b 04 00 86 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | y;...............CREATE.TABLE.t2 |
1744c0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
1744e0 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
174500 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
174520 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
174540 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
174560 | 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | x,y).SELECT.json(1).a,b.FROM.t3. |
174580 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
1745a0 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 | PDATE.SET.y=max(t2.y,excluded.y) |
1745c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
1745e0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
174600 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 | T(x).DO.UPDATE.SET.y=excluded.y. |
174620 | 57 48 45 52 45 20 6a 73 6f 6e 28 31 29 0a 83 09 96 1a 04 00 86 17 43 52 45 41 54 45 20 54 41 42 | WHERE.json(1).........CREATE.TAB |
174640 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
174660 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
174680 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
1746a0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
1746c0 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
1746e0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 62 20 46 52 4f | O.t2(x,y).SELECT.json(1).a,b.FRO |
174700 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
174720 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
174740 | 65 64 2e 79 29 25 59 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ed.y)%Y;.INSERT.INTO.t2(x,y).SEL |
174760 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
174780 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c | CONFLICT(x).DO.UPDATE.SET.y=excl |
1747a0 | 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 10 96 19 04 | uded.y.WHERE.y<excluded.y;...... |
1747c0 | 00 86 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..%CREATE.TABLE.t2(x.INTEGER.PRI |
1747e0 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
174800 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
174820 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
174840 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
174860 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 | );.INSERT.INTO.t2(x,y).SELECT.js |
174880 | 6f 6e 28 31 29 20 61 2c 20 72 61 6e 64 6f 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | on(1).a,.random()b.FROM.t3.WHERE |
1748a0 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
1748c0 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 | .SET.y=max(t2.y,excluded.y);.INS |
1748e0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
174900 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
174920 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=excluded.y.WHERE |
174940 | 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 07 96 18 04 00 86 13 43 52 45 41 54 45 20 54 41 | .y<excluded.y;.........CREATE.TA |
174960 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
174980 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
1749a0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
1749c0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
1749e0 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
174a00 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 30 29 20 61 2c 62 20 46 52 | TO.t2(x,y).SELECT.json(0).a,b.FR |
174a20 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
174a40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
174a60 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
174a80 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
174aa0 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 | ONFLICT(x).DO.UPDATE.SET.y=exclu |
174ac0 | 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0a 96 17 04 00 | ded.y.WHERE.y<excluded.y;....... |
174ae0 | 86 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t2(x.INTEGER.PRIM |
174b00 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
174b20 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
174b40 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
174b60 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
174b80 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f | ;.INSERT.INTO.t2(x,y).SELECT.jso |
174ba0 | 6e 28 20 2d 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | n(.-11).a,b.FROM.t3.WHERE.true.. |
174bc0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
174be0 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,excluded.y);.INSERT.INT |
174c00 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
174c20 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
174c40 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.y.WHERE.y<excl |
174c60 | 75 64 65 64 2e 79 3b 0a 83 11 96 16 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | uded.y;........'CREATE.TABLE.t2( |
174c80 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
174ca0 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
174cc0 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
174ce0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
174d00 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
174d20 | 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 | ,y).SELECT.group_concat(1,1).a,b |
174d40 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
174d60 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
174d80 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
174da0 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
174dc0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
174de0 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 09 96 | cluded.y.WHERE.y<excluded.y;.... |
174e00 | 15 04 00 86 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t2(x.INTEGER.P |
174e20 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
174e40 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
174e60 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
174e80 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
174ea0 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
174ec0 | 63 68 61 6e 67 65 73 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | changes().a,b.FROM.t3.WHERE.true |
174ee0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
174f00 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 78 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.x);.INSERT.I |
174f20 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
174f40 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
174f60 | 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 | DATE.SET.y=excluded.y.WHERE.y<ex |
174f80 | 63 6c 75 64 65 64 2e 79 3b 0a 81 64 96 14 04 00 83 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | cluded.y;..d.....MCREATE.TABLE.t |
174fa0 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
174fc0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
174fe0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
175000 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
175020 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
175040 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 62 2c 20 72 61 6e 64 6f 6d 28 29 20 7c 7c 20 62 20 46 52 | (x,y).SELECT.b,.random().||.b.FR |
175060 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 82 0b 96 13 04 00 84 1b 43 52 45 41 54 45 | OM.t3.WHERE.true..........CREATE |
175080 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
1750a0 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
1750c0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
1750e0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
175100 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
175120 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2e 20 2a 2c 52 2e 4d 20 74 33 | .INTO.t2(x,y).SELECT.a..*,R.M.t3 |
175140 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
175160 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 79 3b | UPDATE.SET.y=max(t2.y,uded.y);y; |
175180 | 0a 83 06 96 12 04 00 86 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | .........CREATE.TABLE.t2(x.INTEG |
1751a0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
1751c0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
1751e0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
175200 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
175220 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
175240 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 4e 4f 54 4e 55 | ECT.a,b.FROM.t3.WHERE.true.NOTNU |
175260 | 4c 4c 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | LL..ON.CONFLICT(x).DO.UPDATE.SET |
175280 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 | .y=max(t2.y,excluded.y);.INSERT. |
1752a0 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
1752c0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
1752e0 | 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 | PDATE.SET.y=excluded.y.WHERE.y<e |
175300 | 78 63 6c 75 64 65 64 2e 79 3b 0a 81 6e 96 11 04 00 83 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 | xcluded.y;..n.....aCREATE.TABLE. |
175320 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
175340 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
175360 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
175380 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
1753a0 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
1753c0 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
1753e0 | 74 72 75 65 0a 4e 4f 54 20 20 49 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 3b 0a 83 05 96 | true.NOT..IN.CONFLICT(x).DO;.... |
175400 | 10 04 00 86 0f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t2(x.INTEGER.P |
175420 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
175440 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
175460 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
175480 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
1754a0 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
1754c0 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 49 53 4e 55 4c 4c 20 20 4f | a,b.FROM.t3.WHERE.true.ISNULL..O |
1754e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
175500 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | x(t2.y,excluded.y);.INSERT.INTO. |
175520 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
175540 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
175560 | 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 | .SET.y=excluded.y.WHERE.y<exclud |
175580 | 65 64 2e 79 3b 0a 82 0b 96 0f 04 00 84 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | ed.y;.........CREATE.TABLE.t2(x. |
1755a0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
1755c0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
1755e0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
175600 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
175620 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
175640 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
175660 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
175680 | 3d 6d 61 78 a8 74 32 2e 79 ac 75 64 65 64 2e 79 29 3b 79 3b 0a 82 7f 96 0e 04 00 86 03 43 52 45 | =max.t2.y.uded.y);y;.........CRE |
1756a0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
1756c0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
1756e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
175700 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
175720 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
175740 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
175760 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
175780 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c f5 64 65 | DO.UPDATE.SET.y=max(t2.y,excl.de |
1757a0 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
1757c0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
1757e0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
175800 | 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 1b 96 0d 04 00 84 3b | d.y.WHERE.y<excluded.y;........; |
175820 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
175840 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
175860 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
175880 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
1758a0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
1758c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
1758e0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
175900 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=max(t2.y,excl |
175920 | 75 64 65 64 2e 79 29 41 4e 44 40 74 72 75 65 3b 56 41 43 55 55 4d 0a 82 1b 96 0c 04 00 84 3b 43 | uded.y)AND@true;VACUUM........;C |
175940 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
175960 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
175980 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
1759a0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
1759c0 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
1759e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
175a00 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
175a20 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
175a40 | 64 65 64 2e 79 29 41 4e 44 20 6c 74 72 69 6d 28 31 2c 31 29 3b 0a 82 7f 96 0b 04 00 86 03 43 52 | ded.y)AND.ltrim(1,1);.........CR |
175a60 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
175a80 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
175aa0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
175ac0 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
175ae0 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
175b00 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
175b20 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
175b40 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
175b60 | 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | ed.y);.INSERT.INTO.t2(x,y).SELEC |
175b80 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
175ba0 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
175bc0 | 65 64 2e 79 20 57 48 45 52 45 20 20 7a 65 72 6f 62 6c 6f 62 28 31 29 3b 0a 82 7f 96 0a 04 00 86 | ed.y.WHERE..zeroblob(1);........ |
175be0 | 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
175c00 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
175c20 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
175c40 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
175c60 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
175c80 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
175ca0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
175cc0 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
175ce0 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
175d00 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 2c 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHER,.true...ON |
175d20 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
175d40 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 1b 96 09 | luded.y.WHERE.y<excluded.y;..... |
175d60 | 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...;CREATE.TABLE.t2(x.INTEGER.PR |
175d80 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
175da0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
175dc0 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
175de0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
175e00 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
175e20 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
175e40 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c | ICT(x).DO.UPDATE.SET.y=max(t2.y, |
175e60 | 65 78 63 6c 75 64 65 64 2e 79 29 20 3e 3d 40 74 72 75 65 3b 0a 49 4e 53 79 3b 0a 83 01 96 08 04 | excluded.y).>=@true;.INSy;...... |
175e80 | 00 86 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t2(x.INTEGER.PRI |
175ea0 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
175ec0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
175ee0 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
175f00 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
175f20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
175f40 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
175f60 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
175f80 | 78 63 6c 75 64 65 64 2e 79 25 59 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | xcluded.y%Y);.INSERT.INTO.t2(x,y |
175fa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
175fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
175fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
176000 | 0d 00 00 00 18 00 f8 00 1e 75 1d 66 1c 3b 1b 10 19 e5 18 59 17 68 16 77 15 44 14 5a 12 cc 11 d3 | .........u.f.;.....Y.h.w.D.Z.... |
176020 | 10 e1 0f e1 0e b9 0d 39 0b a4 0a 18 08 f2 07 66 05 cf 04 38 02 a1 00 f8 00 00 00 00 00 00 00 00 | .......9.......f...8............ |
176040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
176060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
176080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1760a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1760c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1760e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 25 96 35 04 00 86 4f | .........................%.5...O |
176100 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
176120 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
176140 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
176160 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
176180 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
1761a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c | INSERT.INTO.t2(x,y).SELECT.total |
1761c0 | 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 | _changes()GLOB.json_array(1,1,1) |
1761e0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
176200 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
176220 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
176240 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
176260 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
176280 | 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b | y=excluded.y.WHERE.y<excluded.y; |
1762a0 | 0a 83 13 96 34 04 00 86 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ....4...+CREATE.TABLE.t2(x.INTEG |
1762c0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
1762e0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
176300 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
176320 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
176340 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
176360 | 45 43 54 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d | ECT.total_changes()GLOB.a,b.FROM |
176380 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
1763a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
1763c0 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
1763e0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
176400 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
176420 | 64 2e 79 20 4d 41 54 43 48 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 13 96 33 04 00 86 2b | d.y.MATCH.y<excluded.y;....3...+ |
176440 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
176460 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
176480 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
1764a0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
1764c0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
1764e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c | INSERT.INTO.t2(x,y).SELECT.total |
176500 | 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | _changes()GLOB.a,b.FROM.t3.WHERE |
176520 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
176540 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 | .SET.y=max(t2.y,excluded.y);.INS |
176560 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
176580 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
1765a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 4d 41 54 43 48 | DO.UPDATE.SET.y=excluded.y.MATCH |
1765c0 | 20 79 20 6c 69 6b 65 28 31 2c 31 29 79 3b 0a 83 13 96 32 04 00 86 2b 43 52 45 41 54 45 20 54 41 | .y.like(1,1)y;....2...+CREATE.TA |
1765e0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
176600 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
176620 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
176640 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
176660 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
176680 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 | TO.t2(x,y).SELECT.total_changes( |
1766a0 | 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | )GLOB.a,b.FROM.t3.WHERE.true...O |
1766c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
1766e0 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | x(t2.y,excluded.y);.INSERT.INTO. |
176700 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
176720 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
176740 | 20 53 45 54 20 79 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 3c 65 78 63 6c 75 64 | .SET.y=.strftime(1,1,1,1)<exclud |
176760 | 65 64 2e 79 3b 0a 83 08 96 31 04 00 86 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | ed.y;....1....CREATE.TABLE.t2(x. |
176780 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
1767a0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
1767c0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
1767e0 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
176800 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
176820 | 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 28 3f 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | ).SELECT.total(?).a,b.FROM.t3.WH |
176840 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
176860 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
176880 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
1768a0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
1768c0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
1768e0 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 22 96 30 04 00 84 49 43 52 45 41 54 45 | ERE.y<excluded.y;..".0...ICREATE |
176900 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
176920 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
176940 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
176960 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
176980 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
1769a0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 28 31 29 20 61 2c | .INTO.t2(x,y).SELECT.total(1).a, |
1769c0 | 62 20 67 6c 6f 62 28 31 2c 31 29 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | b.glob(1,1).FROM.t3.WHERE.true.. |
1769e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
176a00 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 83 08 96 2f 04 00 86 15 | max(t2.y,excluded.y);.;..../.... |
176a20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
176a40 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
176a60 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
176a80 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
176aa0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
176ac0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c | INSERT.INTO.t2(x,y).SELECT.total |
176ae0 | 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 40 74 72 75 65 0a 20 20 4f 4e 20 | (1).a,b.FROM.t3.WHERE@true...ON. |
176b00 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
176b20 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t2.y,excluded.y);.INSERT.INTO.t2 |
176b40 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
176b60 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
176b80 | 45 54 20 79 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 3c 65 78 63 6c 75 64 65 64 | ET.y=.strftime(1,1,1,1)<excluded |
176ba0 | 2e 79 3b 0a 83 11 96 2e 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;........'CREATE.TABLE.t2(x.IN |
176bc0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
176be0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
176c00 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
176c20 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
176c40 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
176c60 | 53 45 4c 45 43 54 20 74 6f 74 61 6c 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | SELECT.total(1).a,b.FROM.t3.WHER |
176c80 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
176ca0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
176cc0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 28 31 | SERT.INTO.t2(x,y).SELECT.total(1 |
176ce0 | 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | ).a,b.FROM.t3.WHERE.true...ON.CO |
176d00 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
176d20 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 7c 96 2d 04 00 85 | ed.y.WHERE.y<excluded.y;..|.-... |
176d40 | 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | }CREATE.TABLE.t2(x.INTEGER.PRIMA |
176d60 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
176d80 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
176da0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
176dc0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
176de0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 | .INSERT.INTO.t2(x,y).SELECT.tota |
176e00 | 6c 28 31 29 20 61 2c 20 61 76 67 28 31 29 74 33 20 57 48 45 52 45 40 74 72 75 65 0a 20 20 4f 4e | l(1).a,.avg(1)t3.WHERE@true...ON |
176e20 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
176e40 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | (t2.y,excluded.y);.INSERT.INTO.t |
176e60 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 2c 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FR,M.t3.WHERE. |
176e80 | 74 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | t..ON.CONFLICT(x).DO.UPDATE.SET. |
176ea0 | 79 3d 65 78 63 64 2e 79 20 57 48 45 52 45 20 79 3c 75 64 65 64 2e 79 3b 0a 82 24 96 2c 04 00 84 | y=excd.y.WHERE.y<uded.y;..$.,... |
176ec0 | 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | MCREATE.TABLE.t2(x.INTEGER.PRIMA |
176ee0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
176f00 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
176f20 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
176f40 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
176f60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 | .INSERT.INTO.t2(x,y).SELECT.sqli |
176f80 | 74 65 5f 76 65 72 73 69 6f 6e 28 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | te_version()GLOB.a,b.FROM.t3.WHE |
176fa0 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
176fc0 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | TE.SET.y=max(t2.y,excluded.y);.I |
176fe0 | 4e 81 7c 96 2b 04 00 83 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | N.|.+...}CREATE.TABLE.t2(x.INTEG |
177000 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
177020 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
177040 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
177060 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
177080 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
1770a0 | 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 43 4f 4c 4c 41 54 45 20 6e 6f | ECT.sqlite_source_id()COLLATE.no |
1770c0 | 63 61 73 65 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 | case.a,b.FROM.t3.ORDER.BY."a","b |
1770e0 | 22 81 6e 96 2a 04 00 83 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ".n.*...aCREATE.TABLE.t2(x.INTEG |
177100 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
177120 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
177140 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
177160 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
177180 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
1771a0 | 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 | ECT.sqlite_source_id().a,b.FROM. |
1771c0 | 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 61 22 81 75 96 29 04 00 83 6f 43 52 45 41 54 | t3.ORDER.BY."a","a".u.)...oCREAT |
1771e0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
177200 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
177220 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
177240 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
177260 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
177280 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 | T.INTO.t2(x,y).SELECT.sqlite_sou |
1772a0 | 72 63 65 5f 69 64 28 29 20 61 2c 20 61 62 73 28 31 29 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 | rce_id().a,.abs(1)b.FROM.t3.ORDE |
1772c0 | 52 20 42 59 20 22 61 22 2c 22 62 22 83 0a 96 28 04 00 86 19 43 52 45 41 54 45 20 54 41 42 4c 45 | R.BY."a","b"...(....CREATE.TABLE |
1772e0 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PRIMARY.KEY,.y.INT |
177300 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
177320 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
177340 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
177360 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
177380 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 6f 75 6e 64 28 31 2c 31 29 20 61 2c 62 20 46 52 | t2(x,y).SELECT.round(1,1).a,b.FR |
1773a0 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
1773c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
1773e0 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
177400 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
177420 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 | ONFLICT(x).DO.UPDATE.SET.y=exclu |
177440 | 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 66 96 27 04 00 | ded.y.WHERE.y<excluded.y;..f.'.. |
177460 | 83 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .QCREATE.TABLE.t2(x.INTEGER.PRIM |
177480 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
1774a0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
1774c0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
1774e0 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
177500 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 6f 75 | ;.INSERT.INTO.t2(x,y).SELECT.rou |
177520 | 6e 64 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 | nd(1,1).a,b.FROM.t3.ORDER.BY."a" |
177540 | 2c 22 62 22 82 2f 96 26 04 00 84 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | ,"b"./.&...cCREATE.TABLE.t2(x.IN |
177560 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
177580 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
1775a0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
1775c0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
1775e0 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
177600 | 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 3d 20 7a 65 72 6f 62 6c 6f 62 28 31 | SELECT.randomblob(1)=.zeroblob(1 |
177620 | 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | )..a,b.FROM.t3.WHERE.true...ON.C |
177640 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 | ONFLICT(x).DO.UPDATE.SET.y=max(t |
177660 | 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 6d 96 25 04 00 83 5f 43 | 2.y,excluded.y);.INSy;..m.%..._C |
177680 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
1776a0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
1776c0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
1776e0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
177700 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
177720 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d | NSERT.INTO.t2(x,y).SELECT.random |
177740 | 28 29 20 61 2c 20 72 61 6e 64 6f 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 | ().a,.random()b.FROM.t3.ORDER.BY |
177760 | 20 22 61 22 2c 22 62 22 81 6d 96 24 04 00 83 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | ."a","b".m.$..._CREATE.TABLE.t2( |
177780 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
1777a0 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
1777c0 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
1777e0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
177800 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
177820 | 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 20 72 61 6e 64 6f 6d 28 29 20 | ,y).SELECT.random().a,.random(). |
177840 | 7c 7c 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 83 08 96 23 04 00 86 | ||.b.FROM.t3.WHERE.true.....#... |
177860 | 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
177880 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
1778a0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
1778c0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
1778e0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
177900 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6d 61 78 28 | .INSERT.INTO.t2(x,y).SELECT.max( |
177920 | 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | 1,1).a,b.FROM.t3.WHERE.true...ON |
177940 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
177960 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | (t2.y,excluded.y);.INSERT.INTO.t |
177980 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
1779a0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
1779c0 | 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 | SET.y=excluded.y.WHERE.y<exclude |
1779e0 | 64 2e 79 3b 0a 82 27 96 22 04 00 84 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;..'."...SCREATE.TABLE.t2(x.I |
177a00 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
177a20 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
177a40 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
177a60 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
177a80 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
177aa0 | 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 3f 29 20 61 2c 62 20 | .SELECT.json_group_array(?).a,b. |
177ac0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
177ae0 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
177b00 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 27 96 21 04 00 84 53 43 52 45 41 54 45 20 54 | luded.y);.INSy;..'.!...SCREATE.T |
177b20 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
177b40 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
177b60 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
177b80 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
177ba0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
177bc0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 67 72 6f 75 70 5f 61 72 | NTO.t2(x,y).SELECT.json_group_ar |
177be0 | 72 61 79 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 40 74 72 75 65 0a 20 20 | ray(1).a,b.FROM.t3.WHERE@true... |
177c00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
177c20 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 27 96 20 04 | ax(t2.y,excluded.y);.INSy;..'... |
177c40 | 00 84 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..SCREATE.TABLE.t2(x.INTEGER.PRI |
177c60 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
177c80 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
177ca0 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
177cc0 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
177ce0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 | );.INSERT.INTO.t2(x,y).SELECT.js |
177d00 | 6f 6e 5f 67 72 6f 75 70 5f 61 72 72 61 79 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | on_group_array(1).a,b.FROM.t3.WH |
177d20 | 45 52 45 20 6a 73 6f 6e 5f 65 78 74 72 61 63 74 28 31 2c 31 29 54 28 78 29 20 44 4f 20 55 50 44 | ERE.json_extract(1,1)T(x).DO.UPD |
177d40 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
177d60 | 49 4e 53 79 3b 0a 82 0b 96 1f 04 00 84 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | INSy;.........CREATE.TABLE.t2(x. |
177d80 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
177da0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
177dc0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
177de0 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
177e00 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
177e20 | 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 2c 31 29 0a | ).SELECT.json_array_length(1,1). |
177e40 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
177e60 | 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 79 3b 0a 83 07 96 1e 04 00 86 13 43 52 45 | =max(t2.y,uded.y);y;.........CRE |
177e80 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
177ea0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
177ec0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
177ee0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
177f00 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
177f20 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 41 29 20 | ERT.INTO.t2(x,y).SELECT.json(A). |
177f40 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
177f60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
177f80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
177fa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
177fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
177fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
178000 | 0d 00 00 00 1b 01 36 00 1e 5e 1c b7 1b 95 1a 6a 19 37 18 04 17 10 16 1d 15 32 14 47 13 19 11 d8 | ......6..^.....j.7.......2.G.... |
178020 | 10 a5 0f 82 0e 5b 0d 38 0c 15 0a f2 09 bf 08 8a 07 57 06 30 05 45 04 1e 03 3f 02 4d 01 36 00 00 | .....[.8.........W.0.E...?.M.6.. |
178040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
178060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
178080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1780a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1780c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1780e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
178100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
178120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 13 96 50 04 00 84 2b 43 52 | .........................P...+CR |
178140 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
178160 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
178180 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
1781a0 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
1781c0 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
1781e0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 3f 61 2c 3f 20 46 52 4f | SERT.INTO.t2(x,y).SELECT?a,?.FRO |
178200 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
178220 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(."a",exclud |
178240 | 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 6e 96 4f 04 00 83 61 43 52 45 41 54 45 20 54 41 42 4c | ed.y);.INSy;..n.O...aCREATE.TABL |
178260 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
178280 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
1782a0 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
1782c0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
1782e0 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
178300 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 2d 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 | .t2(x,y).SELECT-sqlite_source_id |
178320 | 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 81 | ().a,b.FROM.t3.ORDER.BY."a","b". |
178340 | 5b 96 4e 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | [.N...;CREATE.TABLE.t2(x.INTEGER |
178360 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
178380 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
1783a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
1783c0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
1783e0 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
178400 | 54 2d 3f 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 82 23 | T-?,b.FROM.t3.WHERE.true...y;..# |
178420 | 96 4d 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .M...KCREATE.TABLE.t2(x.INTEGER. |
178440 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
178460 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
178480 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
1784a0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
1784c0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
1784e0 | 20 7a 65 72 6f 62 6c 6f 62 28 41 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | .zeroblob(A)GLOB.a,b.FROM.t3.WHE |
178500 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
178520 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | TE.SET.y=max(t2.y,excluded.y);.I |
178540 | 4e 53 79 3b 0a 81 67 96 4c 04 00 83 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | NSy;..g.L...SCREATE.TABLE.t2(x.I |
178560 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
178580 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
1785a0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
1785c0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
1785e0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
178600 | 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 41 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | .SELECT.zeroblob(A).a,b.FROM.t3. |
178620 | 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 82 23 96 4b 04 00 84 4b 43 52 45 41 54 45 20 54 | ORDER.BY."a","b".#.K...KCREATE.T |
178640 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
178660 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
178680 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
1786a0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
1786c0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
1786e0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 4c 49 | NTO.t2(x,y).SELECT.zeroblob(1)LI |
178700 | 4b 45 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | KE.a,b.FROM.t3.WHERE.true...ON.C |
178720 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 | ONFLICT(x).DO.UPDATE.SET.y=max(t |
178740 | 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2f 96 4a 04 00 84 63 43 | 2.y,excluded.y);.INSy;../.J...cC |
178760 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
178780 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
1787a0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
1787c0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
1787e0 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
178800 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c | NSERT.INTO.t2(x,y).SELECT.zerobl |
178820 | 6f 62 28 31 29 47 4c 4f 42 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 | ob(1)GLOB.zeroblob(1).a,b.FROM.t |
178840 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
178860 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(t2.y,excluded. |
178880 | 79 29 3b 0a 49 4e 53 79 3b 0a 82 31 96 49 04 00 84 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | y);.INSy;..1.I...gCREATE.TABLE.t |
1788a0 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
1788c0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
1788e0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
178900 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
178920 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
178940 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 47 4c 4f 42 20 72 61 6e | (x,y).SELECT.zeroblob(1)GLOB.ran |
178960 | 64 6f 6d 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | domblob(1).a,b.FROM.t3.WHERE.tru |
178980 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
1789a0 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 | .y=max(t2.y,excluded.y);.INSy;.. |
1789c0 | 2f 96 48 04 00 84 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | /.H...cCREATE.TABLE.t2(x.INTEGER |
1789e0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
178a00 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
178a20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
178a40 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
178a60 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
178a80 | 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 41 4e 44 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 20 61 2c | T.zeroblob(1)AND.zeroblob(1)..a, |
178aa0 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
178ac0 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
178ae0 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1f 96 47 04 00 84 43 43 52 45 41 54 45 | xcluded.y);.INSy;....G...CCREATE |
178b00 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
178b20 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
178b40 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
178b60 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
178b80 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
178ba0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 | .INTO.t2(x,y).SELECT.zeroblob(1) |
178bc0 | 2f 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | /a,b.FROM.t3.WHERE.true...ON.CON |
178be0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
178c00 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1f 96 46 04 00 84 43 43 52 45 | y,excluded.y);.INSy;....F...CCRE |
178c20 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
178c40 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
178c60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
178c80 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
178ca0 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
178cc0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 | ERT.INTO.t2(x,y).SELECT.zeroblob |
178ce0 | 28 31 29 2d 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | (1)-a,b.FROM.t3.WHERE.true...ON. |
178d00 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
178d20 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1f 96 45 04 00 84 43 | t2.y,excluded.y);.INSy;....E...C |
178d40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
178d60 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
178d80 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
178da0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
178dc0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
178de0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 | INSERT.INTO.t2(x,y).SELECT.zerob |
178e00 | 6c 6f 62 28 31 29 2a 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | lob(1)*a,b.FROM.t3.WHERE.true... |
178e20 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
178e40 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 23 96 44 04 | ax(t2.y,excluded.y);.INSy;..#.D. |
178e60 | 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..KCREATE.TABLE.t2(x.INTEGER.PRI |
178e80 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
178ea0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
178ec0 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
178ee0 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
178f00 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 | );.INSERT.INTO.t2(x,y).SELECT.ze |
178f20 | 72 6f 62 6c 6f 62 28 31 29 26 20 27 61 27 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | roblob(1)&.'a'a,b.FROM.t3.WHERE. |
178f40 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
178f60 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 | SET.y=max(t2.y,excluded.y);.INSy |
178f80 | 3b 0a 82 1f 96 43 04 00 84 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;....C...CCREATE.TABLE.t2(x.INTE |
178fa0 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
178fc0 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
178fe0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
179000 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
179020 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
179040 | 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 25 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | LECT.zeroblob(1)%a,b.FROM.t3.WHE |
179060 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
179080 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | TE.SET.y=max(t2.y,excluded.y);.I |
1790a0 | 4e 53 79 3b 0a 82 2f 96 42 04 00 84 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | NSy;../.B...cCREATE.TABLE.t2(x.I |
1790c0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
1790e0 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
179100 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
179120 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
179140 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
179160 | 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 7c 7c 20 7a 65 72 6f 62 6c 6f 62 28 | .SELECT.zeroblob(1).||.zeroblob( |
179180 | 31 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | 1)..a,b.FROM.t3.WHERE.true...ON. |
1791a0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
1791c0 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 3d 96 41 04 00 84 7f | t2.y,excluded.y);.INSy;..=.A.... |
1791e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
179200 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
179220 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
179240 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
179260 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
179280 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 | INSERT.INTO.t2(x,y).SELECT.zerob |
1792a0 | 6c 6f 62 28 31 29 20 7c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 7c 20 7a 65 72 6f 62 6c 6f 62 | lob(1).|.randomblob(1)|.zeroblob |
1792c0 | 28 31 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | (1)..a,b.FROM.t3.WHERE.true...ON |
1792e0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
179300 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2a 96 40 04 00 84 | (t2.y,excluded.y);.INSy;..*.@... |
179320 | 59 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | YCREATE.TABLE.t2(x.INTEGER.PRIMA |
179340 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
179360 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
179380 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
1793a0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
1793c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f | .INSERT.INTO.t2(x,y).SELECT.zero |
1793e0 | 62 6c 6f 62 28 31 29 20 7c 20 61 76 67 28 31 29 7c 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | blob(1).|.avg(1)|..a,b.FROM.t3.W |
179400 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
179420 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=max(t2.y,excluded.y); |
179440 | 0a 49 4e 53 79 3b 0a 81 67 96 3f 04 00 83 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .INSy;..g.?...SCREATE.TABLE.t2(x |
179460 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
179480 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
1794a0 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
1794c0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
1794e0 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
179500 | 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 | y).SELECT.zeroblob(1).a,b.FROM.t |
179520 | 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 3c 22 62 22 81 67 96 3e 04 00 83 53 43 52 45 41 54 45 | 3.ORDER.BY."a"<"b".g.>...SCREATE |
179540 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
179560 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
179580 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
1795a0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
1795c0 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
1795e0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 | .INTO.t2(x,y).SELECT.zeroblob(1) |
179600 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 61 22 81 6f 96 | .a,b.FROM.t3.ORDER.BY."a","a".o. |
179620 | 3d 04 00 83 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | =...cCREATE.TABLE.t2(x.INTEGER.P |
179640 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
179660 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
179680 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
1796a0 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
1796c0 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
1796e0 | 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 | zeroblob(1).a,b.FROM.t3.ORDER.BY |
179700 | 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 81 70 96 3c 04 00 83 65 43 52 45 41 54 45 20 54 | .."a","b""a","b".p.<...eCREATE.T |
179720 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
179740 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
179760 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
179780 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
1797a0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
1797c0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 | NTO.t2(x,y).SELECT.zeroblob(1).a |
1797e0 | 2c 20 72 61 6e 64 6f 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 | ,.random()b.FROM.t3.ORDER.BY."a" |
179800 | 2c 22 62 22 82 2f 96 3b 04 00 84 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | ,"b"./.;...cCREATE.TABLE.t2(x.IN |
179820 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
179840 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
179860 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
179880 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
1798a0 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
1798c0 | 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 3e 3e 20 7a 65 72 6f 62 6c 6f 62 28 31 | SELECT.zeroblob(1).>>.zeroblob(1 |
1798e0 | 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | )..a,b.FROM.t3.WHERE.true...ON.C |
179900 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 | ONFLICT(x).DO.UPDATE.SET.y=max(t |
179920 | 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2f 96 3a 04 00 84 63 43 | 2.y,excluded.y);.INSy;../.:...cC |
179940 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
179960 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
179980 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
1799a0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
1799c0 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
1799e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c | NSERT.INTO.t2(x,y).SELECT.zerobl |
179a00 | 6f 62 28 31 29 20 3e 3d 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 61 2c 62 20 46 52 4f 4d 20 74 | ob(1).>=.randomblob(1)a,b.FROM.t |
179a20 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
179a40 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(t2.y,excluded. |
179a60 | 79 29 3b 0a 49 4e 53 79 3b 0a 82 27 96 39 04 00 84 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | y);.INSy;..'.9...SCREATE.TABLE.t |
179a80 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
179aa0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
179ac0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
179ae0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
179b00 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
179b20 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 20 72 61 6e 64 6f 6d 28 29 2a | (x,y).SELECT.zeroblob(.random()* |
179b40 | 2d 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | -11).a,b.FROM.t3.WHERE.true...ON |
179b60 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
179b80 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 82 1e 96 38 04 00 84 41 43 52 45 | (t2.y,excluded.y);.;....8...ACRE |
179ba0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
179bc0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
179be0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
179c00 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
179c20 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
179c40 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 | ERT.INTO.t2(x,y).SELECT.zeroblob |
179c60 | 28 20 2d 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | (.-11).a,b.FROM.t3.WHERE.true... |
179c80 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
179ca0 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 83 23 96 37 04 00 86 4b 43 | ax(t2.y,excluded.y);.;..#.7...KC |
179cc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
179ce0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
179d00 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
179d20 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
179d40 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
179d60 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 5f | NSERT.INTO.t2(x,y).SELECT.total_ |
179d80 | 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 20 61 2c | changes()GLOB.total_changes().a, |
179da0 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
179dc0 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
179de0 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | xcluded.y);.INSERT.INTO.t2(x,y). |
179e00 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
179e20 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
179e40 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1e | xcluded.y.WHERE.y<excluded.y;... |
179e60 | 96 36 04 00 86 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .6...ACREATE.TABLE.t2(x.INTEGER. |
179e80 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
179ea0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
179ec0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
179ee0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
179f00 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
179f20 | 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 29 47 4c 4f 42 20 72 6f 75 6e 64 28 31 2c 31 29 20 | .total_changes()GLOB.round(1,1). |
179f40 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
179f60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
179f80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
179fa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
179fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
179fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
17a000 | 0d 00 00 00 1c 00 a3 00 1e e9 1d d2 1c b3 1b e0 1a cd 19 f0 18 d7 17 b6 16 95 15 79 14 52 13 27 | ...........................y.R.' |
17a020 | 11 f4 10 cd 0f a6 0e 7b 0d 54 0c 2d 0b 06 09 df 08 b8 07 91 06 6a 05 3f 04 18 02 f1 01 ca 00 a3 | .......{.T.-.........j.?........ |
17a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17a0a0 | 00 00 00 82 23 96 6c 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | ....#.l...KCREATE.TABLE.t2(x.INT |
17a0c0 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
17a0e0 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
17a100 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
17a120 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
17a140 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(y,y).S |
17a160 | 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 30 31 35 30 31 2d 30 31 31 29 20 61 2c | ELECT.randomblob(2001501-011).a, |
17a180 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
17a1a0 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 | CT(x).DO.UPDATE.SET.y=max(t2.y,u |
17a1c0 | 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 6b 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ded.y);.I..#.k...KCREATE.TABLE.t |
17a1e0 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
17a200 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
17a220 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
17a240 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
17a260 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
17a280 | 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 30 31 35 2b 31 2d | (y,y).SELECT.randomblob(20015+1- |
17a2a0 | 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | 011).a,b.FROM.t3.WHERE.true...ON |
17a2c0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
17a2e0 | 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 6a 04 00 84 4b 43 52 45 41 54 45 20 | (t2.y,uded.y);.I..#.j...KCREATE. |
17a300 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
17a320 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
17a340 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
17a360 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
17a380 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
17a3a0 | 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 | INTO.t2(y,y).SELECT.randomblob(2 |
17a3c0 | 30 30 31 2d 30 31 2d 30 31 31 29 20 20 22 61 22 2c 22 62 22 20 74 33 20 57 48 45 52 45 20 74 72 | 001-01-011).."a","b".t3.WHERE.tr |
17a3e0 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
17a400 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 69 04 00 84 4b | T.y=max(t2.y,uded.y);.I..#.i...K |
17a420 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
17a440 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
17a460 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
17a480 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
17a4a0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
17a4c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f | INSERT.INTO.t2(y,y).SELECT.rando |
17a4e0 | 6d 62 6c 6f 62 28 32 30 30 31 20 7c 7c 20 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | mblob(2001.||.011).a,b.FROM.t3.W |
17a500 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
17a520 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 | DATE.SET.y=max(t2.y,uded.y);.I.. |
17a540 | 27 96 68 04 00 84 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | '.h...SCREATE.TABLE.t2(x.INTEGER |
17a560 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
17a580 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
17a5a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
17a5c0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
17a5e0 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(y,y).SELEC |
17a600 | 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 20 7c 7c 20 30 31 35 30 31 2d 30 31 31 29 20 61 2c | T.randomblob(20.||.01501-011).a, |
17a620 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
17a640 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 | CT(x).DO.UPDATE.SET.y=max(t2.y,u |
17a660 | 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 67 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | ded.y);.I..#.g...KCREATE.TABLE.t |
17a680 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 | 2(x.INTEGER.PRIMARY.KEY,.y.INT.U |
17a6a0 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
17a6c0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
17a6e0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
17a700 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
17a720 | 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 2e 30 31 2d 30 31 2d | (y,y).SELECT.randomblob(2.01-01- |
17a740 | 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | 011).a,b.FROM.t3.WHERE.true...ON |
17a760 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
17a780 | 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 66 04 00 84 4b 43 52 45 41 54 45 20 | (t2.y,uded.y);.I..#.f...KCREATE. |
17a7a0 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
17a7c0 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
17a7e0 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
17a800 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
17a820 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
17a840 | 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 | INTO.t2(y,y).SELECT.randomblob(1 |
17a860 | 30 30 33 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | 003-01-011).a,b.FROM.t3.WHERE.tr |
17a880 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
17a8a0 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 65 04 00 84 4b | T.y=max(t2.y,uded.y);.I..#.e...K |
17a8c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
17a8e0 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
17a900 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
17a920 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
17a940 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
17a960 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f | INSERT.INTO.t2(y,y).SELECT.rando |
17a980 | 6d 62 6c 6f 62 28 31 30 30 31 2d 38 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | mblob(1001-81-011).a,b.FROM.t3.W |
17a9a0 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
17a9c0 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 | DATE.SET.y=max(t2.y,uded.y);.I.. |
17a9e0 | 23 96 64 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | #.d...KCREATE.TABLE.t2(x.INTEGER |
17aa00 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
17aa20 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
17aa40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
17aa60 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
17aa80 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(y,y).SELEC |
17aaa0 | 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 31 2d 35 31 2d 30 31 31 29 20 61 2c 62 20 46 52 | T.randomblob(1001-51-011).a,b.FR |
17aac0 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
17aae0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e | ).DO.UPDATE.SET.y=max(t2.y,uded. |
17ab00 | 79 29 3b 0a 49 0a 82 23 96 63 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | y);.I..#.c...KCREATE.TABLE.t2(x. |
17ab20 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
17ab40 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
17ab60 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
17ab80 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
17aba0 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(y,y |
17abc0 | 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 31 2d 30 34 2d 30 31 31 29 | ).SELECT.randomblob(1001-04-011) |
17abe0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
17ac00 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
17ac20 | 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 62 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c | y,uded.y);.I..#.b...KCREATE.TABL |
17ac40 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
17ac60 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
17ac80 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
17aca0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
17acc0 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
17ace0 | 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 31 2d | .t2(y,y).SELECT.randomblob(1001- |
17ad00 | 30 31 2d 33 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | 01-311).a,b.FROM.t3.WHERE.true.. |
17ad20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17ad40 | 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 61 04 00 84 4b 43 52 45 41 | max(t2.y,uded.y);.I..#.a...KCREA |
17ad60 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
17ad80 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
17ada0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
17adc0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
17ade0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
17ae00 | 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f | RT.INTO.t2(y,y).SELECT.randomblo |
17ae20 | 62 28 31 30 30 31 2d 30 31 2d 32 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | b(1001-01-211).a,b.FROM.t3.WHERE |
17ae40 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
17ae60 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 27 96 60 04 | .SET.y=max(t2.y,uded.y);.I..'.`. |
17ae80 | 00 84 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..SCREATE.TABLE.t2(x.INTEGER.PRI |
17aea0 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
17aec0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
17aee0 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
17af00 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
17af20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 | );.INSERT.INTO.t2(y,y).SELECT.ra |
17af40 | 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 31 2d 30 31 2d 30 31 31 29 20 7c 7c 20 20 61 2c 62 20 46 52 | ndomblob(1001-01-011).||..a,b.FR |
17af60 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
17af80 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e | ).DO.UPDATE.SET.y=max(t2.y,uded. |
17afa0 | 79 29 3b 0a 49 0a 82 23 96 5f 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | y);.I..#._...KCREATE.TABLE.t2(x. |
17afc0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
17afe0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
17b000 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
17b020 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
17b040 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(y,y |
17b060 | 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 31 2d 30 20 2d 31 31 31 29 | ).SELECT.randomblob(1001-0.-111) |
17b080 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
17b0a0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
17b0c0 | 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 5e 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c | y,uded.y);.I..#.^...KCREATE.TABL |
17b0e0 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
17b100 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
17b120 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
17b140 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
17b160 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
17b180 | 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 30 30 30 30 | .t2(y,y).SELECT.randomblob(10000 |
17b1a0 | 31 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | 11-011).a,b.FROM.t3.WHERE.true.. |
17b1c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17b1e0 | 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2f 96 5d 04 00 84 63 43 52 45 41 | max(t2.y,uded.y);.I../.]...cCREA |
17b200 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
17b220 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
17b240 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
17b260 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
17b280 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
17b2a0 | 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f | RT.INTO.t2(y,y).SELECT.randomblo |
17b2c0 | 62 28 31 29 47 4c 4f 42 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 20 61 2c 62 20 46 | b(1)GLOB.json_array(1,1,1).a,b.F |
17b2e0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
17b300 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 | x).DO.UPDATE.SET.y=max(t2.y,uded |
17b320 | 2e 79 29 3b 0a 49 0a 82 27 96 5c 04 00 84 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .y);.I..'.\...SCREATE.TABLE.t2(x |
17b340 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
17b360 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
17b380 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
17b3a0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
17b3c0 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c | ,(6,11),(1,1);.INSERT.INTO.t2(y, |
17b3e0 | 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 61 2c 20 72 61 6e 64 6f | y).SELECT.randomblob(1).a,.rando |
17b400 | 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | mblob(1)b.FROM.t3.WHERE.true...O |
17b420 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
17b440 | 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 5b 04 00 84 4b 43 52 45 41 54 45 | x(t2.y,uded.y);.I..#.[...KCREATE |
17b460 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
17b480 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
17b4a0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
17b4c0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
17b4e0 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
17b500 | 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 | .INTO.t2(y,y).SELECT.randomblob( |
17b520 | 20 61 76 67 28 31 29 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | .avg(1)-011).a,b.FROM.t3.WHERE.t |
17b540 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
17b560 | 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 18 96 5a 04 00 84 | ET.y=max(t2.y,uded.y);.I....Z... |
17b580 | 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | 5CREATE.TABLE.t2(x.INTEGER.PRIMA |
17b5a0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
17b5c0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
17b5e0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
17b600 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
17b620 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 | .INSERT.INTO.t2(y,y).SELECT.rand |
17b640 | 6f 6d 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | om().a,b.FROM.t3.WHERE.true...ON |
17b660 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
17b680 | 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1d 96 59 04 00 84 3f 43 52 45 | (t2.y,uded.y);.INSy;....Y...?CRE |
17b6a0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
17b6c0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
17b6e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
17b700 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
17b720 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
17b740 | 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 63 6f 61 6c 65 73 63 65 | ERT.INTO.t2(y,y).SELECT.coalesce |
17b760 | 28 31 2c 31 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | (1,1)GLOB.a,b.FROM.t3.WHERE.true |
17b780 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
17b7a0 | 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 1d 96 58 04 00 84 3f 43 52 | y=max(t2.y,uded.y);.I....X...?CR |
17b7c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
17b7e0 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
17b800 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
17b820 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
17b840 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
17b860 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 63 68 61 6e 67 65 73 | SERT.INTO.t2(y,y).SELECT.changes |
17b880 | 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 2d 74 72 75 65 0a 41 4e 44 20 74 72 | ().a,b.FROM.t3.WHERE-true.AND.tr |
17b8a0 | 75 65 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ue..ON.CONFLICT(x).DO.UPDATE.SET |
17b8c0 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 15 96 57 04 00 84 2f 43 | .y=max(t2.y,uded.y);.I....W.../C |
17b8e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
17b900 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
17b920 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
17b940 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
17b960 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
17b980 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 63 68 61 6e 67 65 | NSERT.INTO.t2(y,y).SELECT.change |
17b9a0 | 73 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 2d 74 72 75 65 0a 20 20 4f 4e 20 | s().a,b.FROM.t3.WHERE-true...ON. |
17b9c0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
17b9e0 | 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 81 59 96 56 04 00 83 37 43 52 45 41 54 45 20 54 | t2.y,uded.y);.I..Y.V...7CREATE.T |
17ba00 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
17ba20 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
17ba40 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
17ba60 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
17ba80 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
17baa0 | 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 63 68 61 6e 67 65 73 28 29 20 61 2c 62 | NTO.t2(y,y).SELECT.changes().a,b |
17bac0 | 20 46 52 4f 4d 20 74 33 00 57 79 3b 0a 82 0f 96 55 04 00 84 23 43 52 45 41 54 45 20 54 41 42 4c | .FROM.t3.Wy;....U...#CREATE.TABL |
17bae0 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
17bb00 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
17bb20 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
17bb40 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
17bb60 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
17bb80 | 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(y,y).SELECT.a,b.FROM.t3.WHER |
17bba0 | 45 2d 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E-true...ON.CONFLICT(x).DO.UPDAT |
17bbc0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | E.SET.y=max(t2.y,uded.y);.INSy;. |
17bbe0 | 81 4f 96 54 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .O.T...#CREATE.TABLE.t2(x.INTEGE |
17bc00 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.INT.UNIQUE)/*WI |
17bc20 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
17bc40 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
17bc60 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
17bc80 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(y,y).SELE |
17bca0 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 00 57 79 3b 0a 82 1b 96 53 04 00 84 3b 43 52 45 41 54 | CT.a,b.FROM.t3.Wy;....S...;CREAT |
17bcc0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
17bce0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
17bd00 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
17bd20 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
17bd40 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
17bd60 | 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 3a 65 72 6f 62 6c 6f 62 28 31 | T.INTO.t2(y,y).SELECT.:eroblob(1 |
17bd80 | 29 26 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | )&a,b.FROM.t3.WHERE.true...ON.CO |
17bda0 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
17bdc0 | 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 13 96 52 04 00 84 2b 43 52 45 41 54 45 | .y,uded.y);.INSy;....R...+CREATE |
17bde0 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
17be00 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
17be20 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
17be40 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
17be60 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
17be80 | 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 3d 20 61 2c 62 20 46 52 4f | .INTO.t2(y,y).SELECT.1==.a,b.FRO |
17bea0 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
17bec0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 | .DO.UPDATE.SET.y=max(t2.y,uded.y |
17bee0 | 29 3b 0a 49 4e 53 79 3b 0a 82 13 96 51 04 00 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | );.INSy;....Q...+CREATE.TABLE.t2 |
17bf00 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
17bf20 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
17bf40 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
17bf60 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
17bf80 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
17bfa0 | 79 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | y,y).SELECT.1=1.a,b.FROM.t3.WHER |
17bfc0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
17bfe0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | E.SET.y=max(t2.y,uded.y);.INSy;. |
17c000 | 0d 00 00 00 1b 01 3f 00 1e cf 1d 9e 1c 6d 1b 3c 1a 0b 18 da 17 b3 16 8c 15 65 14 34 13 0d 11 e6 | ......?......m.<.........e.4.... |
17c020 | 10 b5 0f 84 0e 67 0d 34 0c 15 0b 42 0a 2f 09 18 08 39 07 5a 06 4d 05 27 03 94 02 7a 01 3f 00 00 | .....g.4...B./...9.Z.M.'...z.?.. |
17c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c0c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c0e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17c120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 | ................................ |
17c140 | 37 97 07 04 00 84 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | 7.....sCREATE.TABLE.t2(x.INTEGER |
17c160 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
17c180 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
17c1a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
17c1c0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
17c1e0 | 28 31 2c 31 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);REPLACE.INTO.t2(x,y).SELEC |
17c200 | 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 | T..unicode(1).||.last_insert_row |
17c220 | 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | id()..a,b.FROM.t3.WHERE.true...O |
17c240 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
17c260 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 16 97 06 04 00 | x(t2.y,excluded.y);.INSy;....... |
17c280 | 84 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .1CREATE.TABLE.t2(x.INTEGER.PRIM |
17c2a0 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
17c2c0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
17c2e0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
17c300 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
17c320 | 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c | ;EXPLAIN.INSERT.INTO.t2(y,y).SEL |
17c340 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
17c360 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
17c380 | 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 0f 97 05 04 00 86 23 43 52 45 41 | t2.y,uded.y);.INSy;........#CREA |
17c3a0 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
17c3c0 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
17c3e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
17c400 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
17c420 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 45 58 50 4c 41 | ),(3,1),(8,9),(6,11),(1,1);EXPLA |
17c440 | 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f | IN.INSERT.INTO.t2(x,y).SELECT.to |
17c460 | 74 61 6c 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | tal(1).a,b.FROM.t3.WHERE.true... |
17c480 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
17c4a0 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ax(t2.y,excluded.y);.INSERT.INTO |
17c4c0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
17c4e0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
17c500 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | E.SET.y=excluded.y.WHERE.y<exclu |
17c520 | 64 65 64 2e 79 3b 0a 82 22 97 04 04 00 84 49 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y;..".....ICREATE.TABLE.t2(x |
17c540 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
17c560 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
17c580 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
17c5a0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
17c5c0 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 | ,(6,11),(1,1);EXPLAIN.INSERT.INT |
17c5e0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
17c600 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
17c620 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 | TE.SET.y=max(t2.y,excluded.y)AND |
17c640 | 20 74 72 75 65 3b 0a 49 4e 53 79 3b 0a 82 09 97 03 04 00 84 17 43 52 45 41 54 45 20 54 41 42 4c | .true;.INSy;.........CREATE.TABL |
17c660 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
17c680 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
17c6a0 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
17c6c0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
17c6e0 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 20 57 49 54 48 20 63 28 78 29 20 41 | ,(8,9),(6,11),(1,1);.WITH.c(x).A |
17c700 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | S.(values(1))..INSERT.INTO.t2(x, |
17c720 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
17c740 | 0a 20 20 49 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 79 3b 0a 81 5b 97 02 04 00 | ...IN.CONFLICT(x).DO.UPy;..[.... |
17c760 | 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .;CREATE.TABLE.t2(x.INTEGER.PRIM |
17c780 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
17c7a0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
17c7c0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
17c7e0 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
17c800 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 2f 2a 20 2a 2f 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t3./*.*/SELECT.a,b |
17c820 | 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 28 31 29 20 2d 31 3b 0a 81 5b 97 01 04 00 83 | .FROM.t3.ORDER.BY(1).-1;..[..... |
17c840 | 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ;CREATE.TABLE.t2(x.INTEGER.PRIMA |
17c860 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
17c880 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
17c8a0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
17c8c0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
17c8e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 2f 2a 20 2a 2f 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t3./*.*/SELECT.a,b. |
17c900 | 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 40 31 52 45 79 3b 0a 82 13 97 00 04 00 84 2b | FROM.t3.ORDER.BY.@1REy;........+ |
17c920 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
17c940 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
17c960 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
17c980 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
17c9a0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
17c9c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 40 31 3d 31 20 61 | INSERT.INTO.t2(y,y).SELECT@1=1.a |
17c9e0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
17ca00 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c | ICT(x).DO.UPDATE.SET.y=max(t2.y, |
17ca20 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 0f 96 7f 04 00 84 23 43 52 45 41 54 45 20 54 41 | uded.y);.INSy;........#CREATE.TA |
17ca40 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
17ca60 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
17ca80 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
17caa0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
17cac0 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
17cae0 | 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 2d 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(y,y).SELECT-a,b.FROM.t3.WH |
17cb00 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
17cb20 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 | ATE.SET.y=max(t2.y,uded.y);.INSy |
17cb40 | 3b 0a 81 4f 96 7e 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;..O.~...#CREATE.TABLE.t2(x.INTE |
17cb60 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
17cb80 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
17cba0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
17cbc0 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
17cbe0 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(y,y).SE |
17cc00 | 4c 45 43 54 2d 61 2c 62 20 46 52 4f 4d 20 74 33 00 57 79 3b 0a 82 1b 96 7d 04 00 84 3b 43 52 45 | LECT-a,b.FROM.t3.Wy;....}...;CRE |
17cc20 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
17cc40 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
17cc60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
17cc80 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
17cca0 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
17ccc0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 | ERT.INTO.t2(y,y).SELECT.zeroblob |
17cce0 | 28 31 29 26 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | (1)&a,b.FROM.t3.WHERE.true...ON. |
17cd00 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
17cd20 | 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2f 96 7c 04 00 84 63 43 52 45 41 | t2.y,uded.y);.INSy;../.|...cCREA |
17cd40 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
17cd60 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
17cd80 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
17cda0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
17cdc0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
17cde0 | 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 | RT.INTO.t2(y,y).SELECT.zeroblob( |
17ce00 | 31 29 20 3e 3d 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | 1).>=.zeroblob(1)..a,b.FROM.t3.W |
17ce20 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
17ce40 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=max(t2.y,excluded.y); |
17ce60 | 0a 49 4e 53 79 3b 0a 82 19 96 7b 04 00 84 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .INSy;....{...7CREATE.TABLE.t2(x |
17ce80 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
17cea0 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
17cec0 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
17cee0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
17cf00 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c | ,(6,11),(1,1);.INSERT.INTO.t2(y, |
17cf20 | 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 3f 29 20 61 2c 62 20 46 52 4f 4d | y).SELECT.randomblob(?).a,b.FROM |
17cf40 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
17cf60 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 | DO.UPDATE.SET.y=max(t2.y,uded.y) |
17cf80 | 3b 0a 49 0a 82 2d 96 7a 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | ;.I..-.z..._CREATE.TABLE.t2(x.IN |
17cfa0 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
17cfc0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
17cfe0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
17d000 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
17d020 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(y,y). |
17d040 | 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 39 32 30 30 31 2d 30 31 2d 30 31 30 30 31 | SELECT.randomblob(92001-01-01001 |
17d060 | 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | -01-011).a,b.FROM.t3.WHERE.true. |
17d080 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
17d0a0 | 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 79 04 00 84 5f 43 52 45 | =max(t2.y,uded.y);.I..-.y..._CRE |
17d0c0 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
17d0e0 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
17d100 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
17d120 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
17d140 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
17d160 | 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c | ERT.INTO.t2(y,y).SELECT.randombl |
17d180 | 6f 62 28 36 32 30 30 31 2d 30 31 2d 30 31 30 30 31 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 | ob(62001-01-01001-01-011).a,b.FR |
17d1a0 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
17d1c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e | ).DO.UPDATE.SET.y=max(t2.y,uded. |
17d1e0 | 79 29 3b 0a 49 0a 82 23 96 78 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | y);.I..#.x...KCREATE.TABLE.t2(x. |
17d200 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
17d220 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
17d240 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
17d260 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
17d280 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(y,y |
17d2a0 | 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 36 32 30 30 31 2d 30 31 2d 30 31 29 | ).SELECT.randomblob(62001-01-01) |
17d2c0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
17d2e0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
17d300 | 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 77 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c | y,uded.y);.I..#.w...KCREATE.TABL |
17d320 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
17d340 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
17d360 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
17d380 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
17d3a0 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
17d3c0 | 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 35 30 34 31 2d | .t2(y,y).SELECT.randomblob(5041- |
17d3e0 | 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | 01-011).a,b.FROM.t3.WHERE.true.. |
17d400 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17d420 | 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 76 04 00 84 5f 43 52 45 41 | max(t2.y,uded.y);.I..-.v..._CREA |
17d440 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
17d460 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.INT.UNIQUE)/*WIT.ROWID*/;.C |
17d480 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
17d4a0 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
17d4c0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
17d4e0 | 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f | RT.INTO.t2(y,y).SELECT.randomblo |
17d500 | 62 28 35 30 32 30 30 31 2d 30 31 2d 30 31 30 31 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f | b(502001-01-0101-01-011).a,b.FRO |
17d520 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
17d540 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 | .DO.UPDATE.SET.y=max(t2.y,uded.y |
17d560 | 29 3b 0a 49 0a 82 23 96 75 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | );.I..#.u...KCREATE.TABLE.t2(x.I |
17d580 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
17d5a0 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
17d5c0 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
17d5e0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
17d600 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(y,y) |
17d620 | 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 35 30 30 39 2d 30 31 2d 30 31 31 29 20 | .SELECT.randomblob(5009-01-011). |
17d640 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
17d660 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
17d680 | 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 74 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 | ,uded.y);.I..#.t...KCREATE.TABLE |
17d6a0 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PRIMARY.KEY,.y.INT |
17d6c0 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
17d6e0 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
17d700 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
17d720 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
17d740 | 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 35 30 30 31 45 30 | t2(y,y).SELECT.randomblob(5001E0 |
17d760 | 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | 1-011).a,b.FROM.t3.WHERE.true... |
17d780 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
17d7a0 | 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 23 96 73 04 00 84 4b 43 52 45 41 54 | ax(t2.y,uded.y);.I..#.s...KCREAT |
17d7c0 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
17d7e0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
17d800 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
17d820 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
17d840 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
17d860 | 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 | T.INTO.t2(y,y).SELECT.randomblob |
17d880 | 28 32 45 30 31 35 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | (2E01501-011).a,b.FROM.t3.WHERE. |
17d8a0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
17d8c0 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 72 04 00 | SET.y=max(t2.y,uded.y);.I..-.r.. |
17d8e0 | 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ._CREATE.TABLE.t2(x.INTEGER.PRIM |
17d900 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
17d920 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
17d940 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
17d960 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
17d980 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e | ;.INSERT.INTO.t2(y,y).SELECT.ran |
17d9a0 | 64 6f 6d 62 6c 6f 62 28 32 32 30 37 31 2d 30 31 2d 30 31 30 30 31 2d 30 31 2d 30 31 31 29 20 61 | domblob(22071-01-01001-01-011).a |
17d9c0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
17d9e0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c | ICT(x).DO.UPDATE.SET.y=max(t2.y, |
17da00 | 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 71 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | uded.y);.I..-.q..._CREATE.TABLE. |
17da20 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
17da40 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
17da60 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
17da80 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
17daa0 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
17dac0 | 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 30 31 2d 30 | 2(y,y).SELECT.randomblob(22001-0 |
17dae0 | 31 45 30 31 30 30 31 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | 1E01001-01-011).a,b.FROM.t3.WHER |
17db00 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
17db20 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 70 | E.SET.y=max(t2.y,uded.y);.I..-.p |
17db40 | 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ..._CREATE.TABLE.t2(x.INTEGER.PR |
17db60 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
17db80 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
17dba0 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
17dbc0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
17dbe0 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 | 1);.INSERT.INTO.t2(y,y).SELECT.r |
17dc00 | 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 30 31 2d 30 31 2d 30 35 30 30 31 2d 30 31 2d 30 31 31 29 | andomblob(22001-01-05001-01-011) |
17dc20 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
17dc40 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
17dc60 | 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 6f 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c | y,uded.y);.I..-.o..._CREATE.TABL |
17dc80 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
17dca0 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
17dcc0 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
17dce0 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
17dd00 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
17dd20 | 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 30 31 | .t2(y,y).SELECT.randomblob(22001 |
17dd40 | 2d 30 31 2d 30 31 30 30 31 2d 30 32 30 30 30 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | -01-01001-020001).a,b.FROM.t3.WH |
17dd60 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
17dd80 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d | ATE.SET.y=max(t2.y,uded.y);.I..- |
17dda0 | 96 6e 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .n..._CREATE.TABLE.t2(x.INTEGER. |
17ddc0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
17dde0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
17de00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
17de20 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
17de40 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(y,y).SELECT |
17de60 | 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 30 31 2d 30 31 2d 30 31 30 30 31 2d 30 31 2d 30 31 | .randomblob(22001-01-01001-01-01 |
17de80 | 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | 1).a,b.FROM.t3.WHERE.true...ON.C |
17dea0 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 | ONFLICT(x).DO.UPDATE.SET.y=max(t |
17dec0 | 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 2d 96 6d 04 00 84 5f 43 52 45 41 54 45 20 54 41 | 2.y,uded.y);.I..-.m..._CREATE.TA |
17dee0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
17df00 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
17df20 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
17df40 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
17df60 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
17df80 | 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 | TO.t2(y,y).SELECT.randomblob(220 |
17dfa0 | 30 31 2d 20 2d 31 30 31 30 30 31 2d 30 31 2d 30 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | 01-.-101001-01-011).a,b.FROM.t3. |
17dfc0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
17dfe0 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a | PDATE.SET.y=max(t2.y,uded.y);.I. |
17e000 | 0d 00 00 00 1a 00 c7 00 1e d7 1d f3 1c dc 1b fd 1b 1e 19 7c 18 41 17 4f 16 64 15 31 14 0e 12 79 | ...................|.A.O.d.1...y |
17e020 | 11 46 10 23 0f 3f 0e 28 0c a5 0b 22 09 9f 08 1c 06 99 05 0b 04 2c 03 05 01 e6 00 c7 00 00 00 00 | .F.#.?.(...".........,.......... |
17e040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
17e0c0 | 00 00 00 00 00 00 00 82 1b 97 21 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ..........!...;CREATE.TABLE.t2(x |
17e0e0 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
17e100 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
17e120 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
17e140 | 32 29 2c 28 37 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(7,4),(1,5),(6,7),(3,1),(8,9) |
17e160 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
17e180 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
17e1a0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
17e1c0 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 40 74 72 75 65 3b 0a | y=max(t2.y,excluded.y)AND@true;. |
17e1e0 | 49 4e 53 79 3b 0a 82 1b 97 20 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | INSy;........;CREATE.TABLE.t2(x. |
17e200 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
17e220 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
17e240 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
17e260 | 29 2c 28 37 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(7,4),(1,5),(6,7),(3,1),(8,9), |
17e280 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
17e2a0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
17e2c0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
17e2e0 | 3d 6d 61 78 28 20 40 31 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 20 72 6f 75 6e 64 28 31 | =max(.@1y,excluded.y)AND.round(1 |
17e300 | 2c 31 29 3b 0a 82 23 97 1f 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | ,1);..#.....KCREATE.TABLE.t2(x.I |
17e320 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
17e340 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
17e360 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
17e380 | 2c 28 37 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(7,4),(1,5),(6,7),(3,1),(8,9),( |
17e3a0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
17e3c0 | 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 20 61 2c 62 20 46 52 4f 4d | .SELECT..unicode(1).||..a,b.FROM |
17e3e0 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
17e400 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
17e420 | 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 5b 97 1e 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 | d.y);.INSy;..[.....;CREATE.TABLE |
17e440 | 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.INTEGER.PRIMARY.KEY,.y.INT |
17e460 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
17e480 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
17e4a0 | 45 53 28 31 2c 32 29 2c 28 36 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(6,4),(1,5),(6,7),(3,1), |
17e4c0 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 39 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,9);.INSERT.INTO. |
17e4e0 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 | t2(x,y).SELECT.a,b.FROM.t3.ORDER |
17e500 | 20 42 59 20 22 61 22 2c 22 62 22 83 0a 97 1d 04 00 86 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 | .BY."a","b"........CREATE.TABLE. |
17e520 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
17e540 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
17e560 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
17e580 | 53 28 31 2c 32 29 2c 28 33 2c 3f 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,?),(1,5),(6,7),(3,1),( |
17e5a0 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
17e5c0 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
17e5e0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
17e600 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 | SET.y=max(t2.y,excluded.y);.INSE |
17e620 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 6f 75 6e 64 28 31 2c 31 | RT.INTO.t2(x,y).SELECT.round(1,1 |
17e640 | 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | ).a,b.FROM.t3.WHERE.true...ON.CO |
17e660 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
17e680 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 7f 97 1c 04 00 86 | ed.y.WHERE.y<excluded.y;........ |
17e6a0 | 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
17e6c0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
17e6e0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
17e700 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 3f 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,?),(1,5) |
17e720 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
17e740 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
17e760 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
17e780 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
17e7a0 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
17e7c0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
17e7e0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
17e800 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 74 72 69 6d 28 31 2c 31 29 3b 0a 82 7f 97 1b | luded.y.WHERE.y<.trim(1,1);..... |
17e820 | 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t2(x.INTEGER.PR |
17e840 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
17e860 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
17e880 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 3f 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,?),(1 |
17e8a0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
17e8c0 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
17e8e0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
17e900 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c | ICT(x).DO.UPDATE.SET.y=max(t2.y, |
17e920 | 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | excluded.y);.INSERT.INTO.t2(x,y) |
17e940 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
17e960 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17e980 | 65 78 63 6c 75 64 65 64 2e 79 20 4f 52 20 74 72 75 65 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 | excluded.y.OR.true<excluded.y;.. |
17e9a0 | 7f 97 1a 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | .......CREATE.TABLE.t2(x.INTEGER |
17e9c0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
17e9e0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
17ea00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 3f 29 | INSERT.INTO.t3.VALUES(1,2),(3,?) |
17ea20 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
17ea40 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
17ea60 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
17ea80 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
17eaa0 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | .y,excluded.y);.INSERT.INTO.t2(x |
17eac0 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
17eae0 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
17eb00 | 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 4e 4f 54 4e 55 4c 4c 3c 65 78 63 6c 75 64 65 64 2e 79 | .y=excluded.y.NOTNULL<excluded.y |
17eb20 | 3b 0a 82 7f 97 19 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 | ;.........CREATE.TABLE.t2(x.INTE |
17eb40 | 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PRIMARY.KEY,.y.INT.UNIQUE)/* |
17eb60 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
17eb80 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
17eba0 | 2c 3f 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,?),(1,5),(6,7),(3,1),(8,9),(6,1 |
17ebc0 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
17ebe0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
17ec00 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
17ec20 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | (t2.y,excluded.y);.INSERT.INTO.t |
17ec40 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
17ec60 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
17ec80 | 53 45 54 20 79 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 3c 65 78 63 6c 75 64 65 | SET.y=.strftime(1,1,1,1)<exclude |
17eca0 | 64 2e 79 3b 0a 82 7f 97 18 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;.........CREATE.TABLE.t2(x.I |
17ecc0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
17ece0 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
17ed00 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
17ed20 | 2c 28 33 2c 3f 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,?),(1,5),(6,7),(3,1),(8,9),( |
17ed40 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
17ed60 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
17ed80 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17eda0 | 6d 61 78 28 74 32 2e 79 2c 32 30 30 31 2d 30 31 2d 30 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,2001-01-01);.INSERT.INT |
17edc0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
17ede0 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
17ee00 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.y.WHERE.y<excl |
17ee20 | 75 64 65 64 2e 79 3b 0a 82 13 97 17 04 00 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | uded.y;........+CREATE.TABLE.t2( |
17ee40 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
17ee60 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
17ee80 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
17eea0 | 2c 32 29 2c 28 33 2c 37 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,7),(1,5),(6,7),(3,1),(8,9 |
17eec0 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
17eee0 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
17ef00 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
17ef20 | 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 | .y=max(."a",excluded.y);.INSy;.. |
17ef40 | 60 97 16 04 00 83 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | `.....ECREATE.TABLE.t2(x.INTEGER |
17ef60 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
17ef80 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
17efa0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 35 29 | INSERT.INTO.t3.VALUES(1,2),(3,5) |
17efc0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
17efe0 | 28 31 2c 31 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);REPLACE.INTO.t2(x,y).SELEC |
17f000 | 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | T.random().a,b.FROM.t3.WHERE.tru |
17f020 | 65 0a 00 82 1f 97 15 04 00 84 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 | e.........CCREATE.TABLE.t2(x.INT |
17f040 | 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f | EGER.PRIMARY.KEY,.y.INT.UNIQUE)/ |
17f060 | 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c | *WIT.ROWID*/;.CREATE.TABLE.t3(a, |
17f080 | 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | b);.INSERT.INTO.t3.VALUES(1,2),( |
17f0a0 | 33 2c 35 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,5),(1,5),(6,7),(3,1),(8,9),(6, |
17f0c0 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
17f0e0 | 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 26 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | ELECT.zeroblob(1)&a,b.FROM.t3.WH |
17f100 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
17f120 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
17f140 | 49 4e 53 79 3b 0a 82 2f 97 14 04 00 84 63 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | INSy;../.....cCREATE.TABLE.t2(x. |
17f160 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
17f180 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
17f1a0 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
17f1c0 | 29 2c 28 33 2c 35 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,5),(1,5),(6,7),(3,1),(8,9), |
17f1e0 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
17f200 | 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 3e 3d 20 7a 65 72 6f 62 6c 6f 62 | ).SELECT.zeroblob(1).>=.zeroblob |
17f220 | 28 31 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | (1)..a,b.FROM.t3.WHERE.true...ON |
17f240 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
17f260 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 11 97 13 04 00 86 | (t2.y,excluded.y);.INSy;........ |
17f280 | 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | 'CREATE.TABLE.t2(x.INTEGER.PRIMA |
17f2a0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
17f2c0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
17f2e0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 32 30 30 31 2d 30 31 | .INTO.t3.VALUES(1,2),(3,42001-01 |
17f300 | 2d 30 31 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | -01),(1,5),(6,7),(3,1),(8,9),(6, |
17f320 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
17f340 | 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | ELECT.json(1).a,b.FROM.t3.WHERE. |
17f360 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
17f380 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 | SET.y=max(t2.y,excluded.y);.INSE |
17f3a0 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 | RT.INTO.t2(x,y).SELECT.a,b.FROM. |
17f3c0 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
17f3e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 | O.UPDATE.SET.y=excluded.y.WHERE. |
17f400 | 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 1f 97 12 04 00 84 43 43 52 45 41 54 45 20 54 41 42 | y<excluded.y;........CCREATE.TAB |
17f420 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
17f440 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
17f460 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
17f480 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,7),(6,7),(3,1 |
17f4a0 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
17f4c0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 26 61 2c 62 | O.t2(x,y).SELECT.zeroblob(1)&a,b |
17f4e0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
17f500 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
17f520 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2f 97 11 04 00 84 63 43 52 45 41 54 45 20 | cluded.y);.INSy;../.....cCREATE. |
17f540 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
17f560 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
17f580 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
17f5a0 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,7),(6,7),( |
17f5c0 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
17f5e0 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 | INTO.t2(x,y).SELECT.zeroblob(1). |
17f600 | 3e 3d 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | >=.zeroblob(1)..a,b.FROM.t3.WHER |
17f620 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
17f640 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
17f660 | 53 79 3b 0a 81 67 97 10 04 00 83 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | Sy;..g.....SCREATE.TABLE.t2(x.IN |
17f680 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
17f6a0 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
17f6c0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
17f6e0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 39 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,9),(8,9),(6 |
17f700 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
17f720 | 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f | SELECT.zeroblob(1).a,b.FROM.t3.O |
17f740 | 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 81 6e 97 0f 04 00 83 61 43 52 45 41 54 45 20 54 41 | RDER.BY."a","b".n.....aCREATE.TA |
17f760 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
17f780 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
17f7a0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
17f7c0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
17f7e0 | 39 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 9),(8,9),(6,11),(1,1);.INSERT.IN |
17f800 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f | TO.t2(x,y).SELECT.sqlite_source_ |
17f820 | 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 | id().a,b.FROM.t3.ORDER.BY."a","b |
17f840 | 22 82 37 97 0e 04 00 84 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ".7.....sCREATE.TABLE.t2(x.INTEG |
17f860 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
17f880 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
17f8a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
17f8c0 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 39 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,9),(8,9),(6,11 |
17f8e0 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
17f900 | 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 | ECT..unicode(1).||.last_insert_r |
17f920 | 6f 77 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | owid()..a,b.FROM.t3.WHERE.true.. |
17f940 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17f960 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 1e 97 0d | max(t2.y,excluded.y);.INSy;..... |
17f980 | 04 00 86 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...ACREATE.TABLE.t2(x.INTEGER.PR |
17f9a0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
17f9c0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
17f9e0 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
17fa00 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e | ,5),(6,7),(3,1),(8,~~~~~~~~~~~~~ |
17fa20 | 7e 7e 7e 7e 7e 7e 7e 7e 7e 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | ~~~~~~~~~9),(6,11),(1,1);.INSERT |
17fa40 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 28 31 29 20 61 2c | .INTO.t2(x,y).SELECT.total(1).a, |
17fa60 | 20 61 76 67 28 31 29 74 33 20 57 48 45 52 45 40 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | .avg(1)t3.WHERE@true...ON.CONFLI |
17fa80 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
17faa0 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 7c 29 20 | xcluded.y);.INSERT.INTO.t2(x,|). |
17fac0 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
17fae0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
17fb00 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 5b | xcluded.y.WHERE.y<excluded.y;..[ |
17fb20 | 97 0c 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .....;CREATE.TABLE.t2(x.INTEGER. |
17fb40 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
17fb60 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
17fb80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
17fba0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
17fbc0 | 31 2c 39 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,9);.INSERT.INTO.t2(x,y).SELECT |
17fbe0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 81 5b 97 | .a,b.FROM.t3.ORDER.BY."a","b".[. |
17fc00 | 0b 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | ....;CREATE.TABLE.t2(x.INTEGER.P |
17fc20 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
17fc40 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
17fc60 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
17fc80 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
17fca0 | 2c 39 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,9);.INSERT.INTO.t2(x,y).SELECT. |
17fcc0 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2a 22 62 22 82 13 97 0a | a,b.FROM.t3.ORDER.BY."a"*"b".... |
17fce0 | 04 00 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...+CREATE.TABLE.t2(x.INTEGER.PR |
17fd00 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
17fd20 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
17fd40 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
17fd60 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
17fd80 | 31 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 31 | 1);REPLACE.INTO.t2(y,y).SELECT.1 |
17fda0 | 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | =1.a,b.FROM.t3.WHERE.true...ON.C |
17fdc0 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 | ONFLICT(x).DO.UPDATE.SET.y=max(t |
17fde0 | 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 81 60 97 09 04 00 83 45 43 52 45 41 54 | 2.y,uded.y);.INSy;..`.....ECREAT |
17fe00 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
17fe20 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
17fe40 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
17fe60 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
17fe80 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 52 45 50 4c 41 43 | ,(3,1),(8,9),(6,11),(1,1);REPLAC |
17fea0 | 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 | E.INTO.t2(x,y).SELECT.random().a |
17fec0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 82 25 97 08 04 00 84 4f 43 | ,b.FROM.t3.WHERE.true...%.....OC |
17fee0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
17ff00 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
17ff20 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
17ff40 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
17ff60 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 52 45 | 6,7),(3,1),(8,9),(6,11),(1,1);RE |
17ff80 | 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e | PLACE.INTO.t2(x,y).SELECT.a,.ran |
17ffa0 | 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | domblob(1)b.FROM.t3.WHERE.true.. |
17ffc0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
17ffe0 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 20 74 72 75 65 3b 0a 49 0a | max(t2.y,excluded.y)AND.true;.I. |
180000 | 0d 00 00 00 1b 00 cf 00 1f 04 1e 25 1c 98 1b af 1a dc 19 4f 18 7c 17 5f 16 38 15 19 13 fa 13 16 | ...........%.......O.|._.8...... |
180020 | 11 e9 10 cb 0f 48 0e 25 0c 9b 0b 18 09 e7 09 58 08 bc 08 21 07 5b 05 b8 04 15 02 72 00 cf 00 00 | .....H.%.......X...!.[.....r.... |
180040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
180060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
180080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1800a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1800c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 1f 97 3c 04 00 86 43 43 52 45 41 54 45 20 54 41 | ..................<...CCREATE.TA |
1800e0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
180100 | 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)WITHOUT.ROWID;.CREATE |
180120 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 | .TABLE.t3(a,b.char(1));.INSERT.I |
180140 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
180160 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 20 63 68 61 72 28 31 29 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,.char(1));.I |
180180 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e | NSERT.INTO.t2(x,y).SELECT.a,.ran |
1801a0 | 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 | domblob(12001-01-01)b.FROM.t3.WH |
1801c0 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
1801e0 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
180200 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
180220 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
180240 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
180260 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 3b 04 00 86 43 43 52 45 41 54 45 | ERE.y<excluded.y;....;...CCREATE |
180280 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
1802a0 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | .y.INT.UNIQUE)WITHOUT.ROWID;.CRE |
1802c0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 | ATE.TABLE.t3(a,b.char(1));.INSER |
1802e0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
180300 | 29 2c 28 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 2c 31 31 29 2c 28 31 2c 31 29 | ),(.sqlite_source_id(),11),(1,1) |
180320 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 | ;.INSERT.INTO.t2(x,y).SELECT.a,. |
180340 | 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 | randomblob(12001-01-01)b.FROM.t3 |
180360 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
180380 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(t2.y,excluded.y |
1803a0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
1803c0 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
1803e0 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 | CT(x).DO.UPDATE.SET.y=excluded.y |
180400 | 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 3a 04 00 86 43 43 52 45 | .WHERE.y<excluded.y;....:...CCRE |
180420 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
180440 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | EY,.y.INT.UNIQUE)WITHOUT.ROWID;. |
180460 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e | CREATE.TABLE.t3(a,b.char(1));.IN |
180480 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 31 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(1,4),( |
1804a0 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
1804c0 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
1804e0 | 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d | a,.randomblob(12001-01-01)b.FROM |
180500 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
180520 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
180540 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
180560 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
180580 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
1805a0 | 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 39 04 00 86 43 | d.y.WHERE.y<excluded.y;....9...C |
1805c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
1805e0 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | Y.KEY,.y.INT.UNIQUE)WITHOUT.ROWI |
180600 | 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b | D;.CREATE.TABLE.t3(a,b.char(1)); |
180620 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 73 | .INSERT.INTO.t3.VALUES(.sqlite_s |
180640 | 6f 75 72 63 65 5f 69 64 28 29 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ource_id(),7),(3,1),(8,9),(6,11) |
180660 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
180680 | 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 | CT.a,.randomblob(12001-01-01)b.F |
1806a0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
1806c0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=max(t2.y,excl |
1806e0 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | uded.y);.INSERT.INTO.t2(x,y).SEL |
180700 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
180720 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c | CONFLICT(x).DO.UPDATE.SET.y=excl |
180740 | 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 42 97 38 04 | uded.y.WHERE.y<excluded.y;..B.8. |
180760 | 00 83 09 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t2(x.INTEGER.PRI |
180780 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 | MARY.KEY,.y.INT.UNIQUE)WITHOUT.R |
1807a0 | 4f 57 49 44 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | OWID/*WIT.ROWID*/;.CREATE.TABLE. |
1807c0 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
1807e0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | ,2),(3,4),(1,5),(.?16,7),(3,1),( |
180800 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 41 4e 41 4c 59 5a 45 | 8,9),(6,11),(1,1);VACUUM;ANALYZE |
180820 | 0a 81 17 97 37 04 00 82 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ....7...3CREATE.TABLE.t2(x.INTEG |
180840 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 | ER.PRIMARY.KEY,.y.INT.UNIQUE)WIT |
180860 | 48 4f 55 54 20 52 4f 57 49 44 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | HOUT.ROWID/*WIT.ROWID*/;.CREATE. |
180880 | 54 41 42 4c 45 20 74 33 28 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 61 2c 62 29 3b | TABLE.t3(R.PRIMARY.KEY,.y.Ia,b); |
1808a0 | 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 3b 0a 49 4e 3b 0a 81 18 97 36 | ANALYZE.INTO.t3.VALUES;.IN;....6 |
1808c0 | 04 00 82 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...5CREATE.TABLE.t2(x.INTEGER.PR |
1808e0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 | IMARY.KEY,.y.INT.UNIQUE)WITHOUT. |
180900 | 52 4f 57 49 44 2f 2a 57 49 54 20 52 00 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | ROWID/*WIT.R.WHERE.true...ON.CON |
180920 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
180940 | 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 0b 97 35 04 00 82 1b | d.y.WHERE.y<excluded.y;....5.... |
180960 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
180980 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | Y.KEY,.y.INT.UNIQUE)WITHOUT.ROWI |
1809a0 | 44 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | D.true...ON.CONFLICT(x).DO.UPDAT |
1809c0 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | E.SET.y=excluded.y.WHERE.y<exclu |
1809e0 | 64 65 64 2e 79 3b 0a 82 2d 97 34 04 00 84 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y;..-.4..._CREATE.TABLE.t2(x |
180a00 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
180a20 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 88 | UE)/*WIT.ROWID*/;.CREATE.TABLE.. |
180a40 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
180a60 | 32 29 2c 28 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | 2),(~~~~~~~~~~~~~~~3,4),(1,5),(6 |
180a80 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 00 40 | ,7),(3,1),(8,9),(6,11),(1,1);..@ |
180aa0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 | SERT.INTO.t2(x,y).SELECT.json(1) |
180ac0 | 20 61 2c 20 61 62 73 28 31 29 62 20 46 52 4f 4d 20 74 32 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .a,.abs(1)b.FROM.t2.WHERE.true.. |
180ae0 | 05 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
180b00 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 82 7f 97 33 04 00 86 03 | max(t2.y,excluded.y);.;....3.... |
180b20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
180b40 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
180b60 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 52 45 50 4c 41 43 45 20 | /;.CREATE.TABLE.t3(a,b);REPLACE. |
180b80 | 49 4e 54 4f 20 74 32 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t2.VALUES(1,2),(3,4),(1,5), |
180ba0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
180bc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
180be0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
180c00 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=max(t2.y,excl |
180c20 | 75 64 65 64 2e 79 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | uded.y);REPLACE.INTO.t2(x,y).SEL |
180c40 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
180c60 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c | CONFLICT(x).DO.UPDATE.SET.y=excl |
180c80 | 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 06 97 32 04 | uded.y.WHERE.y<excluded.y;....2. |
180ca0 | 00 86 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t2(x.INTEGER.PRI |
180cc0 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
180ce0 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 52 45 50 4c 41 | ID*/;.CREATE.TABLE.t3(a,b);REPLA |
180d00 | 43 45 20 49 4e 54 4f 20 74 32 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | CE.INTO.t2.VALUES(1,2),(3,4),(1, |
180d20 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
180d40 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
180d60 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
180d80 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.y=max(t2.y,e |
180da0 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | xcluded.y);.INSERT.INTO.t2(x,y). |
180dc0 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
180de0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
180e00 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 41 4e 41 | xcluded.y.WHERE.y<excluded.y;ANA |
180e20 | 4c 59 5a 45 0a 82 1f 97 31 04 00 84 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | LYZE....1...CCREATE.TABLE.t2(x.I |
180e40 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
180e60 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
180e80 | 61 2c 62 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);REPLACE.INTO.t2.VALUES(1,2) |
180ea0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
180ec0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
180ee0 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
180f00 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
180f20 | 40 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 53 45 4c 45 43 54 20 40 74 32 | @ax(t2.y,excluded.y);.SELECT.@t2 |
180f40 | 28 78 2c 79 29 79 3b 0a 82 7f 97 30 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | (x,y)y;....0....CREATE.TABLE.t2( |
180f60 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
180f80 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
180fa0 | 74 33 28 61 2c 62 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 20 56 41 4c 55 45 53 28 31 | t3(a,b);REPLACE.INTO.t2.VALUES(1 |
180fc0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
180fe0 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
181000 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,y).SELECT.a,b.FROM.t3.WHERE.tru |
181020 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
181040 | 20 79 3d 40 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 | .y=@ax(t2.y,excluded.y);.INSERT. |
181060 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
181080 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
1810a0 | 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 00 57 48 45 52 45 20 79 3c 65 | PDATE.SET.y=excluded.y.WHERE.y<e |
1810c0 | 78 63 6c 75 64 65 64 2e 79 3b 0a 82 1a 97 2f 04 00 84 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 | xcluded.y;..../...9CREATE.TABLE. |
1810e0 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
181100 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
181120 | 4c 45 20 74 33 28 61 2c 62 29 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | LE.t3(a,b);EXPLAIN.INSERT.INTO.t |
181140 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
181160 | 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,.randomblob(1)),(1,1);.INSERT |
181180 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 | .INTO.t2(x,y).SELECT.a,b.FROM.t3 |
1811a0 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
1811c0 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(."a",excluded.y |
1811e0 | 29 3b 0a 49 4e 53 79 3b 0a 82 29 97 2e 04 00 84 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | );.INSy;..).....WCREATE.TABLE.t2 |
181200 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
181220 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
181240 | 20 74 33 28 61 2c 62 29 3b 20 57 49 54 48 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 | .t3(a,b);.WITH.c(x).AS.(values(1 |
181260 | 29 29 20 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | ))..INSERT.INTO.t3.VALUES(1,2),( |
181280 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
1812a0 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
1812c0 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
1812e0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 72 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.r=ma |
181300 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 81 60 97 2d 04 00 83 45 43 52 | x(t2.y,excluded.y);.I..`.-...ECR |
181320 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
181340 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
181360 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
181380 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(9,2),(3,4),(1,5),(6 |
1813a0 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 52 45 50 | ,7),(3,1),(8,9),(6,11),(1,1);REP |
1813c0 | 4c 41 43 45 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 | LACE.INTO.t2(x,y).SELECT.random( |
1813e0 | 29 20 61 2c 61 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 82 1b 97 2c 04 00 | ).a,a.FROM.t3.WHERE.true.....,.. |
181400 | 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .;CREATE.TABLE.t2(x.INTEGER.PRIM |
181420 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
181440 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
181460 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(9,2),(3,4),(1,5 |
181480 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
1814a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
1814c0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
1814e0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
181500 | 63 6c 75 64 65 64 2e 79 29 41 4e 44 40 74 72 75 65 3b 0a 49 4e 53 79 3b 0a 82 1b 97 2b 04 00 84 | cluded.y)AND@true;.INSy;....+... |
181520 | 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | ;CREATE.TABLE.t2(x.INTEGER.PRIMA |
181540 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.INT.UNIQUE)/*WIT.ROWID |
181560 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
181580 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(9,2),(3,4),(1,5) |
1815a0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
1815c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
1815e0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
181600 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 40 31 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(.@1y,exc |
181620 | 6c 75 64 65 64 2e 79 29 41 4e 44 20 72 6f 75 6e 64 28 31 2c 31 29 3b 0a 82 23 97 2a 04 00 84 4b | luded.y)AND.round(1,1);..#.*...K |
181640 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
181660 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
181680 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
1816a0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(9,2),(3,4),(1,5), |
1816c0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
1816e0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 | INSERT.INTO.t2(x,y).SELECT..unic |
181700 | 6f 64 65 28 31 29 20 7c 7c 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ode(1).||..a,b.FROM.t3.WHERE.tru |
181720 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
181740 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 | .y=max(t2.y,excluded.y);.INSy;.. |
181760 | 19 97 29 04 00 84 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | ..)...7CREATE.TABLE.t2(x.INTEGER |
181780 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PRIMARY.KEY,.y.INT.UNIQUE)/*WIT |
1817a0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
1817c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(9,2),(3,4) |
1817e0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 30 31 | ,(1,5),(6,7),(3,.randomblob(2001 |
181800 | 2d 30 31 2d 30 31 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | -01-011)),(1,1);.INSERT.INTO.t2( |
181820 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | x,y).SELECT.a,b.FROM.t3.WHERE.tr |
181840 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
181860 | 54 20 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 81 4f 97 28 | T.y=max(."a",excluded.y);.I..O.( |
181880 | 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...#CREATE.TABLE.t2(x.INTEGER.PR |
1818a0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
1818c0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
1818e0 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 36 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(6,2),(3,4),(1 |
181900 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
181920 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 2d 61 | 1);.INSERT.INTO.t2(y,y).SELECT-a |
181940 | 2c 62 20 46 52 4f 4d 20 74 33 00 57 79 3b 0a 83 09 97 27 04 00 86 17 43 52 45 41 54 45 20 54 41 | ,b.FROM.t3.Wy;....'....CREATE.TA |
181960 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
181980 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
1819a0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
1819c0 | 41 4c 55 45 53 28 36 2c 32 29 2c 28 33 2c 20 20 7a 65 72 6f 62 6c 6f 62 28 32 30 30 31 2d 30 31 | ALUES(6,2),(3,..zeroblob(2001-01 |
1819e0 | 2d 30 31 31 29 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | -011)),(3,1),(8,9),(6,11),(1,1); |
181a00 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
181a20 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
181a40 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
181a60 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
181a80 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
181aa0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
181ac0 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 4f 97 26 | luded.y.WHERE.y<excluded.y;..O.& |
181ae0 | 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...#CREATE.TABLE.t2(x.INTEGER.PR |
181b00 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.INT.UNIQUE)/*WIT.RO |
181b20 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
181b40 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 33 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(3,2),(3,4),(1 |
181b60 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
181b80 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(y,y).SELECT.a |
181ba0 | 2c 62 20 46 52 4f 4d 20 74 33 00 57 79 3b 0a 81 65 97 25 04 00 83 4f 43 52 45 41 54 45 20 54 41 | ,b.FROM.t3.Wy;..e.%...OCREATE.TA |
181bc0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
181be0 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
181c00 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
181c20 | 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | ALUES(2001-01-011,2),(3,4),(1,5) |
181c40 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 39 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,9); |
181c60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
181c80 | 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 83 09 97 24 04 00 86 17 | FROM.t3.ORDER.BY."a","b"...$.... |
181ca0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
181cc0 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.INT.UNIQUE)/*WIT.ROWID* |
181ce0 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
181d00 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 32 29 2c 28 33 | INTO.t3.VALUES(2001-01-011,2),(3 |
181d20 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
181d40 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
181d60 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
181d80 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
181da0 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | (t2.y,excluded.y);.INSERT.INTO.t |
181dc0 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | 2(x,y).SELECT.a,b.FROM.t3.WHERE. |
181de0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
181e00 | 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 | SET.y=excluded.y.WHERE.y<exclude |
181e20 | 64 2e 79 3b 0a 81 5b 97 23 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;..[.#...;CREATE.TABLE.t2(x.I |
181e40 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
181e60 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
181e80 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 38 29 | a,b);.INSERT.INTO.t3.VALUES(1,8) |
181ea0 | 2c 28 33 2c 34 29 2c 28 31 2c 34 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,4),(6,7),(3,1),(8,9),( |
181ec0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
181ee0 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 72 6f 75 6e 64 28 | .SELECT.a,b.FROM.t3.WHERE.round( |
181f00 | 31 2c 42 29 81 78 97 22 04 00 83 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | 1,B).x."...uCREATE.TABLE.t2(x.IN |
181f20 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
181f40 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
181f60 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 30 30 | ,b);.INSERT.INTO.t3.VALUES(1,200 |
181f80 | 31 2d 30 31 2d 30 31 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | 1-01-012),(3,4),(1,5),(6,7),(3,1 |
181fa0 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
181fc0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 | O.t2(x,y).SELECT.sqlite_source_i |
181fe0 | 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 4f 52 44 45 52 20 42 59 20 22 61 22 2c 22 62 22 | d().a,b.FROM.t3.ORDER.BY."a","b" |
182000 | 0d 00 00 00 13 00 d0 00 1e 71 1c d4 1b 30 19 97 17 fe 16 5b 14 b8 13 12 11 61 0f be 0e 14 0c 6b | .........q...0.....[.....a.....k |
182020 | 0a bf 09 09 07 5c 05 b9 04 16 02 73 00 d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....\.....s.................... |
182040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
182060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
182080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1820a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1820c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 1f 97 4f 04 00 86 43 43 52 45 41 54 45 20 54 | ...................O...CCREATE.T |
1820e0 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
182100 | 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | .INT.UNIQUE)WITHOUT.ROWID;.CREAT |
182120 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 | E.TABLE.t3(a,b.char(1));.INSERT. |
182140 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
182160 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
182180 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 | INSERT.INTO.t2(x,y).SELECT.a,.ra |
1821a0 | 6e 64 6f 6d 62 6c 6f 62 28 35 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 | ndomblob(52001-01-01)b.FROM.t3.W |
1821c0 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
1821e0 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=max(t2.y,excluded.y); |
182200 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
182220 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
182240 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 | (x).DO.UPDATE.SET.y=excluded.y.W |
182260 | 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 4e 04 00 86 43 43 52 45 41 54 | HERE.y<excluded.y;....N...CCREAT |
182280 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
1822a0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 | ,.y.INT.UNIQUE)WITHOUT.ROWID;.CR |
1822c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 | EATE.TABLE.t3(a,b.char(1));.INSE |
1822e0 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
182300 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
182320 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
182340 | 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 34 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 | .randomblob(42001-01-01)b.FROM.t |
182360 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
182380 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(t2.y,excluded. |
1823a0 | 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | y);.INSERT.INTO.t2(x,y).SELECT.a |
1823c0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
1823e0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e | ICT(x).DO.UPDATE.SET.y=excluded. |
182400 | 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 4d 04 00 86 43 43 52 | y.WHERE.y<excluded.y;....M...CCR |
182420 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
182440 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | KEY,.y.INT.UNIQUE)WITHOUT.ROWID; |
182460 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 | .CREATE.TABLE.t3(a,b.char(1));.I |
182480 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
1824a0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
1824c0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
1824e0 | 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f | .a,.randomblob(22001-01-01)b.FRO |
182500 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
182520 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
182540 | 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | ed.y);.INSERT.INTO.t2(x,y).SELEC |
182560 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
182580 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
1825a0 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 4c 04 00 86 | ed.y.WHERE.y<excluded.y;....L... |
1825c0 | 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | CCREATE.TABLE.t2(x.INTEGER.PRIMA |
1825e0 | 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 | RY.KEY,.y.INT.UNIQUE)WITHOUT.ROW |
182600 | 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 | ID;.CREATE.TABLE.t3(a,b.char(1)) |
182620 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
182640 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
182660 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
182680 | 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 38 30 30 31 2d 30 31 2d 30 31 29 62 20 | ECT.a,.randomblob(18001-01-01)b. |
1826a0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
1826c0 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
1826e0 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
182700 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
182720 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
182740 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 29 97 4b | luded.y.WHERE.y<excluded.y;..).K |
182760 | 04 00 86 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...WCREATE.TABLE.t2(x.INTEGER.PR |
182780 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 | IMARY.KEY,.y.INT.UNIQUE)WITHOUT. |
1827a0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 | ROWID;.CREATE.TABLE.t3(a,b.char( |
1827c0 | 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | 1));.INSERT.INTO.t3.VALUES(1,2), |
1827e0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
182800 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
182820 | 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 32 30 30 31 2d 30 31 2d 30 | SELECT.a,.randomblob(122001-01-0 |
182840 | 31 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | 1001-01-01)b.FROM.t3.WHERE.true. |
182860 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
182880 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
1828a0 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
1828c0 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
1828e0 | 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 | ATE.SET.y=excluded.y.WHERE.y<exc |
182900 | 6c 75 64 65 64 2e 79 3b 0a 83 32 97 4a 04 00 86 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | luded.y;..2.J...iCREATE.TABLE.t2 |
182920 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y.INT.UN |
182940 | 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)WITHOUT.ROWID;.CREATE.TABLE |
182960 | 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | .t3(a,b.char(1));.INSERT.INTO.t3 |
182980 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
1829a0 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
1829c0 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f | INTO.t2(x,y).SELECT.a,.randomblo |
1829e0 | 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | b(12001-01-01)b.FROM.t3.WHERE.tr |
182a00 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
182a20 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 | T.y=max(t2.y,excluded.y);.INSERT |
182a40 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f 73 6f 75 72 | .INTO.t2(x,y).SELECT.sqlite_sour |
182a60 | 63 65 5f 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | ce_id().a,b.FROM.t3.WHERE.true.. |
182a80 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
182aa0 | 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 | excluded.y.WHERE.y<excluded.y;.. |
182ac0 | 28 97 49 04 00 86 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 | (.I...UCREATE.TABLE.t2(x.INTEGER |
182ae0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f | .PRIMARY.KEY,.y.INT.UNIQUE)WITHO |
182b00 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 | UT.ROWID;.CREATE.TABLE.t3(a,b.ch |
182b20 | 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | ar(1));.INSERT.INTO.t3.VALUES(1, |
182b40 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
182b60 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
182b80 | 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 | y).SELECT.a,.randomblob(12001-01 |
182ba0 | 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | -01)b.FROM.t3.WHERE.true...ON.CO |
182bc0 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
182be0 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | .y,excluded.y);.INSERT.INTO.t2(x |
182c00 | 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | ,y).SELECT.random().a,b.FROM.t3. |
182c20 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
182c40 | 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 | PDATE.SET.y=excluded.y.WHERE.y<e |
182c60 | 78 63 6c 75 64 65 64 2e 79 3b 0a 83 25 97 48 04 00 86 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | xcluded.y;..%.H...OCREATE.TABLE. |
182c80 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.INTEGER.PRIMARY.KEY,.y.INT. |
182ca0 | 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)WITHOUT.ROWID;.CREATE.TAB |
182cc0 | 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | LE.t3(a,b.char(1));.INSERT.INTO. |
182ce0 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
182d00 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
182d20 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 | T.INTO.t2(x,y).SELECT.a,.randomb |
182d40 | 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | lob(12001-01-01)b.FROM.t3.WHERE. |
182d60 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
182d80 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 | SET.y=max(t2.y,excluded.y);.INSE |
182da0 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 | RT.INTO.t2(x,y).SELECT.a,b.FROM. |
182dc0 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
182de0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 | O.UPDATE.SET.y=excluded.y.WHERE. |
182e00 | 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 56 41 43 55 55 4d 0a 83 26 97 47 04 00 86 51 43 52 45 41 | y<excluded.y;VACUUM..&.G...QCREA |
182e20 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
182e40 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | Y,.y.INT.UNIQUE)WITHOUT.ROWID;.C |
182e60 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 | REATE.TABLE.t3(a,b.char(1));.INS |
182e80 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
182ea0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
182ec0 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
182ee0 | 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 | ,.randomblob(12001-01-01)b.FROM. |
182f00 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
182f20 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 | O.UPDATE.SET.y=max(t2.y,excluded |
182f40 | 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | .y);.INSERT.INTO.t2(x,y).SELECT. |
182f60 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
182f80 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 | LICT(x).DO.UPDATE.SET.y=excluded |
182fa0 | 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 52 45 49 4e 44 45 58 0a 83 1f | .y.WHERE.y<excluded.y;REINDEX... |
182fc0 | 97 46 04 00 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .F...CCREATE.TABLE.t2(x.INTEGER. |
182fe0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 | PRIMARY.KEY,.y.INT.UNIQUE)WITHOU |
183000 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 | T.ROWID;.CREATE.TABLE.t3(a,b.cha |
183020 | 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | r(1));.INSERT.INTO.t3.VALUES(1,2 |
183040 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
183060 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
183080 | 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d | ).SELECT.a,.randomblob(12001-01- |
1830a0 | 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | 01)b.FROM.t3.WHERE.true...ON.CON |
1830c0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
1830e0 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
183100 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
183120 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
183140 | 79 3d 65 78 63 6c 75 64 65 64 2e 79 00 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b | y=excluded.y.WHERE.y<excluded.y; |
183160 | 0a 83 2d 97 45 04 00 86 5f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ..-.E..._CREATE.TABLE.t2(x.INTEG |
183180 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 | ER.PRIMARY.KEY,.y.INT.UNIQUE)WIT |
1831a0 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 | HOUT.ROWID;.CREATE.TABLE.t3(a,b. |
1831c0 | 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | char(1));.INSERT.INTO.t3.VALUES( |
1831e0 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
183200 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
183220 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d | x,y).SELECT.a,.randomblob(12001- |
183240 | 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | 01-01)b.FROM.t3.WHERE.true...ON. |
183260 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
183280 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t2.y,excluded.y);.INSERT.INTO.t2 |
1832a0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 | (x,y).SELECT.a,.randomblob(1)b.F |
1832c0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
1832e0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
183300 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 22 97 44 04 00 86 49 43 52 45 41 54 45 | ERE.y<excluded.y;..".D...ICREATE |
183320 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
183340 | 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 | .y.INT.UNIQUE)WITHOUT.ROWID;.CRE |
183360 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 | ATE.TABLE.t3(a,b.char(1));.INSER |
183380 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
1833a0 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
1833c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 | ;.INSERT.INTO.t2(x,y).SELECT.a,. |
1833e0 | 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 | randomblob(12001-01-01)b.FROM.t3 |
183400 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
183420 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(t2.y,excluded.y |
183440 | 29 20 2d 31 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | ).-1;.INSERT.INTO.t2(x,y).SELECT |
183460 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
183480 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
1834a0 | 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 43 04 00 86 43 | d.y.WHERE.y<excluded.y;....C...C |
1834c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
1834e0 | 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 | Y.KEY,.y.INT.UNIQUE)WITHOUT.ROWI |
183500 | 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b | D;.CREATE.TABLE.t3(a,b.char(1)); |
183520 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
183540 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
183560 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
183580 | 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 | CT.a,.randomblob(12001-01-01)b.F |
1835a0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
1835c0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 40 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=@ax(t2.y,excl |
1835e0 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | uded.y);.INSERT.INTO.t2(x,y).SEL |
183600 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
183620 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c | CONFLICT(x).DO.UPDATE.SET.y=excl |
183640 | 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 42 04 | uded.y.WHERE.y<excluded.y;....B. |
183660 | 00 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ..CCREATE.TABLE.t2(x.INTEGER.PRI |
183680 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 | MARY.KEY,.y.INT.UNIQUE)WITHOUT.R |
1836a0 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 | OWID;.CREATE.TABLE.t3(a,b.char(1 |
1836c0 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | ));.INSERT.INTO.t3.VALUES(1,2),( |
1836e0 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
183700 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
183720 | 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 | ELECT.a,.randomblob(12001-01-01) |
183740 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
183760 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 78 3d 6d 61 78 28 74 32 2e 79 2c 65 | CT(x).DO.UPDATE.SET.x=max(t2.y,e |
183780 | 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | xcluded.y);.INSERT.INTO.t2(x,y). |
1837a0 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
1837c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
1837e0 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 15 | xcluded.y.WHERE.y<excluded.y;... |
183800 | 97 41 04 00 86 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .A.../CREATE.TABLE.t2(x.INTEGER. |
183820 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 | PRIMARY.KEY,.y.INT.UNIQUE)WITHOU |
183840 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 | T.ROWID;.CREATE.TABLE.t3(a,b.cha |
183860 | 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | r(1));.INSERT.INTO.t3.VALUES(1,2 |
183880 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
1838a0 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
1838c0 | 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 | ).SELECT.a,.randomblob(1)b.FROM. |
1838e0 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
183900 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 | O.UPDATE.SET.y=max(t2.y,excluded |
183920 | 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | .y);.INSERT.INTO.t2(x,y).SELECT. |
183940 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
183960 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 | LICT(x).DO.UPDATE.SET.y=excluded |
183980 | 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 25 59 83 15 97 40 04 00 86 2f 43 | .y.WHERE.y<excluded.y%Y...@.../C |
1839a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
1839c0 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | .KEY,.y.INT.UNIQUE)WITHOUT.ROWID |
1839e0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a | ;.CREATE.TABLE.t3(a,b.char(1));. |
183a00 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
183a20 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
183a40 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
183a60 | 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | T.a,.randomblob(1)b.FROM.t3.WHER |
183a80 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
183aa0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
183ac0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
183ae0 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
183b00 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 | .DO.UPDATE.SET.y=.strftime(1,1,1 |
183b20 | 2c 31 29 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 20 97 3f 04 00 86 45 43 52 45 41 54 45 20 54 | ,1)<excluded.y;....?...ECREATE.T |
183b40 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
183b60 | 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 | .INT.UNIQUE)WITHOUT.ROWID;.CREAT |
183b80 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 | E.TABLE.t3(a,b.char(1));.INSERT. |
183ba0 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
183bc0 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,1),(8,9),(6,11),(1,1);. |
183be0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 | INSERT.INTO.t2(x,y).SELECT.a,.ra |
183c00 | 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ndomblob(1)b.FROM.t3.WHERE.true. |
183c20 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
183c40 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
183c60 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 6f 75 6e 64 28 31 2c 31 29 62 | TO.t2(x,y).SELECT.a,.round(1,1)b |
183c80 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
183ca0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 | T(x).DO.UPDATE.SET.y=excluded.y. |
183cc0 | 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 19 97 3e 04 00 86 37 43 52 45 41 | WHERE.y<excluded.y;....>...7CREA |
183ce0 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
183d00 | 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 | Y,.y.INT.UNIQUE)WITHOUT.ROWID;.C |
183d20 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 | REATE.TABLE.t3(a,b.char(1));.INS |
183d40 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
183d60 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
183d80 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
183da0 | 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | ,.randomblob(1)b.FROM.t3.WHERE.t |
183dc0 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
183de0 | 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 | ET.y=max(t2.y,excluded.y);.INSER |
183e00 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 52 | T.INTO.t2(x,y).SELECT.1=1.a,b.FR |
183e20 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
183e40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 | ).DO.UPDATE.SET.y=excluded.y.WHE |
183e60 | 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0b 97 3d 04 00 86 1b 43 52 45 41 54 45 20 | RE.y<excluded.y;....=....CREATE. |
183e80 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
183ea0 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | y.INT.UNIQUE)WITHOUT.ROWID;.CREA |
183ec0 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 | TE.TABLE.t3(a,b.char(1));.INSERT |
183ee0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
183f00 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
183f20 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 | .INSERT.INTO.t2(x,y).SELECT.1=1. |
183f40 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
183f60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
183f80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
183fa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
183fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
183fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
184000 | 0d 0a eb 00 13 01 0e 00 1e 5d 1c ba 1b 17 19 7e 17 e5 16 48 14 af 13 0f 11 76 0f dd 0e 47 0c 9c | .........].....~...H.....v...G.. |
184020 | 0a f1 09 44 07 8e 05 e1 04 3c 02 b1 01 0e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ...D.....<...................... |
184040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
184060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
184080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1840a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1840c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1840e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
184100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 1f 97 62 04 00 86 43 43 52 45 41 54 45 20 54 41 42 | .................b...CCREATE.TAB |
184120 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
184140 | 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)WITHOUT.ROWID;.CREATE. |
184160 | 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e | TABLE.t3(a,b.char(1));.INSERT.IN |
184180 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
1841a0 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 38 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(8,1);.IN |
1841c0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 | SERT.INTO.t2(x,y).SELECT.a,.rand |
1841e0 | 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | omblob(12001-01-01)b.FROM.t3.WHE |
184200 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
184220 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 | TE.SET.y=max(t2.y,excluded.y);.I |
184240 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
184260 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
184280 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 | ).DO.UPDATE.SET.y=excluded.y.WHE |
1842a0 | 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 07 97 61 04 00 86 13 43 52 45 41 54 45 20 | RE.y<excluded.y;....a....CREATE. |
1842c0 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
1842e0 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | y.INT.UNIQUE)WITHOUT.ROWID;.CREA |
184300 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 | TE.TABLE.t3(a,b.char(1));.INSERT |
184320 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
184340 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
184360 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 2d 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT-a,b. |
184380 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
1843a0 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
1843c0 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
1843e0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
184400 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
184420 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 21 97 60 | luded.y.WHERE.y<excluded.y;..!.` |
184440 | 04 00 86 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...GCREATE.TABLE.t2(x.INTEGER.PR |
184460 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 | IMARY.KEY,.y.INT.UNIQUE)WITHOUT. |
184480 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 | ROWID;.CREATE.TABLE.t3(a,b.char( |
1844a0 | 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | 1));.INSERT.INTO.t3.VALUES(1,2), |
1844c0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
1844e0 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
184500 | 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 | SELECT.zeroblob(1).a,.randomblob |
184520 | 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | (1)b.FROM.t3.WHERE.true...ON.CON |
184540 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
184560 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
184580 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
1845a0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
1845c0 | 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b | y=excluded.y.WHERE.y<excluded.y; |
1845e0 | 0a 83 29 97 5f 04 00 86 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ..)._...WCREATE.TABLE.t2(x.INTEG |
184600 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 | ER.PRIMARY.KEY,.y.INT.UNIQUE)WIT |
184620 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 | HOUT.ROWID;.CREATE.TABLE.t3(a,b. |
184640 | 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | char(1));.INSERT.INTO.t3.VALUES( |
184660 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
184680 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
1846a0 | 78 2c 79 29 20 53 45 4c 45 43 54 20 74 72 69 6d 28 31 2c 31 29 20 61 2c 20 72 61 6e 64 6f 6d 62 | x,y).SELECT.trim(1,1).a,.randomb |
1846c0 | 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | lob(12001-01-01)b.FROM.t3.WHERE. |
1846e0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
184700 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 | SET.y=max(t2.y,excluded.y);.INSE |
184720 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 | RT.INTO.t2(x,y).SELECT.a,b.FROM. |
184740 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
184760 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 | O.UPDATE.SET.y=excluded.y.WHERE. |
184780 | 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 32 97 5e 04 00 86 69 43 52 45 41 54 45 20 54 41 42 | y<excluded.y;..2.^...iCREATE.TAB |
1847a0 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
1847c0 | 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)WITHOUT.ROWID;.CREATE. |
1847e0 | 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e | TABLE.t3(a,b.char(1));.INSERT.IN |
184800 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
184820 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
184840 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 71 6c 69 74 65 5f | SERT.INTO.t2(x,y).SELECT.sqlite_ |
184860 | 73 6f 75 72 63 65 5f 69 64 28 29 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d | source_id().a,.randomblob(12001- |
184880 | 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | 01-01)b.FROM.t3.WHERE.true...ON. |
1848a0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
1848c0 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t2.y,excluded.y);.INSERT.INTO.t2 |
1848e0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
184900 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
184920 | 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 | ET.y=excluded.y.WHERE.y<excluded |
184940 | 2e 79 3b 0a 83 23 97 5d 04 00 86 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;..#.]...KCREATE.TABLE.t2(x.IN |
184960 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 | TEGER.PRIMARY.KEY,.y.INT.UNIQUE) |
184980 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | WITHOUT.ROWID;.CREATE.TABLE.t3(a |
1849a0 | 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | ,b.char(1));.INSERT.INTO.t3.VALU |
1849c0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
1849e0 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
184a00 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 61 2c 20 | t2(x,y).SELECT.randomblob(1).a,. |
184a20 | 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | randomblob(1)b.FROM.t3.WHERE.tru |
184a40 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
184a60 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 | .y=max(t2.y,excluded.y);.INSERT. |
184a80 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
184aa0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
184ac0 | 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 | PDATE.SET.y=excluded.y.WHERE.y<e |
184ae0 | 78 63 6c 75 64 65 64 2e 79 3b 0a 00 00 00 06 04 00 83 27 97 5c 04 00 86 53 43 52 45 41 54 45 20 | xcluded.y;........'.\...SCREATE. |
184b00 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
184b20 | 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 | y.INT.UNIQUE)WITHOUT.ROWID;.CREA |
184b40 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 | TE.TABLE.t3(a,b.char(1));.INSERT |
184b60 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
184b80 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
184ba0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e | .INSERT.INTO.t2(x,y).SELECT.json |
184bc0 | 28 31 29 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 | (1).a,.randomblob(12001-01-01)b. |
184be0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
184c00 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
184c20 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
184c40 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
184c60 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
184c80 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 27 97 5b | luded.y.WHERE.y<excluded.y;..'.[ |
184ca0 | 04 00 86 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...SCREATE.TABLE.t2(x.INTEGER.PR |
184cc0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 | IMARY.KEY,.y.INT.UNIQUE)WITHOUT. |
184ce0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 | ROWID;.CREATE.TABLE.t3(a,b.char( |
184d00 | 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | 1));.INSERT.INTO.t3.VALUES(1,2), |
184d20 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
184d40 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
184d60 | 53 45 4c 45 43 54 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 20 61 2c 62 20 46 52 4f | SELECT.json_array(1,1,1).a,b.FRO |
184d80 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
184da0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
184dc0 | 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | ed.y);.INSERT.INTO.t2(x,y).SELEC |
184de0 | 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | T.a,.randomblob(1)b.FROM.t3.WHER |
184e00 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
184e20 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | E.SET.y=excluded.y.WHERE.y<exclu |
184e40 | 64 65 64 2e 79 3b 0a 83 12 97 5a 04 00 86 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y;....Z...)CREATE.TABLE.t2(x |
184e60 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
184e80 | 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)WITHOUT.ROWID;.CREATE.TABLE.t |
184ea0 | 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | 3(a,b.char(1));.INSERT.INTO.t3.V |
184ec0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
184ee0 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
184f00 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
184f20 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
184f40 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
184f60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 6f | INSERT.INTO.t2(x,y).SELECT.a,.ro |
184f80 | 75 6e 64 28 31 2c 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | und(1,1)b.FROM.t3.WHERE.true...O |
184fa0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
184fc0 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 15 97 | cluded.y.WHERE.y<excluded.y;.... |
184fe0 | 59 04 00 86 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | Y.../CREATE.TABLE.t2(x.INTEGER.P |
185000 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 | RIMARY.KEY,.y.INT.UNIQUE)WITHOUT |
185020 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 | .ROWID;.CREATE.TABLE.t3(a,b.char |
185040 | 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | (1));.INSERT.INTO.t3.VALUES(1,2) |
185060 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
185080 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
1850a0 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
1850c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
1850e0 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,excluded.y);.INSERT.INT |
185100 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 33 | O.t2(x,y).SELECT.a,.randomblob(3 |
185120 | 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | )b.FROM.t3.WHERE.true...ON.CONFL |
185140 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e | ICT(x).DO.UPDATE.SET.y=excluded. |
185160 | 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 15 97 58 04 00 86 2f 43 52 | y.WHERE.y<excluded.y;....X.../CR |
185180 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
1851a0 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | KEY,.y.INT.UNIQUE)WITHOUT.ROWID; |
1851c0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 | .CREATE.TABLE.t3(a,b.char(1));.I |
1851e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
185200 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
185220 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
185240 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
185260 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
185280 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
1852a0 | 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d | y).SELECT.a,.randomblob(1)b.FROM |
1852c0 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
1852e0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=excluded.y.WHERE |
185300 | 20 79 7c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1c 97 57 04 00 86 3d 43 52 45 41 54 45 20 54 41 | .y|excluded.y;....W...=CREATE.TA |
185320 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
185340 | 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)WITHOUT.ROWID;.CREATE |
185360 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 | .TABLE.t3(a,b.char(1));.INSERT.I |
185380 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
1853a0 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
1853c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
1853e0 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
185400 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
185420 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
185440 | 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | CT.a,.randomblob(1)b.FROM.t3.WHE |
185460 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
185480 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.y.WHERE.y<excl |
1854a0 | 75 64 65 64 2e 79 3b 41 4e 41 4c 59 5a 45 0a 83 15 97 56 04 00 86 2f 43 52 45 41 54 45 20 54 41 | uded.y;ANALYZE....V.../CREATE.TA |
1854c0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
1854e0 | 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)WITHOUT.ROWID;.CREATE |
185500 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 | .TABLE.t3(a,b.char(1));.INSERT.I |
185520 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
185540 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
185560 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
185580 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
1855a0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
1855c0 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
1855e0 | 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | CT.a,.randomblob(1)b.FROM.t3.WHE |
185600 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
185620 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 78 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.x.WHERE.y<excl |
185640 | 75 64 65 64 2e 79 3b 0a 83 19 97 55 04 00 86 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | uded.y;....U...7CREATE.TABLE.t2( |
185660 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
185680 | 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)WITHOUT.ROWID;.CREATE.TABLE. |
1856a0 | 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | t3(a,b.char(1));.INSERT.INTO.t3. |
1856c0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
1856e0 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
185700 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
185720 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
185740 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=max(t2.y,excluded.y); |
185760 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 | .INSERT.INTO.t2(x,y).SELECT.a,.r |
185780 | 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 20 7c 7c 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | andomblob(1).||.b.FROM.t3.WHERE. |
1857a0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
1857c0 | 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 | SET.y=excluded.y.WHERE.y<exclude |
1857e0 | 64 2e 79 3b 0a 83 15 97 54 04 00 86 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;....T.../CREATE.TABLE.t2(x.I |
185800 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NTEGER.PRIMARY.KEY,.y.INT.UNIQUE |
185820 | 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )WITHOUT.ROWID;.CREATE.TABLE.t3( |
185840 | 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | a,b.char(1));.INSERT.INTO.t3.VAL |
185860 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
185880 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
1858a0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
1858c0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
1858e0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 20 6c 69 6b 65 6c 79 28 31 29 29 3b 0a 49 4e | E.SET.y=max(t2.y,.likely(1));.IN |
185900 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 | SERT.INTO.t2(x,y).SELECT.a,.rand |
185920 | 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | omblob(1)b.FROM.t3.WHERE.true... |
185940 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
185960 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 15 | xcluded.y.WHERE.y<excluded.y;... |
185980 | 97 53 04 00 86 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .S.../CREATE.TABLE.t2(x.INTEGER. |
1859a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 | PRIMARY.KEY,.y.INT.UNIQUE)WITHOU |
1859c0 | 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 | T.ROWID;.CREATE.TABLE.t3(a,b.cha |
1859e0 | 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | r(1));.INSERT.INTO.t3.VALUES(1,2 |
185a00 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
185a20 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
185a40 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
185a60 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 78 | ..ON.CONFLICT(x).DO.UPDATE.SET.x |
185a80 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
185aa0 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 | TO.t2(x,y).SELECT.a,.randomblob( |
185ac0 | 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | 1)b.FROM.t3.WHERE.true...ON.CONF |
185ae0 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 | LICT(x).DO.UPDATE.SET.y=excluded |
185b00 | 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 52 04 00 86 43 43 | .y.WHERE.y<excluded.y;....R...CC |
185b20 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
185b40 | 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 | .KEY,.y.INT.UNIQUE)WITHOUT.ROWID |
185b60 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a | ;.CREATE.TABLE.t3(a,b.char(1));. |
185b80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
185ba0 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
185bc0 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
185be0 | 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 39 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 | T.a,.randomblob(92001-01-01)b.FR |
185c00 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
185c20 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
185c40 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
185c60 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
185c80 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 | ONFLICT(x).DO.UPDATE.SET.y=exclu |
185ca0 | 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 51 04 00 | ded.y.WHERE.y<excluded.y;....Q.. |
185cc0 | 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .CCREATE.TABLE.t2(x.INTEGER.PRIM |
185ce0 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f | ARY.KEY,.y.INT.UNIQUE)WITHOUT.RO |
185d00 | 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 | WID;.CREATE.TABLE.t3(a,b.char(1) |
185d20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
185d40 | 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(6,7),(3,1),(8,9),(6,1 |
185d60 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
185d80 | 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 38 32 30 30 31 2d 30 31 2d 30 31 29 62 | LECT.a,.randomblob(82001-01-01)b |
185da0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
185dc0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
185de0 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
185e00 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
185e20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
185e40 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 | cluded.y.WHERE.y<excluded.y;.... |
185e60 | 50 04 00 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | P...CCREATE.TABLE.t2(x.INTEGER.P |
185e80 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 | RIMARY.KEY,.y.INT.UNIQUE)WITHOUT |
185ea0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 | .ROWID;.CREATE.TABLE.t3(a,b.char |
185ec0 | 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | (1));.INSERT.INTO.t3.VALUES(1,2) |
185ee0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
185f00 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
185f20 | 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 36 32 30 30 31 2d 30 31 2d 30 | .SELECT.a,.randomblob(62001-01-0 |
185f40 | 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | 1)b.FROM.t3.WHERE.true...ON.CONF |
185f60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
185f80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
185fa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
185fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
185fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
186000 | 0d 00 00 00 18 00 41 00 1e 5d 1c ba 1b 9d 1a 76 19 4f 18 28 16 ed 15 c6 14 97 13 6e 12 47 11 32 | ......A..].....v.O.(.......n.G.2 |
186020 | 10 11 0e e7 0d c8 0c a1 0b 12 09 75 07 ea 06 67 04 e4 03 5d 01 d0 00 41 00 00 00 00 00 00 00 00 | ...........u...g...]...A........ |
186040 | 00 83 0b 97 7a 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ....z....CREATE.TABLE.t2(x.INTEG |
186060 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 | ER.PRIMARY.KEY,.y.varchar(1))/*W |
186080 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
1860a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 20 73 71 6c 69 74 | ;.INSERT.INTO.t3.VALUES(1,.sqlit |
1860c0 | 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 | e_source_id()),(3,1),(8,.randomb |
1860e0 | 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | lob(1));.INSERT.INTO.t2(x,y).SEL |
186100 | 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | ECT.a,.zeroblob(1)b.FROM.t3.WHER |
186120 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
186140 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
186160 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
186180 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
1861a0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 | .DO.UPDATE.SET.y=excluded.y.WHER |
1861c0 | 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 09 97 79 04 00 86 17 43 52 45 41 54 45 20 54 | E.y<.zeroblob(1)...y....CREATE.T |
1861e0 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
186200 | 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .varchar(1))/*WIT.ROWID*/;.CREAT |
186220 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
186240 | 56 41 4c 55 45 53 28 20 61 76 67 28 31 29 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(.avg(1),4),(1,5),(6,7),(3 |
186260 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
186280 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 | NTO.t2(x,y).SELECT.group_concat( |
1862a0 | 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | 1,1).a,b.FROM.t3.WHERE.true...ON |
1862c0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 | .CONFLICT(x).DO.UPDATE.SET.y=max |
1862e0 | 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | (t2.y,excluded.y);.INSERT.INTO.t |
186300 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 | 2(x,y).SELECT.group_concat(1,1). |
186320 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
186340 | 53 45 54 20 79 3d 65 78 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 64 2e 79 3b 0a 83 03 97 | SET.y=exed.y.WHERE.y<excd.y;.... |
186360 | 78 04 00 86 0b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | x....CREATE.TABLE.t2(x.INTEGER.P |
186380 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.varchar(1))/*WIT.R |
1863a0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
1863c0 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 20 31 3d 31 31 2c 32 29 2c 28 33 2c | SERT.INTO.t3.VALUES(.1=11,2),(3, |
1863e0 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
186400 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
186420 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
186440 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
186460 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t2.y,excluded.y);.INSERT.INTO.t2 |
186480 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
1864a0 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
1864c0 | 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 | ET.y=excluded.y.WHERE.y<excluded |
1864e0 | 2e 79 3b 0a 82 7f 97 77 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;....w....CREATE.TABLE.t2(x.IN |
186500 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 | TEGER.PRIMARY.KEY,.y.varchar(1)) |
186520 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
186540 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t2.VALUES(1,2), |
186560 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
186580 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
1865a0 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
1865c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
1865e0 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ax(t2.y,excluded.y);.INSERT.INTO |
186600 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
186620 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
186640 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | E.SET.y=excluded.y.WHERE.y<exclu |
186660 | 64 65 64 2e 79 3b 0a 82 7f 97 76 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y;....v....CREATE.TABLE.t2(x |
186680 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 | .INTEGER.PRIMARY.KEY,.y.varchar( |
1866a0 | 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | 1))/*WIT.ROWID*/;.CREATE.TABLE.t |
1866c0 | 33 28 61 20 63 68 61 72 28 31 29 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a.char(1)ERT.INTO.t3.VALUES(1, |
1866e0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
186700 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
186720 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
186740 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
186760 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.y);.INSERT.I |
186780 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
1867a0 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
1867c0 | 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 | DATE.SET.y=excluded.y.WHERE.y<ex |
1867e0 | 63 6c 75 64 65 64 2e 79 3b 0a 83 07 97 75 04 00 86 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | cluded.y;....u....CREATE.TABLE.t |
186800 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 | 2(x.INTEGER.PRIMARY.KEY,.y.varch |
186820 | 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ar(1))/*WIT.ROWID*/;.CREATE.TABL |
186840 | 45 20 74 33 28 61 20 63 68 61 72 28 31 29 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | E.t3(a.char(1),b);.INSERT.INTO.t |
186860 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
186880 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
1868a0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 | .INTO.t2(x,y).SELECT.a,b.FROM.t3 |
1868c0 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
1868e0 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(t2.y,excluded.y |
186900 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(x,y).SELECT.a, |
186920 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
186940 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 | CT(x).DO.UPDATE.SET.y=excluded.y |
186960 | 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 19 97 74 04 00 86 37 43 52 45 | .WHERE.y<excluded.y;....t...7CRE |
186980 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
1869a0 | 45 59 2c 20 79 20 62 6c 6f 62 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.blobUNIQUE)/*WIT.ROWID*/;. |
1869c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 20 57 49 54 48 20 63 28 78 29 20 | CREATE.TABLE.t3(a,b);.WITH.c(x). |
1869e0 | 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | AS.(values(1))..INSERT.INTO.t3.V |
186a00 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
186a20 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
186a40 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
186a60 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
186a80 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
186aa0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
186ac0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
186ae0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
186b00 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 0b 97 73 04 00 86 1b 43 52 45 41 54 45 | ERE.y<excluded.y;....s....CREATE |
186b20 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
186b40 | 20 79 20 61 2c 62 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | .y.a,b.INT.UNIQUE)/*WIT.ROWID*/; |
186b60 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 | .CREATE.TABLE.t3(a,b.char(1));.I |
186b80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
186ba0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
186bc0 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
186be0 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
186c00 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
186c20 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | y,excluded.y);.INSERT.INTO.t2(x, |
186c40 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
186c60 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
186c80 | 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b | y=excluded.y.WHERE.y<excluded.y; |
186ca0 | 0a 82 23 97 72 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | ..#.r...KCREATE.TABLE.t2(x.INTEG |
186cc0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
186ce0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
186d00 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(9,2),(3, |
186d20 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
186d40 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
186d60 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ECT.a,b.FROM.t3.WHERE.true...ON. |
186d80 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
186da0 | 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 | ..."a","b""a","b""a",excluded.y) |
186dc0 | 3b 0a 49 4e 53 79 3b 0a 82 1b 97 71 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | ;.INSy;....q...;CREATE.TABLE.t2( |
186de0 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
186e00 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
186e20 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
186e40 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
186e60 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 | ),(6,11),(1,1);.INSERT.INTO.t2(y |
186e80 | 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 26 61 2c 62 20 46 52 4f 4d 20 | ,y).SELECT.zeroblob(1)&a,b.FROM. |
186ea0 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
186ec0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b | O.UPDATE.SET.y=max(t2.y,uded.y); |
186ee0 | 0a 49 4e 53 79 3b 0a 82 26 97 70 04 00 84 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | .INSy;..&.p...QCREATE.TABLE.t2(x |
186f00 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
186f20 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
186f40 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
186f60 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
186f80 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c | ,(6,11),(1,1);.INSERT.INTO.t2(y, |
186fa0 | 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 26 20 72 6f 75 6e 64 28 31 2c 31 | y).SELECT.zeroblob(1)&.round(1,1 |
186fc0 | 29 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | )a,b.FROM.t3.WHERE.true...ON.CON |
186fe0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
187000 | 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 1d 97 6f 04 00 84 3f 43 52 45 41 54 45 20 | y,uded.y);.INSy;....o...?CREATE. |
187020 | 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TABLE.t2(x.INTEGER.PRIMARY.KEY,. |
187040 | 79 20 49 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 | y.INT.UNIQUE)/*WIT.ROWID*/;.CREA |
187060 | 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 | TE.TABLE.t3(a,b);.INSERT.INTO.t3 |
187080 | 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 | .VALUES(1,2),(3,4),(1,5),(6,7),( |
1870a0 | 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 | 3,1),(8,9),(6,11),(1,1);.INSERT. |
1870c0 | 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 | INTO.t2(y,y).SELECT.randomblob(1 |
1870e0 | 29 47 4c 4f 42 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | )GLOB.a,b.FROM.t3.WHERE.true...O |
187100 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
187120 | 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 0a 82 11 97 6e 04 00 84 27 43 52 45 41 54 45 | x(t2.y,uded.y);.I....n...'CREATE |
187140 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
187160 | 20 79 20 49 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.INT.UNIQUE)/*WIT.ROWID*/;.CRE |
187180 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
1871a0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
1871c0 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
1871e0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 | .INTO.t2(x,y).SELECT.a,b.FROM.t3 |
187200 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
187220 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 22 20 22 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(.".",excluded.y |
187240 | 29 25 59 3b 0a 49 0a 82 23 97 6d 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | )%Y;.I..#.m...KCREATE.TABLE.t2(x |
187260 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 51 | .INTEGER.PRIMARY.KEY,.y.INT.UNIQ |
187280 | 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UE)/*WIT.ROWID*/;.CREATE.TABLE.t |
1872a0 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
1872c0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
1872e0 | 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,11),(1,1);.INSERT.INTO.t2(x, |
187300 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
187320 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
187340 | 79 3d 6d 61 78 28 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 4e 4f 54 22 61 22 2c 65 78 63 6c 75 | y=max(..."a","b""a",NOT"a",exclu |
187360 | 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 25 97 6c 04 00 84 4f 43 52 45 41 54 45 20 54 41 42 | ded.y);.INSy;..%.l...OCREATE.TAB |
187380 | 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.INTEGER.PRIMARY.KEY,.y.I |
1873a0 | 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
1873c0 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
1873e0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
187400 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
187420 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
187440 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
187460 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 22 61 | TE.SET.y=max(..."a","b""a","b""a |
187480 | 22 25 59 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 2b 97 6b 04 00 84 5b 43 | "%Y,excluded.y);.INSy;..+.k...[C |
1874a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
1874c0 | 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.INT.UNIQUE)/*WIT.ROWID*/ |
1874e0 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
187500 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
187520 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
187540 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
187560 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
187580 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 20 20 22 61 22 2c 22 62 | ).DO.UPDATE.SET.y=max(...."a","b |
1875a0 | 22 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ""a","b""a","b""a",excluded.y);. |
1875c0 | 49 4e 53 79 3b 0a 82 23 97 6a 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | INSy;..#.j...KCREATE.TABLE.t2(x. |
1875e0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
187600 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
187620 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
187640 | 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3,4),(1,5),(6,7),(3,1),(8,9), |
187660 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
187680 | 29 20 53 45 4c 45 43 54 20 61 2c 3f 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,?.FROM.t3.WHERE.true. |
1876a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
1876c0 | 3d 6d 61 78 28 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 | =max(..."a","b""a","b""a",exclud |
1876e0 | 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 37 97 69 04 00 84 73 43 52 45 41 54 45 20 54 41 42 4c | ed.y);.INSy;..7.i...sCREATE.TABL |
187700 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x.INTEGER.PRIMARY.KEY,.y.IN |
187720 | 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
187740 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
187760 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
187780 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
1877a0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 20 75 6e 69 63 6f 64 65 28 31 29 20 7c 7c 20 6c | .t2(x,y).SELECT..unicode(1).||.l |
1877c0 | 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | ast_insert_rowid()..a,b.FROM.t3. |
1877e0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
187800 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 | PDATE.SET.y=max(t2.y,excluded.y) |
187820 | 3b 0a 49 4e 53 79 3b 0a 82 23 97 68 04 00 84 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | ;.INSy;..#.h...KCREATE.TABLE.t2( |
187840 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 | x.INTEGER.PRIMARY.KEY,.y.INT.UNI |
187860 | 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)/*WIT.ROWID*/;.CREATE.TABLE. |
187880 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
1878a0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
1878c0 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
1878e0 | 2c 78 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,x).SELECT.a,b.FROM.t3.WHERE.tru |
187900 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
187920 | 20 79 3d 6d 61 78 28 20 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c | .y=max(..."a","b""a","b""a",excl |
187940 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 23 97 67 04 00 84 4b 43 52 45 41 54 45 20 54 41 | uded.y);.INSy;..#.g...KCREATE.TA |
187960 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
187980 | 49 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
1879a0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 | .TABLE.t3(a,b.char(1));.INSERT.I |
1879c0 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(9,2),(3,4),(1,5),( |
1879e0 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 6,7),(3,1),(8,9),(6,11),(1,1);.I |
187a00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 | NSERT.INTO.t2(x,y).SELECT.a,b.FR |
187a20 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
187a40 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 22 61 22 2c 22 62 22 22 | ).DO.UPDATE.SET.y=max(.."a","b"" |
187a60 | 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 23 97 66 04 00 84 4b 43 52 | a",excluded.y);.INSy;..#.f...KCR |
187a80 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
187aa0 | 4b 45 59 2c 20 79 20 49 4e 54 a0 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
187ac0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 | .CREATE.TABLE.t3(a,b.char(1));.I |
187ae0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
187b00 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
187b20 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
187b40 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
187b60 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 20 20 22 | FLICT(x).DO.UPDATE.SET.y=max(.." |
187b80 | 61 22 2c 22 62 22 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 19 97 | a","b""a",excluded.y);.INSy;.... |
187ba0 | 65 04 00 84 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | e...7CREATE.TABLE.t2(x.INTEGER.P |
187bc0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 | RIMARY.KEY,.y.INT.UNIQUE)WITHOUT |
187be0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | .ROWID;.CREATE.TABLE.t3(a,b);.IN |
187c00 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
187c20 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 32 30 30 31 2d 30 | 1,5),(6,7),(3,.randomblob(2001-0 |
187c40 | 31 2d 30 31 31 29 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | 1-011)),(1,1);.INSERT.INTO.t2(x, |
187c60 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE.true |
187c80 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
187ca0 | 79 3d 6d 61 78 28 20 22 61 22 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 0a 83 1f 97 64 04 00 | y=max(."a",excluded.y);.I....d.. |
187cc0 | 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | .CCREATE.TABLE.t2(x.INTEGER.PRIM |
187ce0 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f | ARY.KEY,.y.INT.UNIQUE)WITHOUT.RO |
187d00 | 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 | WID;.CREATE.TABLE.t3(a,b.char(1) |
187d20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
187d40 | 2c 34 29 2c 28 31 2c 35 29 2c 28 3f 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,4),(1,5),(?,7),(3,1),(8,9),(6,1 |
187d60 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
187d80 | 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 | LECT.a,.randomblob(12001-01-01)b |
187da0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
187dc0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
187de0 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
187e00 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
187e20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
187e40 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 1f 97 | cluded.y.WHERE.y<excluded.y;.... |
187e60 | 63 04 00 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | c...CCREATE.TABLE.t2(x.INTEGER.P |
187e80 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 | RIMARY.KEY,.y.INT.UNIQUE)WITHOUT |
187ea0 | 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 | .ROWID;.CREATE.TABLE.t3(a,b.char |
187ec0 | 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | (1));.INSERT.INTO.t3.VALUES(1,2) |
187ee0 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
187f00 | 36 2c 31 31 29 2c 28 3f 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(?,1);.INSERT.INTO.t2(x,y) |
187f20 | 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 32 30 30 31 2d 30 31 2d 30 | .SELECT.a,.randomblob(12001-01-0 |
187f40 | 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | 1)b.FROM.t3.WHERE.true...ON.CONF |
187f60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
187f80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
187fa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
187fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
187fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
188000 | 0d 00 00 00 14 00 72 00 1e 52 1c bd 1b 16 19 6d 17 d8 16 49 14 b7 13 28 11 8f 0f f6 0e 67 0c d8 | ......r..R.....m...I...(.....g.. |
188020 | 0b 49 09 ba 08 2b 06 9c 05 19 03 8a 02 07 00 72 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .I...+.........r................ |
188040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
188060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 83 11 98 0e 04 00 86 27 43 52 45 41 54 45 | .........................'CREATE |
188080 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
1880a0 | 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.varchar(1))/*WIT.ROWID*/;.CRE |
1880c0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
1880e0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3,4),(1,5),(6,7), |
188100 | 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,.randomblob(1));.INSERT |
188120 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 | .INTO.t2(x,y).SELECT.group_conca |
188140 | 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | t(1,1).a,b.FROM.t3.WHERE.true... |
188160 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
188180 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ax(t2.y,excluded.y);.INSERT.INTO |
1881a0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
1881c0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
1881e0 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | E.SET.y=excluded.y.WHERE.y<exclu |
188200 | 64 65 64 2e 79 3b 0a 82 7f 98 0d 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y;.........CREATE.TABLE.t2(x |
188220 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 | .INTEGER.PRIMARY.KEY,.y.varchar( |
188240 | 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | 1))/*WIT.ROWID*/;.CREATE.TABLE.t |
188260 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
188280 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 | 2),(3,4),(1,5),(6,7),(3,1),(8,.r |
1882a0 | 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | andomblob(1));.INSERT.INTO.t2(x, |
1882c0 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 40 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE@true |
1882e0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
188300 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.y);.INSERT.I |
188320 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
188340 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
188360 | 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a | DATE.SET.y=excluded.y.WHERE.y<.z |
188380 | 65 72 6f 62 6c 6f 62 28 31 29 83 0b 98 0c 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | eroblob(1)........CREATE.TABLE.t |
1883a0 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 | 2(x.INTEGER.PRIMARY.KEY,.y.varch |
1883c0 | 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ar(1))/*WIT.ROWID*/;.CREATE.TABL |
1883e0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
188400 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
188420 | 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,.randomblob(1));.INSERT.INTO.t2 |
188440 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
188460 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
188480 | 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 | ET.y=max(t2.y,excluded.y);.INSER |
1884a0 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f | T.INTO.t2(x,y).SELECT.a,.zeroblo |
1884c0 | 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | b(1)b.FROM.t3.WHERE.true...ON.CO |
1884e0 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
188500 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 82 7f 98 0b 04 00 86 | ed.y.WHERE.y<.zeroblob(1)....... |
188520 | 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
188540 | 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.varchar(1))/*WIT.ROWID |
188560 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
188580 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
1885a0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b | ,(6,7),(3,1),(8,.randomblob(1)); |
1885c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
1885e0 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
188600 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 78 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.x=max(t2.y,exc |
188620 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
188640 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
188660 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
188680 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 0b 98 0a | luded.y.WHERE.y<.zeroblob(1).... |
1886a0 | 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t2(x.INTEGER.PR |
1886c0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.varchar(1))/*WIT.RO |
1886e0 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
188700 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
188720 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 | ,5),(6,7),(3,1),(8,.randomblob(1 |
188740 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | ));.INSERT.INTO.t2(x,y).SELECT.a |
188760 | 2c 20 7a 65 72 6f 62 6c 6f 62 28 42 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | ,.zeroblob(B)b.FROM.t3.WHERE.tru |
188780 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
1887a0 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 | .y=max(t2.y,excluded.y);.INSERT. |
1887c0 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
1887e0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
188800 | 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 | PDATE.SET.y=excluded.y.WHERE.y<. |
188820 | 7a 65 72 6f 62 6c 6f 62 28 31 29 83 0b 98 09 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | zeroblob(1)........CREATE.TABLE. |
188840 | 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 | t2(x.INTEGER.PRIMARY.KEY,.y.varc |
188860 | 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | har(1))/*WIT.ROWID*/;.CREATE.TAB |
188880 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
1888a0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
1888c0 | 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,.randomblob(1));.INSERT.INTO.t |
1888e0 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 41 29 62 20 46 52 | 2(x,y).SELECT.a,.zeroblob(A)b.FR |
188900 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
188920 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
188940 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
188960 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
188980 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 | ONFLICT(x).DO.UPDATE.SET.y=exclu |
1889a0 | 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 0b 98 08 04 00 | ded.y.WHERE.y<.zeroblob(1)...... |
1889c0 | 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t2(x.INTEGER.PRIM |
1889e0 | 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.varchar(1))/*WIT.ROWI |
188a00 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
188a20 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
188a40 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 | ),(6,7),(3,1),(8,.randomblob(1)) |
188a60 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 | ;.INSERT.INTO.t2(x,y).SELECT.a,. |
188a80 | 7a 65 72 6f 62 6c 6f 62 28 39 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | zeroblob(9)b.FROM.t3.WHERE.true. |
188aa0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
188ac0 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
188ae0 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
188b00 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
188b20 | 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 | ATE.SET.y=excluded.y.WHERE.y<.ze |
188b40 | 72 6f 62 6c 6f 62 28 31 29 83 0b 98 07 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | roblob(1)........CREATE.TABLE.t2 |
188b60 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 | (x.INTEGER.PRIMARY.KEY,.y.varcha |
188b80 | 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | r(1))/*WIT.ROWID*/;.CREATE.TABLE |
188ba0 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
188bc0 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
188be0 | 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | .randomblob(1));.INSERT.INTO.t2( |
188c00 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 38 29 62 20 46 52 4f 4d | x,y).SELECT.a,.zeroblob(8)b.FROM |
188c20 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
188c40 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
188c60 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
188c80 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
188ca0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
188cc0 | 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 0b 98 06 04 00 86 1b | d.y.WHERE.y<.zeroblob(1)........ |
188ce0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
188d00 | 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.varchar(1))/*WIT.ROWID* |
188d20 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
188d40 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
188d60 | 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a | (6,7),(3,1),(8,.randomblob(1));. |
188d80 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 | INSERT.INTO.t2(x,y).SELECT.a,.ze |
188da0 | 72 6f 62 6c 6f 62 28 36 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | roblob(6)b.FROM.t3.WHERE.true... |
188dc0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
188de0 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ax(t2.y,excluded.y);.INSERT.INTO |
188e00 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
188e20 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
188e40 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f | E.SET.y=excluded.y.WHERE.y<.zero |
188e60 | 62 6c 6f 62 28 31 29 83 0b 98 05 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | blob(1)........CREATE.TABLE.t2(x |
188e80 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 | .INTEGER.PRIMARY.KEY,.y.varchar( |
188ea0 | 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | 1))/*WIT.ROWID*/;.CREATE.TABLE.t |
188ec0 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
188ee0 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 | 2),(3,4),(1,5),(6,7),(3,1),(8,.r |
188f00 | 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | andomblob(1));.INSERT.INTO.t2(x, |
188f20 | 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 34 29 62 20 46 52 4f 4d 20 74 | y).SELECT.a,.zeroblob(4)b.FROM.t |
188f40 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
188f60 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e | .UPDATE.SET.y=max(t2.y,excluded. |
188f80 | 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | y);.INSERT.INTO.t2(x,y).SELECT.a |
188fa0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
188fc0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e | ICT(x).DO.UPDATE.SET.y=excluded. |
188fe0 | 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 15 98 04 04 00 86 2f 43 52 | y.WHERE.y<.zeroblob(1)......./CR |
189000 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
189020 | 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.varchar(1))/*WIT.ROWID*/; |
189040 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
189060 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
189080 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e | ,7),(3,1),(8,.randomblob(1));.IN |
1890a0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f | SERT.INTO.t2(x,y).SELECT.a,.zero |
1890c0 | 62 6c 6f 62 28 32 30 30 31 2d 30 31 2d 30 31 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | blob(2001-01-011)b.FROM.t3.WHERE |
1890e0 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
189100 | 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 | .SET.y=max(t2.y,excluded.y);.INS |
189120 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | ERT.INTO.t2(x,y).SELECT.a,b.FROM |
189140 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
189160 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=excluded.y.WHERE |
189180 | 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 15 98 03 04 00 86 2f 43 52 45 41 54 45 20 54 41 | .y<.zeroblob(1)......./CREATE.TA |
1891a0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
1891c0 | 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | varchar(1))/*WIT.ROWID*/;.CREATE |
1891e0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
189200 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
189220 | 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,.randomblob(1));.INSERT.IN |
189240 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 32 | TO.t2(x,y).SELECT.a,.zeroblob(12 |
189260 | 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | 001-01-01)b.FROM.t3.WHERE.true.. |
189280 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
1892a0 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,excluded.y);.INSERT.INT |
1892c0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
1892e0 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
189300 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 | TE.SET.y=excluded.y.WHERE.y<.zer |
189320 | 6f 62 6c 6f 62 28 31 29 83 0b 98 02 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | oblob(1)........CREATE.TABLE.t2( |
189340 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 | x.INTEGER.PRIMARY.KEY,.y.varchar |
189360 | 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | (1))/*WIT.ROWID*/;.CREATE.TABLE. |
189380 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
1893a0 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 | ,2),(3,4),(1,5),(6,7),(3,1),(8,. |
1893c0 | 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | randomblob(1));.INSERT.INTO.t2(x |
1893e0 | 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 | ,y).SELECT.a,.zeroblob(1)b.FROM. |
189400 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
189420 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 | O.UPDATE.SET.y=max(t2.y,excluded |
189440 | 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 78 29 20 53 45 4c 45 43 54 20 | .y);.INSERT.INTO.t2(x,x).SELECT. |
189460 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
189480 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 | LICT(x).DO.UPDATE.SET.y=excluded |
1894a0 | 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 0e 98 01 04 00 86 21 43 | .y.WHERE.y<.zeroblob(1).......!C |
1894c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 | REATE.TABLE.t2(x.INTEGER.PRIMARY |
1894e0 | 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f | .KEY,.y.varchar(1))/*WIT.ROWID*/ |
189500 | 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 | ;.CREATE.TABLE.t3(a,b);.INSERT.I |
189520 | 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 | NTO.t3.VALUES(1,2),(3,4),(1,5),( |
189540 | 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 | 6,7),(3,1),(8,.randomblob(1));.I |
189560 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 | NSERT.INTO.t2(x,y).SELECT.a,.zer |
189580 | 6f 62 6c 6f 62 28 31 29 20 3e 3d 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | oblob(1).>=b.FROM.t3.WHERE.true. |
1895a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
1895c0 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
1895e0 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
189600 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
189620 | 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 | ATE.SET.y=excluded.y.WHERE.y<.ze |
189640 | 72 6f 62 6c 6f 62 28 31 29 83 0b 98 00 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | roblob(1)........CREATE.TABLE.t2 |
189660 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 | (x.INTEGER.PRIMARY.KEY,.y.varcha |
189680 | 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | r(1))/*WIT.ROWID*/;.CREATE.TABLE |
1896a0 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
1896c0 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
1896e0 | 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | .randomblob(1));.INSERT.INTO.t2( |
189700 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 30 29 62 20 46 52 4f 4d | x,y).SELECT.a,.zeroblob(0)b.FROM |
189720 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
189740 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 | DO.UPDATE.SET.y=max(t2.y,exclude |
189760 | 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | d.y);.INSERT.INTO.t2(x,y).SELECT |
189780 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
1897a0 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 | FLICT(x).DO.UPDATE.SET.y=exclude |
1897c0 | 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 11 97 7f 04 00 86 27 | d.y.WHERE.y<.zeroblob(1).......' |
1897e0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 | CREATE.TABLE.t2(x.INTEGER.PRIMAR |
189800 | 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a | Y.KEY,.y.varchar(1))/*WIT.ROWID* |
189820 | 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 | /;.CREATE.TABLE.t3(a,b);.INSERT. |
189840 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c | INTO.t3.VALUES(1,2),(3,4),(1,5), |
189860 | 28 36 2c 37 29 2c 28 33 2c 20 63 6f 61 6c 65 73 63 65 28 31 2c 31 29 29 2c 28 31 2c 31 29 3b 0a | (6,7),(3,.coalesce(1,1)),(1,1);. |
189880 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 | INSERT.INTO.t2(x,y).SELECT.group |
1898a0 | 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | _concat(1,1).a,b.FROM.t3.WHERE.t |
1898c0 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
1898e0 | 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 | ET.y=max(t2.y,excluded.y);.INSER |
189900 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
189920 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
189940 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 | .UPDATE.SET.y=excluded.y.WHERE.y |
189960 | 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 25 97 7e 04 00 86 4f 43 52 45 41 54 45 20 54 41 42 4c | <excluded.y;..%.~...OCREATE.TABL |
189980 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 | E.t2(x.INTEGER.PRIMARY.KEY,.y.va |
1899a0 | 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | rchar(1))/*WIT.ROWID*/;.CREATE.T |
1899c0 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
1899e0 | 55 45 53 28 31 2c 32 29 2c 28 33 20 2f 2a 20 2a 2f 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3./*.*/,5),(6,7),(3,1) |
189a00 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
189a20 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 | .t2(x,y).SELECT.group_concat(1,1 |
189a40 | 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | ).a,b.FROM.t3.WHERE.true...ON.CO |
189a60 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
189a80 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | .y,excluded.y);.INSERT.INTO.t2(x |
189aa0 | 2c 79 29 20 53 45 4c 45 43 54 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 6f 77 69 64 28 29 20 61 | ,y).SELECT.last_insert_rowid().a |
189ac0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
189ae0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e | ICT(x).DO.UPDATE.SET.y=excluded. |
189b00 | 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 23 97 7d 04 00 86 4b 43 52 | y.WHERE.y<excluded.y;..#.}...KCR |
189b20 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
189b40 | 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.varchar(1))/*WIT.ROWID*/; |
189b60 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
189b80 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2f 2a 20 2a 2f 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3./*.*/,5),(6 |
189ba0 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
189bc0 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 | SERT.INTO.t2(x,y).SELECT.group_c |
189be0 | 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | oncat(1,1).a,b.FROM.t3.WHERE.tru |
189c00 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
189c20 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 | .y=max(t2.y,excluded.y);.INSERT. |
189c40 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 | INTO.t2(x,y).SELECT.group_concat |
189c60 | 28 31 2e 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | (1.1).a,b.FROM.t3.WHERE.true...O |
189c80 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
189ca0 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 11 97 | cluded.y.WHERE.y<excluded.y;.... |
189cc0 | 7c 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | |...'CREATE.TABLE.t2(x.INTEGER.P |
189ce0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.varchar(1))/*WIT.R |
189d00 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
189d20 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2f 2a 20 2a | SERT.INTO.t3.VALUES(1,2),(3./*.* |
189d40 | 2f 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | /,5),(6,7),(3,1),(8,9),(6,11),(1 |
189d60 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
189d80 | 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | group_concat(1,1).a,b.FROM.t3.WH |
189da0 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
189dc0 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
189de0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
189e00 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
189e20 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
189e40 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 2a 97 7b 04 00 86 59 43 52 45 41 54 45 | ERE.y<excluded.y;..*.{...YCREATE |
189e60 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
189e80 | 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.varchar(1))/*WIT.ROWID*/;.CRE |
189ea0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
189ec0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 20 2f 2a 20 2a 2f 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(3./*.*/,5),(6,7), |
189ee0 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
189f00 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 | .INTO.t2(x,y).SELECT.group_conca |
189f20 | 74 28 31 2c 31 29 20 61 2c 20 61 76 67 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | t(1,1).a,.avg(1)b.FROM.t3.WHERE. |
189f40 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
189f60 | 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 | SET.y=max(t2.y,excluded.y);.INSE |
189f80 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e | RT.INTO.t2(x,y).SELECT.group_con |
189fa0 | 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | cat(1,1).a,b.FROM.t3.WHERE.true. |
189fc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
189fe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
18a000 | 0d 00 00 00 14 00 c5 00 1e 7d 1c f0 1b 61 19 dc 18 59 16 d6 15 44 13 af 12 08 10 73 0e de 0d 35 | .........}...a...Y...D.....s...5 |
18a020 | 0b a0 0a 14 08 8a 07 07 05 72 03 dd 02 5a 00 c5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .........r...Z.................. |
18a040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18a0c0 | 00 00 00 00 00 83 11 98 22 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | ........"...'CREATE.TABLE.t2(x.I |
18a0e0 | 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 | NTEGER.PRIMARY.KEY,.y.varchar(1) |
18a100 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
18a120 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 39 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(9,2) |
18a140 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
18a160 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
18a180 | 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 39 2c 31 29 20 61 2c 62 20 46 52 | .SELECT.group_concat(9,1).a,b.FR |
18a1a0 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
18a1c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
18a1e0 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
18a200 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
18a220 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 | ONFLICT(x).DO.UPDATE.SET.y=exclu |
18a240 | 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 7f 98 21 04 00 | ded.y.WHERE.y<excluded.y;....!.. |
18a260 | 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d | ..CREATE.TABLE.t2(x.INTEGER.PRIM |
18a280 | 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.varchar(1))/*WIT.ROWI |
18a2a0 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
18a2c0 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 38 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(8,2),(3,4),(1,5 |
18a2e0 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 | ),(6,7),(3,1),(8,.randomblob(1)) |
18a300 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
18a320 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
18a340 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
18a360 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
18a380 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
18a3a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
18a3c0 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 11 98 | cluded.y.WHERE.y<.zeroblob(1)... |
18a3e0 | 20 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | ....'CREATE.TABLE.t2(x.INTEGER.P |
18a400 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.varchar(1))/*WIT.R |
18a420 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
18a440 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 35 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(5,2),(3,4),( |
18a460 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
18a480 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
18a4a0 | 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 39 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | group_concat(9,1).a,b.FROM.t3.WH |
18a4c0 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
18a4e0 | 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a | ATE.SET.y=max(t2.y,excluded.y);. |
18a500 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 | INSERT.INTO.t2(x,y).SELECT.a,b.F |
18a520 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
18a540 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 | x).DO.UPDATE.SET.y=excluded.y.WH |
18a560 | 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 11 98 1f 04 00 86 27 43 52 45 41 54 45 | ERE.y<excluded.y;........'CREATE |
18a580 | 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | .TABLE.t2(x.INTEGER.PRIMARY.KEY, |
18a5a0 | 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 | .y.varchar(1))/*WIT.ROWID*/;.CRE |
18a5c0 | 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ATE.TABLE.t3(a,b);.INSERT.INTO.t |
18a5e0 | 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 3f 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c | 3.VALUES(1,2),(?,4),(1,5),(6,7), |
18a600 | 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 | (3,1),(8,9),(6,11),(1,1);.INSERT |
18a620 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 | .INTO.t2(x,y).SELECT.group_conca |
18a640 | 74 28 39 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | t(9,1).a,b.FROM.t3.WHERE.true... |
18a660 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
18a680 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ax(t2.y,excluded.y);.INSERT.INTO |
18a6a0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
18a6c0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
18a6e0 | 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 | E.SET.y=excluded.y.WHERE.y<exclu |
18a700 | 64 65 64 2e 79 3b 0a 82 7f 98 1e 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 | ded.y;.........CREATE.TABLE.t2(x |
18a720 | 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 | .INTEGER.PRIMARY.KEY,.y.varchar( |
18a740 | 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | 1))/*WIT.ROWID*/;.CREATE.TABLE.t |
18a760 | 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c | 3(a,b);.INSERT.INTO.t3.VALUES(1, |
18a780 | 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 | 2),(3,4),(1,5),(6,7),(3,1),(8,9) |
18a7a0 | 2c 28 36 2c 3a 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c | ,(6,:1),(1,1);.INSERT.INTO.t2(x, |
18a7c0 | 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 40 74 72 75 65 | y).SELECT.a,b.FROM.t3.WHERE@true |
18a7e0 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
18a800 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.y);.INSERT.I |
18a820 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
18a840 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
18a860 | 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 40 78 | DATE.SET.y=excluded.y.WHERE.y<@x |
18a880 | 63 6c 75 64 65 64 2e 79 3b 0a 83 06 98 1d 04 00 86 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | cluded.y;.........CREATE.TABLE.t |
18a8a0 | 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 | 2(x.INTEGER.PRIMARY.KEY,.y.varch |
18a8c0 | 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ar(1))/*WIT.ROWID*/;.CREATE.TABL |
18a8e0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
18a900 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
18a920 | 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,9),(6,11),(1,1);.INSERT.INTO.t2 |
18a940 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 73 75 6d 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | (x,y).SELECT.sum(1).a,b.FROM.t3. |
18a960 | 57 48 45 52 45 40 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE@true...ON.CONFLICT(x).DO.U |
18a980 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 | PDATE.SET.y=max(t2.y,excluded.y) |
18a9a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 | ;.INSERT.INTO.t2(x,y).SELECT.a,b |
18a9c0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
18a9e0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 | T(x).DO.UPDATE.SET.y=excluded.y. |
18aa00 | 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 08 98 1c 04 00 86 15 43 52 45 41 | WHERE.y<excluded.y;.........CREA |
18aa20 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x.INTEGER.PRIMARY.KE |
18aa40 | 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y.varchar(1))/*WIT.ROWID*/;.C |
18aa60 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | REATE.TABLE.t3(a,b);.INSERT.INTO |
18aa80 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
18aaa0 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
18aac0 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e 64 6f 6d 28 29 20 | RT.INTO.t2(x,y).SELECT.random(). |
18aae0 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
18ab00 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
18ab20 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
18ab40 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
18ab60 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
18ab80 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
18aba0 | 83 11 98 1b 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .......'CREATE.TABLE.t2(x.INTEGE |
18abc0 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 | R.PRIMARY.KEY,.y.varchar(1))/*WI |
18abe0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
18ac00 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
18ac20 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
18ac40 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
18ac60 | 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 39 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 | CT.group_concat(9,1).a,b.FROM.t3 |
18ac80 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
18aca0 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 | UPDATE.SET.y=max(t2.y,excluded.y |
18acc0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 79 2c 79 29 20 53 45 4c 45 43 54 20 61 2c | );.INSERT.INTO.t2(y,y).SELECT.a, |
18ace0 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | b.FROM.t3.WHERE.true...ON.CONFLI |
18ad00 | 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 | CT(x).DO.UPDATE.SET.y=excluded.y |
18ad20 | 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 25 98 1a 04 00 86 4f 43 52 45 | .WHERE.y<excluded.y;..%.....OCRE |
18ad40 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x.INTEGER.PRIMARY.K |
18ad60 | 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.varchar(1))/*WIT.ROWID*/;. |
18ad80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
18ada0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
18adc0 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
18ade0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f | ERT.INTO.t2(x,y).SELECT.group_co |
18ae00 | 6e 63 61 74 28 39 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 | ncat(9,1).a,b.FROM.t3.WHERE.true |
18ae20 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(x).DO.UPDATE.SET. |
18ae40 | 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 | y=max(t2.y,excluded.y);.INSERT.I |
18ae60 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6c 61 73 74 5f 69 6e 73 65 72 74 5f 72 | NTO.t2(x,y).SELECT.last_insert_r |
18ae80 | 6f 77 69 64 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | owid().a,b.FROM.t3.WHERE.true... |
18aea0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 | ON.CONFLICT(x).DO.UPDATE.SET.y=e |
18aec0 | 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 11 | xcluded.y.WHERE.y<excluded.y;... |
18aee0 | 98 19 04 00 86 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 | .....'CREATE.TABLE.t2(x.INTEGER. |
18af00 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.varchar(1))/*WIT. |
18af20 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
18af40 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
18af60 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
18af80 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
18afa0 | 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 39 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | .group_concat(9,1).a,b.FROM.t3.W |
18afc0 | 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 | HERE.true...ON.CONFLICT(x).DO.UP |
18afe0 | 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b | DATE.SET.y=max(t2.y,excluded.y); |
18b000 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
18b020 | 46 52 4f 4d 20 74 33 00 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
18b040 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 | (x).DO.UPDATE.SET.y=excluded.y.W |
18b060 | 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 11 98 18 04 00 86 27 43 52 45 41 54 | HERE.y<excluded.y;........'CREAT |
18b080 | 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 | E.TABLE.t2(x.INTEGER.PRIMARY.KEY |
18b0a0 | 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.varchar(1))/*WIT.ROWID*/;.CR |
18b0c0 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
18b0e0 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
18b100 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
18b120 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 | T.INTO.t2(x,y).SELECT.group_conc |
18b140 | 61 74 28 31 2c 3f 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | at(1,?).a,b.FROM.t3.WHERE.true.. |
18b160 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
18b180 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,excluded.y);.INSERT.INT |
18b1a0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
18b1c0 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
18b1e0 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.y.WHERE.y<excl |
18b200 | 75 64 65 64 2e 79 3b 0a 83 23 98 17 04 00 86 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | uded.y;..#.....KCREATE.TABLE.t2( |
18b220 | 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 | x.INTEGER.PRIMARY.KEY,.y.varchar |
18b240 | 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | (1))/*WIT.ROWID*/;.CREATE.TABLE. |
18b260 | 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 | t3(a,b);.INSERT.INTO.t3.VALUES(1 |
18b280 | 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 | ,2),(3,4),(1,5),(6,7),(3,1),(8,9 |
18b2a0 | 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 | ),(6,11),(1,1);.INSERT.INTO.t2(x |
18b2c0 | 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 | ,y).SELECT.group_concat(1,1).a,b |
18b2e0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
18b300 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
18b320 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
18b340 | 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d | ELECT.group_concat(1,1).a,b.FROM |
18b360 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
18b380 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=excluded.y.WHERE |
18b3a0 | 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 11 98 16 04 00 86 27 43 52 45 41 54 45 20 54 41 | .y<excluded.y;........'CREATE.TA |
18b3c0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x.INTEGER.PRIMARY.KEY,.y. |
18b3e0 | 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | varchar(1))/*WIT.ROWID*/;.CREATE |
18b400 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
18b420 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
18b440 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
18b460 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 | TO.t2(x,y).SELECT.group_concat(1 |
18b480 | 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 | ,1).a,b.FROM.t3.WHERE.true...ON. |
18b4a0 | 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 | CONFLICT(x).DO.UPDATE.SET.y=max( |
18b4c0 | 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | t2.y,excluded.y);.INSERT.INTO.t2 |
18b4e0 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
18b500 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
18b520 | 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 | ET.y=excluded.y.WHERE.y<excluded |
18b540 | 2e 79 3b 0a 83 0e 98 15 04 00 86 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e | .y;........!CREATE.TABLE.t2(x.IN |
18b560 | 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 | TEGER.PRIMARY.KEY,.y.varchar(1)) |
18b580 | 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 | /*WIT.ROWID*/;.CREATE.TABLE.t3(a |
18b5a0 | 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | ,b);.INSERT.INTO.t3.VALUES(1,2), |
18b5c0 | 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (3,4),(1,5),(6,7),(3,1),(8,9),(6 |
18b5e0 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
18b600 | 53 45 4c 45 43 54 20 63 6f 75 6e 74 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | SELECT.count(1).a,b.FROM.t3.WHER |
18b620 | 45 40 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E@true...ON.CONFLICT(x).DO.UPDAT |
18b640 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
18b660 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
18b680 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
18b6a0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 | .DO.UPDATE.SET.y=excluded.y.WHER |
18b6c0 | 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 56 41 43 55 55 4d 0a 82 7f 98 14 04 00 86 03 43 52 | E.y<excluded.y;VACUUM.........CR |
18b6e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x.INTEGER.PRIMARY. |
18b700 | 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.varchar(1))/*WIT.ROWID*/; |
18b720 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
18b740 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
18b760 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
18b780 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
18b7a0 | 4d 20 74 33 20 57 48 45 52 45 40 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE@true...ON.CONFLICT(x) |
18b7c0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 | .DO.UPDATE.SET.y=max(t2.y,exclud |
18b7e0 | 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | ed.y);.INSERT.INTO.t2(x,y).SELEC |
18b800 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | T.a,b.FROM.t3.WHERE.true...ON.CO |
18b820 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 | NFLICT(x).DO.UPDATE.SET.y=exclud |
18b840 | 65 64 2e 79 20 57 48 45 52 45 20 79 3c 40 78 63 6c 75 64 65 64 ae 79 3b 0a 82 7f 98 13 04 00 86 | ed.y.WHERE.y<@xcluded.y;........ |
18b860 | 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
18b880 | 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 | RY.KEY,.y.varchar(1))/*WIT.ROWID |
18b8a0 | 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 | */;.CREATE.TABLE.t3(a,b);.INSERT |
18b8c0 | 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 | .INTO.t3.VALUES(1,2),(3,4),(1,5) |
18b8e0 | 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b | ,(6,7),(3,1),(8,9),(6,11),(1,1); |
18b900 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 | .INSERT.INTO.t2(x,y).SELECT.a,b. |
18b920 | 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | FROM.t3.WHERE.true...ON.CONFLICT |
18b940 | 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 | (x).DO.UPDATE.SET.y=max(t2.y,exc |
18b960 | 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | luded.y);.INSERT.INTO.t2(x,y).SE |
18b980 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e | LECT.a,b.FROM.t3.WHERE.true...ON |
18b9a0 | 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 | .CONFLICT(x).DO.UPDATE.SET.y=exc |
18b9c0 | 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 83 01 98 12 | luded.y.WHERE.y<.zeroblob(1).... |
18b9e0 | 04 00 86 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ....CREATE.TABLE.t2(x.INTEGER.PR |
18ba00 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f | IMARY.KEY,.y.varchar(1))/*WIT.RO |
18ba20 | 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 | WID*/;.CREATE.TABLE.t3(a,b);.INS |
18ba40 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
18ba60 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
18ba80 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
18baa0 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,b.FROM.t3.WHERE.true...ON.CONFL |
18bac0 | 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c | ICT(x).DO.UPDATE.SET.y=max(t2.y, |
18bae0 | 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | excluded.y);.INSERT.INTO.t2(x,y) |
18bb00 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
18bb20 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
18bb40 | 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 25 59 3c 65 78 63 6c 75 64 65 64 2e 79 3b | excluded.y.WHERE.y%Y<excluded.y; |
18bb60 | 0a 83 0b 98 11 04 00 86 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 | .........CREATE.TABLE.t2(x.INTEG |
18bb80 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 | ER.PRIMARY.KEY,.y.varchar(1))/*W |
18bba0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
18bbc0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
18bbe0 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
18bc00 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
18bc20 | 45 43 54 20 61 2c 20 7a 65 72 6f 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | ECT.a,.zeroblob(1)b.FROM.t3.WHER |
18bc40 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
18bc60 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
18bc80 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
18bca0 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
18bcc0 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 | .DO.UPDATE.SET.y=excluded.y.WHER |
18bce0 | 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 83 09 98 10 04 00 86 17 43 52 45 41 54 45 20 54 | E.y<excluded.y;.........CREATE.T |
18bd00 | 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x.INTEGER.PRIMARY.KEY,.y |
18bd20 | 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .varchar(1))/*WIT.ROWID*/;.CREAT |
18bd40 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
18bd60 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
18bd80 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
18bda0 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 74 72 69 6d 28 31 2c 31 29 62 | NTO.t2(x,y).SELECT.a,.trim(1,1)b |
18bdc0 | 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .FROM.t3.WHERE.true...ON.CONFLIC |
18bde0 | 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 | T(x).DO.UPDATE.SET.y=max(t2.y,ex |
18be00 | 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | cluded.y);.INSERT.INTO.t2(x,y).S |
18be20 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
18be40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 | N.CONFLICT(x).DO.UPDATE.SET.y=ex |
18be60 | 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 7f 98 | cluded.y.WHERE.y<excluded.y;.... |
18be80 | 0f 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 | .....CREATE.TABLE.t2(x.INTEGER.P |
18bea0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.varchar(1))/*WIT.R |
18bec0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
18bee0 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
18bf00 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
18bf20 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 20 2f 2a 20 2a 2f 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2./*.*/SELECT. |
18bf40 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
18bf60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
18bf80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
18bfa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
18bfc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
18bfe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
18c000 | 0d 00 00 00 19 00 6a 00 1e 8d 1c e0 1b c9 1a 26 18 9b 17 7c 16 b9 15 af 14 25 12 8c 11 da 10 4e | ......j........&...|.....%.....N |
18c020 | 0f 2b 0d 88 0c 05 0b 1d 0a 35 09 56 08 2c 06 a1 05 76 04 4f 03 70 01 ed 00 6a 00 00 00 00 00 00 | .+.......5.V.,...v.O.p...j...... |
18c040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18c060 | 00 00 00 00 00 00 00 00 00 00 82 7f 98 3b 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .............;....CREATE.TABLE.t |
18c080 | 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 | 2(x..NTEGER.PRIMARY.KEY,.y.varch |
18c0a0 | 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | ar(1))/*WIT.ROWID*/;.CREATE.TABL |
18c0c0 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
18c0e0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 | (1,2),(3,4),(1,5),(6,7),(3,1),(8 |
18c100 | 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 | ,.randomblob(1));.INSERT.INTO.t2 |
18c120 | 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | (x,y).SELECT.a,b.FROM.t3.WHERE.t |
18c140 | 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 | rue...ON.CONFLICT(x).DO.UPDATE.S |
18c160 | 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 | ET.y=max(t2.y,excluded.y);.INSER |
18c180 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
18c1a0 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
18c1c0 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 | .UPDATE.SET.y=excluded.y.WHERE.y |
18c1e0 | 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 7f 98 3a 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c | <excluded.y;....:....CREATE.TABL |
18c200 | 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2(x..NTEGER.PRIMARY.KEY,.y.IN |
18c220 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
18c240 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 32 20 56 41 4c | ABLE.t3(a,b);REPLACE.INTO.t2.VAL |
18c260 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
18c280 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ,(8,9),(6,11),(1,1);.INSERT.INTO |
18c2a0 | 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | .t2(x,y).SELECT.a,b.FROM.t3.WHER |
18c2c0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
18c2e0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e | E.SET.y=max(t2.y,excluded.y);.IN |
18c300 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
18c320 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 | M.t3.WHERE.true...ON.CONFLICT(x) |
18c340 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 | .DO.UPDATE.SET.y=excluded.y.WHER |
18c360 | 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 5b 98 39 04 00 83 3b 43 52 45 41 54 45 20 54 | E.y<excluded.y;..[.9...;CREATE.T |
18c380 | 41 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t2(x..NTEGER.PRIMARY.KEY,.y |
18c3a0 | 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 | .INT.UNIQUE)/*WIT.ROWID*/;.CREAT |
18c3c0 | 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | E.TABLE.t3(a,b);.INSERT.INTO.t3. |
18c3e0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
18c400 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 52 45 50 4c 41 43 45 20 49 | ,1),(8,9),(6,11),(1,1);REPLACE.I |
18c420 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 | NTO.t2(x,y).SELECT.a,b.FROM.t3.W |
18c440 | 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 82 23 98 38 04 00 84 4b 43 52 45 41 54 45 20 54 41 | HERE.true...y;..#.8...KCREATE.TA |
18c460 | 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 | BLE.t2(x..NTEGER.PRIMARY.KEY,.y. |
18c480 | 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 | INT.UNIQUE)/*WIT.ROWID*/;.CREATE |
18c4a0 | 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 | .TABLE.t3(a,b);.INSERT.INTO.t3.V |
18c4c0 | 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c | ALUES(1,2),(3,4),(1,5),(6,7),(3, |
18c4e0 | 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e | 1),(8,9),(6,11),(1,1);.INSERT.IN |
18c500 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 7c 7c | TO.t2(x,y).SELECT.zeroblob(1).|| |
18c520 | 20 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f | ..a,b.FROM.t3.WHERE.true...ON.CO |
18c540 | 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 | NFLICT(x).DO.UPDATE.SET.y=max(t2 |
18c560 | 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 82 27 98 37 04 00 84 53 43 52 | .y,excluded.y);.INSy;..'.7...SCR |
18c580 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x..NTEGER.PRIMARY. |
18c5a0 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
18c5c0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
18c5e0 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
18c600 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
18c620 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f | SERT.INTO.t2(x,y).SELECT.zeroblo |
18c640 | 62 28 20 72 61 6e 64 6f 6d 28 29 2a 2d 31 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | b(.random()*-11).a,b.FROM.t3.WHE |
18c660 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
18c680 | 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b | TE.SET.y=max(t2.y,excluded.y);.; |
18c6a0 | 0a 83 07 98 36 04 00 86 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 | ....6....CREATE.TABLE.t2(x..NTEG |
18c6c0 | 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PRIMARY.KEY,.y.INT.UNIQUE)/*W |
18c6e0 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
18c700 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
18c720 | 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,5),(6,7),(3,1),(8,9),(6,11 |
18c740 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
18c760 | 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 | ECT.json(1).a,b.FROM.t3.WHERE.tr |
18c780 | 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | ue...ON.CONFLICT(x).DO.UPDATE.SE |
18c7a0 | 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 | T.y=max(t2.y,excluded.y);.INSERT |
18c7c0 | 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 | .INTO.t2(x,y).SELECT.a,b.FROM.t3 |
18c7e0 | 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 | .WHERE.true...ON.CONFLICT(x).DO. |
18c800 | 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c | UPDATE.SET.y=excluded.y.WHERE.y< |
18c820 | 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 26 98 35 04 00 84 51 43 52 45 41 54 45 20 54 41 42 4c 45 | excluded.y;..&.5...QCREATE.TABLE |
18c840 | 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x..NTEGER.PRIMARY.KEY,.y.INT |
18c860 | 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)/*WIT.ROWID*/;.CREATE.TA |
18c880 | 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 | BLE.t3(a,b);.INSERT.INTO.t3.VALU |
18c8a0 | 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c | ES(1,2),(3,4),(1,5),(6,7),(3,1), |
18c8c0 | 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (8,9),(6,11),(1,1);.INSERT.INTO. |
18c8e0 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 6a 73 6f 6e 28 31 29 20 61 2c 20 61 62 73 28 31 29 | t2(x,y).SELECT.json(1).a,.abs(1) |
18c900 | 62 20 46 52 4f 4d 20 74 32 20 57 48 45 52 45 20 74 72 75 65 0a 41 4e 44 20 74 72 75 65 20 20 4f | b.FROM.t2.WHERE.true.AND.true..O |
18c920 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
18c940 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 3b 0a 81 5b 98 34 04 00 83 3b 43 52 | x(t2.y,excluded.y);.;..[.4...;CR |
18c960 | 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 | EATE.TABLE.t2(x..NTEGER.PRIMARY. |
18c980 | 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b | KEY,.y.INT.UNIQUE)/*WIT.ROWID*/; |
18c9a0 | 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e | .CREATE.TABLE.t3(a,b);.INSERT.IN |
18c9c0 | 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 | TO.t3.VALUES(1,2),(3,4),(1,5),(6 |
18c9e0 | 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e | ,7),(3,1),(8,9),(6,11),(1,1);.IN |
18ca00 | 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f | SERT.INTO.t2(x,y).SELECT.a,b.FRO |
18ca20 | 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 64 98 33 04 00 83 4d 43 52 45 | M.t3.WHERE.true...y;..d.3...MCRE |
18ca40 | 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b | ATE.TABLE.t2(x..NTEGER.PRIMARY.K |
18ca60 | 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a | EY,.y.INT.UNIQUE)/*WIT.ROWID*/;. |
18ca80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | CREATE.TABLE.t3(a,b);.INSERT.INT |
18caa0 | 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c | O.t3.VALUES(1,2),(3,4),(1,5),(6, |
18cac0 | 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 | 7),(3,1),(8,9),(6,11),(1,1);.INS |
18cae0 | 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f | ERT.INTO.t2(x,y).SELECT.a,.rando |
18cb00 | 6d 28 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 64 98 | m()b.FROM.t3.WHERE.true...y;..d. |
18cb20 | 32 04 00 83 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 c9 4e 54 45 47 45 52 20 50 | 2...MCREATE.TABLE.t2(x..NTEGER.P |
18cb40 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
18cb60 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
18cb80 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
18cba0 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
18cbc0 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
18cbe0 | 61 2c 20 72 61 6e 64 6f 6d 28 29 20 7c 7c 20 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 | a,.random().||.b.FROM.t3.WHERE.t |
18cc00 | 72 75 65 0a 00 82 7f 98 31 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 63 | rue.....1....CREATE.TABLE.t2(x.c |
18cc20 | 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 | har(1).PRIMARY.KEY,.y.varchar(1) |
18cc40 | 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 | )/*WIT.ROWID*/;.CREATE.TABLE.t3( |
18cc60 | 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | a,b);.INSERT.INTO.t3.VALUES(1,2) |
18cc80 | 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 | ,(3,4),(1,5),(6,7),(3,1),(8,9),( |
18cca0 | 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 | 6,11),(1,1);.INSERT.INTO.t2(x,y) |
18ccc0 | 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 | .SELECT.a,b.FROM.t3.WHERE.true.. |
18cce0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d | .ON.CONFLICT(x).DO.UPDATE.SET.y= |
18cd00 | 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | max(t2.y,excluded.y);.INSERT.INT |
18cd20 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 | O.t2(x,y).SELECT.a,b.FROM.t3.WHE |
18cd40 | 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 | RE.true...ON.CONFLICT(x).DO.UPDA |
18cd60 | 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c | TE.SET.y=excluded.y.WHERE.y<excl |
18cd80 | 75 64 65 64 2e 79 3b 0a 83 1f 98 30 04 00 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 | uded.y;....0...CCREATE.TABLE.t2( |
18cda0 | 78 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 | x.char(1).PRIMARY.KEY,.y.INT.UNI |
18cdc0 | 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 | QUE)WITHOUT.ROWID;.CREATE.TABLE. |
18cde0 | 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 | t3(a,b.char(1));.INSERT.INTO.t3. |
18ce00 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 | VALUES(1,2),(3,4),(1,5),(6,7),(3 |
18ce20 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 | ,1),(8,9),(6,11),(1,1);.INSERT.I |
18ce40 | 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 | NTO.t2(x,y).SELECT.a,.randomblob |
18ce60 | 28 31 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 | (12001-01-01)b.FROM.t3.WHERE.tru |
18ce80 | 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | e...ON.CONFLICT(x).DO.UPDATE.SET |
18cea0 | 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 | .y=max(t2.y,excluded.y);.INSERT. |
18cec0 | 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | INTO.t2(x,y).SELECT.a,b.FROM.t3. |
18cee0 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
18cf00 | 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 | PDATE.SET.y=excluded.y.WHERE.y<e |
18cf20 | 78 63 6c 75 64 65 64 2e 79 3b 0a 82 1f 98 2f 04 00 84 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 | xcluded.y;..../...CCREATE.TABLE. |
18cf40 | 74 32 28 78 20 63 68 61 72 28 31 29 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 | t2(x.char(1).PRIMARY.KEY,.y.INT. |
18cf60 | 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 | UNIQUE)/*WIT.ROWID*/;.CREATE.TAB |
18cf80 | 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 | LE.t3(a,b);.INSERT.INTO.t3.VALUE |
18cfa0 | 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 | S(1,2),(3,4),(1,5),(6,7),(3,1),( |
18cfc0 | 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 8,9),(6,11),(1,1);.INSERT.INTO.t |
18cfe0 | 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 7a 65 72 6f 62 6c 6f 62 28 31 29 20 61 2c 62 20 46 52 | 2(x,y).SELECT.zeroblob(1).a,b.FR |
18d000 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
18d020 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
18d040 | 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 08 98 2e 04 00 86 15 43 52 45 41 54 45 20 54 41 42 | ded.y);.INSy;.........CREATE.TAB |
18d060 | 4c 45 20 74 32 28 78 20 62 6c 6f 62 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | LE.t2(x.blobGER.PRIMARY.KEY,.y.I |
18d080 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 | NT.UNIQUE)/*WIT.ROWID*/;.CREATE. |
18d0a0 | 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | TABLE.t3(a,b);.INSERT.INTO.t3.VA |
18d0c0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
18d0e0 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
18d100 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 74 6f 74 61 6c 28 31 29 20 61 2c 62 20 46 52 | O.t2(x,y).SELECT.total(1).a,b.FR |
18d120 | 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 | OM.t3.WHERE.true...ON.CONFLICT(x |
18d140 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 | ).DO.UPDATE.SET.y=max(t2.y,exclu |
18d160 | 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ded.y);.INSERT.INTO.t2(x,y).SELE |
18d180 | 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 | CT.a,b.FROM.t3.WHERE.true...ON.C |
18d1a0 | 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 | ONFLICT(x).DO.UPDATE.SET.y=exclu |
18d1c0 | 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 2e 98 2d 04 00 | ded.y.WHERE.y<excluded.y;....-.. |
18d1e0 | 82 61 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 60 61 60 45 47 45 52 20 50 52 49 4d | .aCREATE.TABLE.t2(x.`a`EGER.PRIM |
18d200 | 41 52 59 20 4b 45 59 2c 20 22 61 22 2c 22 62 22 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,."a","b"NIQUE)/*WIT.ROWI |
18d220 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
18d240 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,4),(1,5 |
18d260 | 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | ),(.?16,7),(3,1),(8,9),(6,11),(1 |
18d280 | 2c 31 29 3b 56 41 43 55 55 4d 3b 0a 83 15 98 2c 04 00 86 2f 43 52 45 41 54 45 20 54 41 42 4c 45 | ,1);VACUUM;....,.../CREATE.TABLE |
18d2a0 | 20 74 32 28 78 20 54 45 58 54 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 | .t2(x.TEXTGER.PRIMARY.KEY,.y.INT |
18d2c0 | 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 | .UNIQUE)WITHOUT.ROWID;.CREATE.TA |
18d2e0 | 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | BLE.t3(a,b.char(1));.INSERT.INTO |
18d300 | 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 | .t3.VALUES(1,2),(3,4),(1,5),(6,7 |
18d320 | 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 | ),(3,1),(8,9),(6,11),(1,1);.INSE |
18d340 | 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 | RT.INTO.t2(x,y).SELECT.a,b.FROM. |
18d360 | 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 | t3.WHERE.true...ON.CONFLICT(x).D |
18d380 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 | O.UPDATE.SET.y=max(t2.y,excluded |
18d3a0 | 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | .y);.INSERT.INTO.t2(x,y).SELECT. |
18d3c0 | 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 | a,.randomblob(1)b.FROM.t3.WHERE. |
18d3e0 | 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 | true...ON.CONFLICT(x).DO.UPDATE. |
18d400 | 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 | SET.y=excluded.y.WHERE.y<exclude |
18d420 | 64 2e 79 3b 0a 83 06 98 2b 04 00 86 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 | d.y;....+....CREATE.TABLE.t2(x.I |
18d440 | 4e 55 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 | NUEGER.PRIMARY.KEY,.y.INT.UNIQUE |
18d460 | 29 2f 2a 57 49 54 20 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 | )/*WIT..INTEGER.PRIMARY.KEY,.y.I |
18d480 | 4e 54 20 29 3b 0a 49 75 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 | NT.);.IuSERT.INTO.t3.VALUES(1,2) |
18d4a0 | 2c 28 33 2c 34 29 47 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 65 63 6f 72 2c | ,(3,4)G(1,5),(6,7),(3,1),(8ecor, |
18d4c0 | 39 29 2c 28 36 2c 31 31 29 2c 28 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 20 74 32 28 | 9),(6,11),(*****************.t2( |
18d4e0 | 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 3b 74 33 20 57 48 45 52 45 20 74 72 | x,y).SELECT.a,b.FROM;t3.WHERE.tr |
18d500 | 75 65 0a 00 80 00 00 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 28 56 27 4f 20 55 50 44 41 54 45 | ue......CONFLICT(x).D(V'O.UPDATE |
18d520 | 20 53 45 54 20 79 3d 6d 61 78 28 74 4c 2e 79 2c 65 78 63 6c 75 64 59 20 4b 45 59 2c 20 79 20 49 | .SET.y=max(tL.y,excludY.KEY,.y.I |
18d540 | 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d | NT.UNIQUE)/*WIy).SELECT.a,b.FROM |
18d560 | 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 | .t3.WHERE.true...ON.CONFLICT(x). |
18d580 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 83 20 79 20 49 4e 54 20 79 20 57 48 45 52 45 | DO.UPDATE.SET.y=e..y.INT.y.WHERE |
18d5a0 | 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 06 98 2a 04 00 84 11 43 52 45 41 54 45 20 54 41 | .y<excluded.y;....*....CREATE.TA |
18d5c0 | 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 ff 4d 41 72 65 70 6c 52 59 20 4b 45 59 | BLE.t2(x.INTEGER.PR.MAreplRY.KEY |
18d5e0 | 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 | ,.y.INT.UNIQUE)/*WIT.ROWID*/;.CR |
18d600 | 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | EATE.TABLE.t3(a,b);.INSERT.INTO. |
18d620 | 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 | t3.VALUES(1,2),(3,4),(1,5),(6,7) |
18d640 | 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 | ,(3,1),(8,9),(6,11),(1,1);.INSER |
18d660 | 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 | T.INTO.t2(x,y).SELECT.a,b.FROM.t |
18d680 | 33 20 4f 52 44 45 52 20 42 59 20 22 61 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 | 3.ORDER.BY."a,9),(6,11),(1,1);.I |
18d6a0 | 4e 53 45 52 54 20 49 4e 54 22 2c 22 29 3b 0a 49 4e 53 45 52 54 20 49 62 22 81 3f 98 29 04 00 83 | NSERT.INT",");.INSERT.Ib".?.)... |
18d6c0 | 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 | .CREATE.TABLE.t2(x.INTEGER.PRIMA |
18d6e0 | 52 59 20 4b 45 59 2c 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 20 79 20 49 4e 54 20 55 | RY.KEY,CURRENT_TIMESTAMP.y.INT.U |
18d700 | 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c | NIQUE)/*WIT.ROWID*/;.CREATE.TABL |
18d720 | 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 | E.t3(a,b);.INSERT.INTO.t3.VALUES |
18d740 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 2c 31 29 | (1,2),(3,4),(1,5),(.?16,7),(3,1) |
18d760 | 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 0a 82 1b 98 28 | ,(8,9),(6,11),(1,1);VACUUM;....( |
18d780 | 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 | ...;CREATE.TABLE.t2(x.INTEGER.PR |
18d7a0 | 49 4d 41 52 59 20 4b 45 59 2c 20 79 2c 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 | IMARY.KEY,.y,INT.UNIQUE)WITHOUT. |
18d7c0 | 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 | ROWID;.CREATE.TABLE.t3(a,b.char( |
18d7e0 | 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | 1));.INSERT.INTO.t3.VALUES(1,2), |
18d800 | 28 37 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 | (7,4),(1,5),(6,7),(3,1),(8,9),(6 |
18d820 | 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 | ,11),(1,1);.INSERT.INTO.t2(x,y). |
18d840 | 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 | SELECT.a,b.FROM.t3.WHERE.true... |
18d860 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d | ON.CONFLICT(x).DO.UPDATE.SET.y=m |
18d880 | 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a 83 07 98 27 04 | ax(t2.y,excluded.y);.INSy;....'. |
18d8a0 | 00 86 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 | ...CREATE.TABLE.t2(x.INTEGER.PRI |
18d8c0 | 4d 41 52 59 20 4b 45 59 2c 20 79 2c 49 4e 54 20 55 4e 49 51 55 45 29 57 49 54 48 4f 55 54 20 52 | MARY.KEY,.y,INT.UNIQUE)WITHOUT.R |
18d8e0 | 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 20 63 68 61 72 28 31 | OWID;.CREATE.TABLE.t3(a,b.char(1 |
18d900 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | ));.INSERT.INTO.t3.VALUES(1,2),( |
18d920 | 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c | 3,4),(1,5),(6,7),(3,1),(8,9),(6, |
18d940 | 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 | 11),(1,1);.INSERT.INTO.t2(x,y).S |
18d960 | 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f | ELECT.a,b.FROM.t3.WHERE.true...O |
18d980 | 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 | N.CONFLICT(x).DO.UPDATE.SET.y=ma |
18d9a0 | 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | x(t2.y,excluded.y);.INSERT.INTO. |
18d9c0 | 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 | t2(x,y).SELECT.a,b.FROM.t3.WHERE |
18d9e0 | 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 | .true...ON.CONFLICT(x).DO.UPDATE |
18da00 | 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 | .SET.y=excluded.y.WHERE.y<exclud |
18da20 | 65 64 2e 79 3b 0a 83 1f 98 26 04 00 86 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 | ed.y;....&...CCREATE.TABLE.t2(x. |
18da40 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 2c 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y,INT.UNIQU |
18da60 | 45 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)WITHOUT.ROWID;.CREATE.TABLE.t3 |
18da80 | 28 61 2c 62 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 | (a,b.char(1));.INSERT.INTO.t3.VA |
18daa0 | 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 | LUES(1,2),(3,4),(1,5),(6,7),(3,1 |
18dac0 | 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ),(8,9),(6,11),(1,1);.INSERT.INT |
18dae0 | 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 20 72 61 6e 64 6f 6d 62 6c 6f 62 28 31 | O.t2(x,y).SELECT.a,.randomblob(1 |
18db00 | 32 30 30 31 2d 30 31 2d 30 31 29 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | 2001-01-01)b.FROM.t3.WHERE.true. |
18db20 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
18db40 | 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e | =max(t2.y,excluded.y);.INSERT.IN |
18db60 | 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 | TO.t2(x,y).SELECT.a,b.FROM.t3.WH |
18db80 | 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 | ERE.true...ON.CONFLICT(x).DO.UPD |
18dba0 | 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 | ATE.SET.y=excluded.y.WHERE.y<exc |
18dbc0 | 6c 75 64 65 64 2e 79 3b 0a 82 13 98 25 04 00 84 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 | luded.y;....%...+CREATE.TABLE.t2 |
18dbe0 | 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 2c 49 4e 54 20 55 4e | (x.INTEGER.PRIMARY.KEY,.y,INT.UN |
18dc00 | 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 | IQUE)/*WIT.ROWID*/;.CREATE.TABLE |
18dc20 | 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 | .t3(a,b);.INSERT.INTO.t3.VALUES( |
18dc40 | 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c | 1,2),(3,4),(1,5),(6,7),(3,1),(8, |
18dc60 | 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 | 9),(6,11),(1,1);.INSERT.INTO.t2( |
18dc80 | 79 2c 79 29 20 53 45 4c 45 43 54 20 31 3d 31 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 | y,y).SELECT.1=1.a,b.FROM.t3.WHER |
18dca0 | 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 | E.true...ON.CONFLICT(x).DO.UPDAT |
18dcc0 | 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 79 3b 0a | E.SET.y=max(t2.y,uded.y);.INSy;. |
18dce0 | 83 29 98 24 04 00 86 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 20 49 4e 54 45 47 45 | .).$...WCREATE.TABLE.t2(x.INTEGE |
18dd00 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 72 63 68 61 72 28 31 29 55 4e 49 51 55 | R.PRIMARY.KEY,.y.varchar(1)UNIQU |
18dd20 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
18dd40 | 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 | (a,b);.INSERT.INTO.t3.VALUES(1,2 |
18dd60 | 29 2c 28 33 20 2f 2a 20 2a 2f 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c | ),(3./*.*/,5),(6,7),(3,1),(8,9), |
18dd80 | 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | (6,11),(1,1);.INSERT.INTO.t2(x,y |
18dda0 | 29 20 53 45 4c 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 | ).SELECT.group_concat(1,1).a,b.F |
18ddc0 | 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ROM.t3.WHERE.true...ON.CONFLICT( |
18dde0 | 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 2c 65 78 63 6c | x).DO.UPDATE.SET.y=max(t2.y,excl |
18de00 | 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | uded.y);.INSERT.INTO.t2(x,y).SEL |
18de20 | 45 43 54 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 61 2c 62 20 46 52 4f 4d 20 74 | ECT.group_concat(1,1).a,b.FROM.t |
18de40 | 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f | 3.WHERE.true...ON.CONFLICT(x).DO |
18de60 | 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 | .UPDATE.SET.y=excluded.y.WHERE.y |
18de80 | 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 82 6f 98 23 04 00 85 63 43 52 45 41 54 45 20 54 41 42 4c | <excluded.y;..o.#...cCREATE.TABL |
18dea0 | 45 20 74 32 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 76 61 | E.t2(x.INTEGER.PRIMARY.KEY,.y.va |
18dec0 | 72 63 68 61 72 28 31 29 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | rchar(1))/*WIT.ROWID*/;.CREATE.T |
18dee0 | 41 42 4c 45 20 74 33 28 78 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 | ABLE.t3(x.INTEGER.PRIMARY.KEY,.y |
18df00 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 | UES(1,2),(3,4),(1,5),(6,7),(3,1) |
18df20 | 2c 28 38 2c 20 72 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 | ,(8,.r2(x,y).SELECT.a,b.FROM.t3. |
18df40 | 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 | WHERE.true...ON.CONFLICT(x).DO.U |
18df60 | 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 20 46 52 4f 4d 20 74 33 20 57 48 45 | PDATE.SET.y=max(t2.y.FROM.t3.WHE |
18df80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
18dfa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
18dfc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
18dfe0 | 3d 65 78 63 6c 75 64 65 64 2e ff 7f ff ff 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.....ERE.y<excluded.y;. |
18e000 | 0d 00 00 00 2c 00 89 00 1e 7d 1d 5e 1c 7f 1b a0 1a c1 19 e2 18 fa 18 1b 17 34 16 a6 15 ed 15 5e | ....,....}.^.............4.....^ |
18e020 | 14 98 13 d3 13 2b 12 9e 12 11 11 46 10 b5 10 28 0f 87 0e da 0e 15 0d 88 0c fb 0c 6e 0b de 0b 4e | .....+.....F...(...........n...N |
18e040 | 0a be 0a 2f 09 a0 09 10 08 80 07 b8 07 28 06 5c 05 cf 05 42 04 7d 03 ad 02 e0 02 10 01 55 00 89 | .../.........(.\...B.}.......U.. |
18e060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
18e080 | 00 00 00 00 00 00 00 00 00 81 48 98 67 04 00 83 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | ..........H.g....CREATE.TABLE.t4 |
18e0a0 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
18e0c0 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 2d 60 61 60 4f 52 | DEX.t4a1.ON.t4(a).WHERE.b<-`a`OR |
18e0e0 | 20 74 72 75 65 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | .true;.CREATE.UNIQUE.INDEX.t4a2. |
18e100 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 | ON.t4(a).WHERE.b>=2000;REPLACE.I |
18e120 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
18e140 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 98 66 04 00 82 73 43 52 45 | FLICT(a).DO.NOTHING;..7.f...sCRE |
18e160 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
18e180 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
18e1a0 | 45 52 45 20 62 3c 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 45 31 29 3d 32 30 | ERE.b<.json_array_length(1E1)=20 |
18e1c0 | 30 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | 01000;.CREATE.UNIQUE.INDEX.t4a2. |
18e1e0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e | ON.t4(a).WHERE.b>.json_array_len |
18e200 | 67 74 68 28 31 45 31 29 3d 32 30 30 30 01 0a 49 81 4c 98 65 04 00 83 1d 43 52 45 41 54 45 20 54 | gth(1E1)=2000..I.L.e....CREATE.T |
18e220 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
18e240 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
18e260 | 3c 20 60 61 60 4e 4f 54 4e 55 4c 4c 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | <.`a`NOTNULL;.CREATE.UNIQUE.INDE |
18e280 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 31 3d 31 3d 32 30 30 | X.t4a2.ON.t4(a).WHERE.b>.1=1=200 |
18e2a0 | 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;REPLACE.INTO.t4(a,b).VALUES(50 |
18e2c0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
18e2e0 | 81 49 98 64 04 00 83 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .I.d....CREATE.TABLE.t4(a.INT,.b |
18e300 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
18e320 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 20 60 61 60 41 4e 44 20 74 72 75 65 3b 0a 43 | ON.t4(a).WHERE.b<.`a`AND.true;.C |
18e340 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
18e360 | 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 | .WHERE.b>=2000;REPLACE.INTO.t4(a |
18e380 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
18e3a0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c 98 63 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..L.c....CREATE.TABL |
18e3c0 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
18e3e0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 2f 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b/10 |
18e400 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
18e420 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2f 30 29 3d 32 30 30 30 3b 0a | t4(a).WHERE.b>.round(1/0)=2000;. |
18e440 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
18e460 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 98 | ).ON.CONFLICT(a).DO.NOTHING;..A. |
18e480 | 62 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | b....CREATE.TABLE.t4(a.INT,.b.IN |
18e4a0 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
18e4c0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 20 3e 3d 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b.>=00;.CREATE.UNIQU |
18e4e0 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 | E.INDEX.t4a2.ON.t4(a).WHERE.b>=2 |
18e500 | 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;REPLACE.INTO.t4(a,b).VALUES( |
18e520 | 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 50,60).ON.CONFLICT(a).DO.NOTHING |
18e540 | 3b 0a 81 09 98 61 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;....a....CREATE.TABLE.t4(a.INT, |
18e560 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
18e580 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 61 76 67 28 31 29 3b 0a 43 4e 54 4f 20 74 34 | 1.ON.t4(a).WHERE.avg(1);.CNTO.t4 |
18e5a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
18e5c0 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 98 60 04 00 82 17 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;....`....CREATE.TA |
18e5e0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
18e600 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 61 76 | QUE.INDEX.t4a1.ON.t4(a).WHERE.av |
18e620 | 67 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 | g(.sqlite_compileoption_used(1)) |
18e640 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 48 98 5f | .ON.CONFLICT(a).DO.NOTHING;..H._ |
18e660 | 04 00 83 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ....CREATE.TABLE.t4(a.INT,.b.INT |
18e680 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
18e6a0 | 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 60 61 60 4f 52 20 74 72 75 65 3b 0a 43 52 45 41 54 45 | 4(a).WHERE.NOT`a`OR.true;.CREATE |
18e6c0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
18e6e0 | 45 20 62 3e 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | E.b>=2000;REPLACE.INTO.t4(a,b).V |
18e700 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
18e720 | 4f 54 48 49 4e 47 3b 0a 81 0c 98 5e 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;....^....CREATE.TABLE.t4( |
18e740 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
18e760 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 2f 2a 20 2a 2f 30 | EX.t4a1.ON.t4(a).WHERE.NOT/*.*/0 |
18e780 | 3b 52 45 49 4e 44 45 58 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;REINDEX.UNIQUE.INDEX.t4a2.ON.t4 |
18e7a0 | 28 61 29 20 57 48 45 52 45 20 62 3e 3d 3a 30 30 30 3b 0a 49 4e 47 3b 0a 81 44 98 5d 04 00 83 0d | (a).WHERE.b>=:000;.ING;..D.].... |
18e7c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
18e7e0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
18e800 | 20 57 48 45 52 45 20 4e 4f 54 2f 2a 20 2a 2f 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | .WHERE.NOT/*.*/0;.CREATE.UNIQUE. |
18e820 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 | INDEX.t4a2.ON.t4(a).WHERE.b>=200 |
18e840 | 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;REPLACE.INTO.t4(a,b).VALUES(50 |
18e860 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
18e880 | 81 0c 98 5c 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | ...\....CREATE.TABLE.t4(a.INT,.b |
18e8a0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
18e8c0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 28 31 29 4f 52 20 74 72 75 65 3b 0a 52 45 | ON.t4(a).WHERE.NOT(1)OR.true;.RE |
18e8e0 | 49 4e 44 45 58 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | INDEX(a,b).VALUES(50,60).ON.CONF |
18e900 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 81 0c 98 5b 04 00 82 1d 43 52 45 41 54 45 20 54 | LICT(a).DO.NOTHI...[....CREATE.T |
18e920 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
18e940 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 4e | IQUE.INDEX.t4a1.ON.t4(a).WHERE.N |
18e960 | 4f 54 28 31 29 4f 52 20 74 72 75 65 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | OT(1)OR.true;.CNTO.t4(a,b).VALUE |
18e980 | 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
18e9a0 | 81 0b 98 5a 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | ...Z....CREATE.TABLE.t4(a.INT,.b |
18e9c0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
18e9e0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 28 31 29 49 53 4e 55 4c 4c 3b 0a 52 45 49 | ON.t4(a).WHERE.NOT(1)ISNULL;.REI |
18ea00 | 4e 44 45 58 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | NDEX).VALUES(50,60).ON.CONFLICT( |
18ea20 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0b 98 59 04 00 82 1b 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;....Y....CREATE.TA |
18ea40 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
18ea60 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f | QUE.INDEX.t4a1.ON.t4(a).WHERE.NO |
18ea80 | 54 28 31 29 49 53 4e 55 4c 4c 3b 0a 43 4e 54 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | T(1)ISNULL;.CNT(a,b).VALUES(50,6 |
18eaa0 | 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c | 0).ON.CONFLICT(a).DO.NOTHING;... |
18eac0 | 98 58 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .X....CREATE.TABLE.t4(a.INT,.b.I |
18eae0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
18eb00 | 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 28 31 29 49 53 2b 74 72 75 65 3b 0a 43 4e 54 4f | .t4(a).WHERE.NOT(1)IS+true;.CNTO |
18eb20 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
18eb40 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 81 0c 98 57 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 | CT(a).DO.NOTHI...W....CREATE.TAB |
18eb60 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
18eb80 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 | UE.INDEX.t4a1.ON.t4(a).WHERE.NOT |
18eba0 | 28 31 29 49 53 20 74 72 75 65 3b 0a 52 45 49 4e 44 45 58 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | (1)IS.true;.REINDEX(a,b).VALUES( |
18ebc0 | 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 81 0c | 50,60).ON.CONFLICT(a).DO.NOTHI.. |
18ebe0 | 98 56 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .V....CREATE.TABLE.t4(a.INT,.b.I |
18ec00 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
18ec20 | 20 74 34 28 61 29 20 57 48 45 52 45 20 4e 4f 54 28 31 29 49 53 20 74 72 75 65 3b 0a 43 4e 54 4f | .t4(a).WHERE.NOT(1)IS.true;.CNTO |
18ec40 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
18ec60 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 81 09 98 55 04 00 82 17 43 52 45 41 54 45 20 54 41 42 | CT(a).DO.NOTHI...U....CREATE.TAB |
18ec80 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
18eca0 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 3f 31 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.?11 |
18ecc0 | 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 | 000;.CNTO.t4(a,b).VALUES(50,60). |
18ece0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 98 54 04 | ON.CONFLICT(a).DO.NOTHING;....T. |
18ed00 | 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ...CREATE.TABLE.t4(a.INT,.b.INT) |
18ed20 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
18ed40 | 28 61 29 20 57 48 45 52 45 20 2e 31 31 30 30 30 3b 0a 52 45 49 4e 44 45 58 28 61 2c 62 29 20 56 | (a).WHERE..11000;.REINDEX(a,b).V |
18ed60 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
18ed80 | 4f 54 48 49 4e 47 3b 0a 81 09 98 53 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;....S....CREATE.TABLE.t4( |
18eda0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
18edc0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 2e 31 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE..11000;.C |
18ede0 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
18ee00 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 98 52 04 00 83 07 43 52 45 | FLICT(a).DO.NOTHING;..A.R....CRE |
18ee20 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
18ee40 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
18ee60 | 45 52 45 20 2d 31 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.-11000;.CREATE.UNIQUE.INDEX. |
18ee80 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 52 45 50 4c | t4a2.ON.t4(a).WHERE.b>=2000;REPL |
18eea0 | 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ACE.INTO.t4(a,b).VALUES(50,60).O |
18eec0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 29 98 51 04 00 | N.CONFLICT(a).DO.NOTHING;..).Q.. |
18eee0 | 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .WCREATE.TABLE.t4(a.INT,.b.INT); |
18ef00 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
18ef20 | 61 29 20 57 48 45 52 45 20 2d 31 31 2e 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.-11.00;.CREATE.UNIQUE.I |
18ef40 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 | NDEX.t4a2.ON.t4(a).WHERE.b>=2000 |
18ef60 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
18ef80 | 36 30 29 a0 4f 4e 0a 81 1d 98 50 04 00 82 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | 60).ON....P...?CREATE.TABLE.t4(a |
18efa0 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
18efc0 | 58 20 74 34 61 31 20 4f 4e 20 74 34 20 28 31 29 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4.(1)WHERE.b<1000;.CR |
18efe0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 20 2d | EATE.UNIQUE.INDEX.t4a2.ON.t4(a.- |
18f000 | 31 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 | 1).WHERE.b>.json_remove(ALL)=200 |
18f020 | 30 3b 56 41 43 55 55 4d 81 09 98 4f 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | 0;VACUUM...O....CREATE.TABLE.t4( |
18f040 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
18f060 | 45 58 20 74 34 61 31 20 4f 4e 20 70 72 69 6e 74 66 28 31 2c 31 29 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.printf(1,1).b<1000;.C |
18f080 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
18f0a0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0d 98 4e 04 00 82 1f 43 52 45 | FLICT(a).DO.NOTHING;....N....CRE |
18f0c0 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
18f0e0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 70 72 20 28 31 29 69 6e | TE.UNIQUE.INDEX.t4a1.ON.pr.(1)in |
18f100 | 74 66 28 31 2c 31 29 20 62 3c 31 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | tf(1,1).b<1000;.CNTO.t4(a,b).VAL |
18f120 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
18f140 | 48 49 4e 47 3b 0a 81 47 98 4d 04 00 83 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..G.M....CREATE.TABLE.t4(a. |
18f160 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
18f180 | 20 74 34 61 31 20 4f 4e 20 50 52 41 47 4d 41 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .t4a1.ON.PRAGMAt4(a).WHERE.b<100 |
18f1a0 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
18f1c0 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 4(a).WHERE.b>=2000;.INSERT.INTO. |
18f1e0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
18f200 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 98 4c 04 00 82 17 43 52 45 41 54 45 20 | T(a).DO.NOTHING;....L....CREATE. |
18f220 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
18f240 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 50 52 41 47 4d 41 28 31 2c 31 29 20 | NIQUE.INDEX.t4a1.ON.PRAGMA(1,1). |
18f260 | 62 3c 31 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | b<1000;.CNTO.t4(a,b).VALUES(50,6 |
18f280 | 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 | 0).ON.CONFLICT(a).DO.NOTHING;... |
18f2a0 | 98 4b 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .K....CREATE.TABLE.t4(a.INT,.b.I |
18f2c0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
18f2e0 | 20 50 52 41 47 20 28 31 29 2c 31 29 20 62 3c 31 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 | .PRAG.(1),1).b<1000;.CNTO.t4(a,b |
18f300 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
18f320 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 24 98 4a 04 00 82 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..$.J...MCREATE.TABLE. |
18f340 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
18f360 | 49 4e 44 45 58 20 41 43 54 49 4f 4e 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | INDEX.ACTIONt4a1.ON.t4(a).WHERE. |
18f380 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
18f3a0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 | .ON.t4(a).WHERE.b>.json_object(1 |
18f3c0 | 2c 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 3b 0a 81 41 98 49 04 00 83 07 43 52 45 41 54 | ,1,1,1)=2000;.INS;..A.I....CREAT |
18f3e0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
18f400 | 20 20 2f 2a 20 2a 2f 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | ../*.*/.INDEX.t4a1.ON.t4(a).WHER |
18f420 | 45 20 62 3c 20 60 61 60 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<.`a`;.CREATE.UNIQUE.INDEX.t4 |
18f440 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 20 60 61 60 3b 52 45 50 4c 41 43 | a2.ON.t4(a).WHERE.b>=.`a`;REPLAC |
18f460 | 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | E.INTO.t4(a,b).VALUES(50,60).ON. |
18f480 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 42 98 48 04 00 83 09 | CONFLICT(a).DO.NOTHING;..B.H.... |
18f4a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | CREATE.TABLE.t4(a.,.b.INT);.CREA |
18f4c0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 63 68 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | TE.UNIQUE.INDEX.tcht4a1.ON.t4(a) |
18f4e0 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
18f500 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 | EX.t4a2.ON.t4(a).WHERE.b>.json_a |
18f520 | 72 72 61 79 28 31 3c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | rray(1<1,1)=2000;.INSERT.INTO.t4 |
18f540 | 28 61 2c 62 29 20 56 ff 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 54 48 49 4e 47 3b 0a 81 0b | (a,b).V.LUES(50,60).ON.THING;... |
18f560 | 98 47 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 78 20 49 4e 54 45 47 45 52 20 | .G....CREATE.TABLE.t3(x.INTEGER. |
18f580 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
18f5a0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 0a 49 4e 53 45 52 | ROWID*/;.CREATE.TABLE.t3(a.INSER |
18f5c0 | 54 20 50 44 41 54 45 20 53 45 54 20 79 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 | T.PDATE.SET.y=excluded.y.WHERE.y |
18f5e0 | 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a 81 35 98 46 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c | <excluded.y;..5.F...oCREATE.TABL |
18f600 | 45 20 74 32 42 59 28 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e | E.t2BY(INTEGER.PRIMARY.KEY,.y.IN |
18f620 | 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 | T.UNIQUE)/*WIT.ROWID*/;.CREATE.T |
18f640 | 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c | ABLE.t3(a,b);.INSERT.INTO.t3.VAL |
18f660 | 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 35 29 2c 28 20 3f 31 36 2c 37 29 2c 28 33 | UES(1,2),(3,4),(1,5),(.?16,7),(3 |
18f680 | 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 3b 56 41 43 55 55 4d 3b 41 4e | ,1),(8,9),(6,11),(1,1);VACUUM;AN |
18f6a0 | 41 4c 59 5a 45 0a 81 0a 98 45 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 a0 | ALYZE....E....CREATE.TABLE.t2(x. |
18f6c0 | 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 | INTEGER.PRIMARY.KEY,.y.INT.UNIQU |
18f6e0 | 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 | E)/*WIT.ROWID*/;.CREATE.TABLE.t3 |
18f700 | 28 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 55 4e 49 51 55 45 0a 49 4e 53 45 52 54 20 | (R.PRIMARY.KEY,.y.UNIQUE.INSERT. |
18f720 | 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 3b 0a 49 4e 3b 0a 81 63 98 44 04 00 83 4b 43 52 45 41 | INTO.t3.VALUES;.IN;..c.D...KCREA |
18f740 | 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 | TE.TABLE.t2(x,INTEGER.PRIMARY.KE |
18f760 | 59 2c 20 79 2c 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 | Y,.y,INT.UNIQUE)/*WIT.ROWID*/;.C |
18f780 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 20 63 68 61 72 28 31 29 2c 62 29 3b 0a 49 4e 53 | REATE.TABLE.t3(a.char(1),b);.INS |
18f7a0 | 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | ERT.INTO.t3.VALUES(1,2),(3,4),(1 |
18f7c0 | 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c | ,5),(6,7),(3,1),(8,9),(6,11),(1, |
18f7e0 | 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 61 | 1);.INSERT.INTO.t2(x,y).SELECT.a |
18f800 | 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 5b 98 43 04 | ,b.FROM.t3.WHERE.true...y;..[.C. |
18f820 | 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 47 45 52 20 50 52 49 | ..;CREATE.TABLE.t2(x,INTEGER.PRI |
18f840 | 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 | MARY.KEY,.y.INT.UNIQUE)/*WIT.ROW |
18f860 | 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 | ID*/;.CREATE.TABLE.t3(a,b);.INSE |
18f880 | 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c | RT.INTO.t3.VALUES(1,2),(3,4),(1, |
18f8a0 | 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 | 5),(6,7),(3,1),(8,9),(6,11),(1,1 |
18f8c0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 2d 61 2c | );.INSERT.INTO.t2(x,y).SELECT-a, |
18f8e0 | 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 64 98 42 04 00 | b.FROM.t3.WHERE.true...y;..d.B.. |
18f900 | 83 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 47 45 52 20 50 52 2c 4d | .MCREATE.TABLE.t2(x,INTEGER.PR,M |
18f920 | 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 4f 57 49 | ARY.KEY,.y.INT.UNIQUE)/*WIT.ROWI |
18f940 | 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e 53 45 52 | D*/;.CREATE.TABLE.t3(a,b);.INSER |
18f960 | 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 35 29 2c 28 31 2c 35 | T.INTO.t3.VALUES(1,2),(3,5),(1,5 |
18f980 | 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 2c 31 29 | ),(6,7),(3,1),(8,9),(6,11),(1,1) |
18f9a0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 72 61 6e | ;.INSERT.INTO.t2(x,y).SELECT.ran |
18f9c0 | 64 6f 6d 28 29 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 | dom().a,b.FROM.t3.WHERE.true...y |
18f9e0 | 3b 0a 81 5b 98 41 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 | ;..[.A...;CREATE.TABLE.t2(x,INTE |
18fa00 | 47 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a | GER.PR,MARY.KEY,.y.INT.UNIQUE)/* |
18fa20 | 57 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 | WIT.ROWID*/;.CREATE.TABLE.t3(a,b |
18fa40 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 | );.INSERT.INTO.t3.VALUES(1,2),(3 |
18fa60 | 2c 35 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 | ,5),(1,5),(6,7),(3,1),(8,9),(6,1 |
18fa80 | 31 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 | 1),(1,1);.INSERT.INTO.t2(x,y).SE |
18faa0 | 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b | LECT.a,b.FROM.t3.WHERE.true...y; |
18fac0 | 0a 81 5b 98 40 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 47 | ..[.@...;CREATE.TABLE.t2(x,INTEG |
18fae0 | 45 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 | ER.PR,MARY.KEY,.y.INT.UNIQUE)/*W |
18fb00 | 49 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 | IT.ROWID*/;.CREATE.TABLE.t3(a,b) |
18fb20 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ;.INSERT.INTO.t3.VALUES(1,2),(3, |
18fb40 | 34 29 2c 28 31 2c 37 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 | 4),(1,7),(6,7),(3,1),(8,9),(6,11 |
18fb60 | 29 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c | ),(1,1);.INSERT.INTO.t2(x,y).SEL |
18fb80 | 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a | ECT.a,b.FROM.t3.WHERE.true...y;. |
18fba0 | 81 5b 98 3f 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 47 45 | .[.?...;CREATE.TABLE.t2(x,INTEGE |
18fbc0 | 52 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 | R.PR,MARY.KEY,.y.INT.UNIQUE)/*WI |
18fbe0 | 54 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b | T.ROWID*/;.CREATE.TABLE.t3(a,b); |
18fc00 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 | .INSERT.INTO.t3.VALUES(1,2),(3,4 |
18fc20 | 29 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 | ),(1,5),(6,7),(3,1),(8,9),(6,11) |
18fc40 | 2c 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 | ,(1,1);.INSERT.INTO.t2(x,y).SELE |
18fc60 | 43 54 40 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 81 | CT@a,b.FROM.t3.WHERE.true...y;.. |
18fc80 | 5b 98 3e 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 2c 49 4e 54 45 47 45 52 | [.>...;CREATE.TABLE.t2(x,INTEGER |
18fca0 | 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 | .PR,MARY.KEY,.y.INT.UNIQUE)/*WIT |
18fcc0 | 20 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a | .ROWID*/;.CREATE.TABLE.t3(a,b);. |
18fce0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 | INSERT.INTO.t3.VALUES(1,2),(3,4) |
18fd00 | 2c 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c | ,(1,5),(6,7),(3,1),(8,9),(6,11), |
18fd20 | 28 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 | (1,1);.INSERT.INTO.t2(x,y).SELEC |
18fd40 | 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 00 20 79 3b 0a 82 1b | T.a,b.FROM.t3.WHERE.true...y;... |
18fd60 | 98 3d 04 00 84 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 27 c9 4e 54 45 47 45 52 20 | .=...;CREATE.TABLE.t2(x'.NTEGER. |
18fd80 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 | PRIMARY.KEY,.y.INT.UNIQUE)/*WIT. |
18fda0 | 52 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 | ROWID*/;.CREATE.TABLE.t3(a,b);.I |
18fdc0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c | NSERT.INTO.t3.VALUES(1,2),(3,4), |
18fde0 | 28 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 | (1,5),(6,7),(3,1),(8,9),(6,11),( |
18fe00 | 31 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 | 1,1);.INSERT.INTO.t2(x,y).SELECT |
18fe20 | 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e | .a,b.FROM.t3.WHERE.true...ON.CON |
18fe40 | 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e | FLICT(x).DO.UPDATE.SET.y=max(t2. |
18fe60 | 79 2c 65 78 63 6c 75 64 65 64 2e 79 29 41 4e 44 20 74 72 75 65 3b 0a 49 4e 53 79 3b 0a 82 7f 98 | y,excluded.y)AND.true;.INSy;.... |
18fe80 | 3c 04 00 86 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 32 28 78 27 c9 4e 54 45 47 45 52 20 50 | <....CREATE.TABLE.t2(x'.NTEGER.P |
18fea0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 79 20 49 4e 54 20 55 4e 49 51 55 45 29 2f 2a 57 49 54 20 52 | RIMARY.KEY,.y.INT.UNIQUE)/*WIT.R |
18fec0 | 4f 57 49 44 2a 2f 3b 0a 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 33 28 61 2c 62 29 3b 0a 49 4e | OWID*/;.CREATE.TABLE.t3(a,b);.IN |
18fee0 | 53 45 52 54 20 49 4e 54 4f 20 74 33 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | SERT.INTO.t3.VALUES(1,2),(3,4),( |
18ff00 | 31 2c 35 29 2c 28 36 2c 37 29 2c 28 33 2c 31 29 2c 28 38 2c 39 29 2c 28 36 2c 31 31 29 2c 28 31 | 1,5),(6,7),(3,1),(8,9),(6,11),(1 |
18ff20 | 2c 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 29 20 53 45 4c 45 43 54 20 | ,1);.INSERT.INTO.t2(x,y).SELECT. |
18ff40 | 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a 20 20 4f 4e 20 43 4f 4e 46 | a,b.FROM.t3.WHERE.true...ON.CONF |
18ff60 | 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 3d 6d 61 78 28 74 32 2e 79 | LICT(x).DO.UPDATE.SET.y=max(t2.y |
18ff80 | 2c 65 78 63 6c 75 64 65 64 2e 79 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 32 28 78 2c 79 | ,excluded.y);.INSERT.INTO.t2(x,y |
18ffa0 | 29 20 53 45 4c 45 43 54 20 61 2c 62 20 46 52 4f 4d 20 74 33 20 57 48 45 52 45 20 74 72 75 65 0a | ).SELECT.a,b.FROM.t3.WHERE.true. |
18ffc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 78 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 79 | ..ON.CONFLICT(x).DO.UPDATE.SET.y |
18ffe0 | 3d 65 78 63 6c 75 64 65 64 2e 79 20 57 48 45 52 45 20 79 3c 65 78 63 6c 75 64 65 64 2e 79 3b 0a | =excluded.y.WHERE.y<excluded.y;. |
190000 | 0d 00 00 00 2a 01 13 00 1f 3b 1e 8b 1d c6 1d 01 1c 3c 1b 8f 1a e2 1a 44 19 62 18 94 18 07 17 39 | ....*....;.......<.....D.b.....9 |
190020 | 16 64 15 96 15 08 14 37 13 66 12 95 11 c4 11 28 10 94 10 00 0f 64 0e c8 0d f2 0d 56 0c 88 0b ba | .d.....7.f.....(.....d.....V.... |
190040 | 0b 18 0a 4a 09 7c 08 a5 08 07 07 42 06 6d 05 98 04 d1 04 13 03 54 02 9d 01 ca 01 13 00 00 00 00 | ...J.|.....B.m.......T.......... |
190060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
190080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1900a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1900c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1900e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
190100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 33 99 11 04 00 82 6b 43 52 45 41 54 | ....................3.....kCREAT |
190120 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
190140 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
190160 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
190180 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 20 2d 39 2e 2c | a2.ON.t4(a).WHERE.b>.instr(.-9., |
1901a0 | 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | 1)=2000;.INSERT.INTO.t4(a,b).VAL |
1901c0 | 55 45 53 28 35 30 2c 36 30 29 81 4f 99 10 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | UES(50,60).O.....#CREATE.TABLE.t |
1901e0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
190200 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
190220 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
190240 | 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 20 2d 31 31 2c 31 29 3d 32 30 30 30 3b 0a | a).WHERE.b>.instr(.-11,1)=2000;. |
190260 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
190280 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 99 | ).ON.CONFLICT(a).DO.NOTHING;..3. |
1902a0 | 0f 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | ....kCREATE.TABLE.t4(a.INT,.b.IN |
1902c0 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
1902e0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
190300 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.i |
190320 | 6e 73 74 72 28 20 27 61 27 2c 31 29 3d 32 30 30 30 3b 8a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | nstr(.'a',1)=2000;.INSERT.INTO.t |
190340 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3b 99 0e 04 00 82 7b 43 52 45 41 | 4(a,b).VALUES(50,60).;.....{CREA |
190360 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
190380 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
1903a0 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
1903c0 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 20 27 41 4e | 4a2.ON.t4(a).WHERE.b>.instr(.'AN |
1903e0 | 44 20 74 72 75 65 61 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | D.truea',1)=2000;.INSERT.INTO.t4 |
190400 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 99 0d 04 00 82 79 43 52 45 41 54 | (a,b).VALUES(50,60).:.....yCREAT |
190420 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
190440 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
190460 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
190480 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 20 27 41 4e 41 | a2.ON.t4(a).WHERE.b>.instr(.'ANA |
1904a0 | 4c 59 5a 45 61 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | LYZEa',1)=2000;.INSERT.INTO.t4(a |
1904c0 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 43 99 0c 04 00 83 0b 43 52 45 41 54 45 20 | ,b).VALUES(50,60).C......CREATE. |
1904e0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
190500 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
190520 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
190540 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 20 27 20 74 6f 74 61 | .ON.t4(a).WHERE.b>.instr(.'.tota |
190560 | 6c 5f 63 68 61 6e 67 65 73 28 29 61 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | l_changes()a',1)=2000;.INSERT.IN |
190580 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 51 99 0b 04 00 83 27 | TO.t4(a,b).VALUES(50,60).Q.....' |
1905a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
1905c0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
1905e0 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
190600 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 64 61 74 65 74 69 | EX.t4a2.ON.t4(a).WHERE.b>.dateti |
190620 | 6d 65 28 20 31 3d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | me(.1=11)=2000;.INSERT.INTO.t4(a |
190640 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
190660 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 99 0a 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..Q.....'CREATE.TABL |
190680 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
1906a0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
1906c0 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
1906e0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 64 61 74 65 74 69 6d 65 28 20 31 3d 31 31 29 3d 32 | t4(a).WHERE.b>.datetime(.1=11)=2 |
190700 | 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;.INSERT.INTO.t4(a,b).VALUES( |
190720 | 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 50,60).ON.CONFLICT(a).DO.NOTHING |
190740 | 3b 0a 81 41 99 09 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;..A......CREATE.TABLE.t4(a.INT, |
190760 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
190780 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 | 1.ON.t4(a).WHERE.b<1000;.CREATE. |
1907a0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
1907c0 | 20 62 3c 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | .b<=2000;REPLACE.INTO.t4(a,b).VA |
1907e0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
190800 | 54 48 49 4e 47 3b 0a 81 1a 99 08 04 00 82 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;........9CREATE.TABLE.t4(a |
190820 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
190840 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
190860 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
190880 | 57 48 45 52 45 20 62 3c 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 | WHERE.b<.json_remove(ALL)=2000;V |
1908a0 | 41 43 55 55 4d 81 53 99 07 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ACUUM.S.....+CREATE.TABLE.t4(a.I |
1908c0 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
1908e0 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
190900 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
190920 | 45 52 45 20 62 2f 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 66 62 27 29 3d 32 30 30 30 3b 0a 49 | ERE.b/.strftime(.'a%fb')=2000;.I |
190940 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
190960 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4a 99 06 | .ON.CONFLICT(a).DO.NOTHING;..J.. |
190980 | 04 00 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ....CREATE.TABLE.t4(a.INT,.b.INT |
1909a0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1909c0 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1909e0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 | .INDEX.t4a2.ON.t4(a).WHERE..[a]i |
190a00 | 6e 28 42 2c 41 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | n(B,A)=2000;.INSERT.INTO.t4(a,b) |
190a20 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
190a40 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 4a 99 05 04 00 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..J......CREATE.TABLE.t |
190a60 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
190a80 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
190aa0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
190ac0 | 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 42 2c 31 29 3d 32 30 30 30 3b 52 45 50 4c 41 43 | a).WHERE..[a]in(B,1)=2000;REPLAC |
190ae0 | 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | E.INTO.t4(a,b).VALUES(50,60).ON. |
190b00 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 1e 99 04 04 00 82 41 | CONFLICT(a).DO.NOTHING;........A |
190b20 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
190b40 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
190b60 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
190b80 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 42 2c | EX.t4a2.ON.t4(a).WHERE..[a]in(B, |
190ba0 | 31 29 3d 32 30 30 30 3b 52 45 49 4e 44 45 58 20 2f 2a 20 2a 2f 74 34 28 3b 0a 81 4a 99 03 04 00 | 1)=2000;REINDEX./*.*/t4(;..J.... |
190bc0 | 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | ..CREATE.TABLE.t4(a.INT,.b.INT); |
190be0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
190c00 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
190c20 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 | NDEX.t4a2.ON.t4(a).WHERE..[a]in( |
190c40 | 42 2c 31 29 3d 32 20 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | B,1)=2.00;.INSERT.INTO.t4(a,b).V |
190c60 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
190c80 | 4f 54 48 49 4e 47 3b 0a 81 4a 99 02 04 00 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..J......CREATE.TABLE.t4( |
190ca0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
190cc0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
190ce0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
190d00 | 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 3c 31 29 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 | .WHERE..[a]in(1<1)=2000;REPLACE. |
190d20 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
190d40 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 18 99 01 04 00 82 35 43 52 | NFLICT(a).DO.NOTHING;........5CR |
190d60 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
190d80 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
190da0 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
190dc0 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 2c 31 2c | .t4a2.ON.t4(a).WHERE..[a]in(1,1, |
190de0 | 67 6c 6f 62 28 31 2c 31 29 29 3d 32 30 30 30 3b 0a 49 81 52 99 00 04 00 83 29 43 52 45 41 54 45 | glob(1,1))=2000;.I.R.....)CREATE |
190e00 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
190e20 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
190e40 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
190e60 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 2c 31 29 41 4e 44 20 | 2.ON.t4(a).WHERE..[a]in(1,1)AND. |
190e80 | 74 72 75 65 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | true=2000;.INSERT.INTO.t4(a,b).V |
190ea0 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
190ec0 | 4f 54 48 49 4e 47 3b 0a 81 18 98 7f 04 00 82 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;........5CREATE.TABLE.t4( |
190ee0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
190f00 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
190f20 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
190f40 | 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 2c 31 20 67 6c 6f 62 28 31 2c 31 29 29 3d 32 30 30 | .WHERE..[a]in(1,1.glob(1,1))=200 |
190f60 | 30 3b 0a 49 81 18 98 7e 04 00 82 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | 0;.I...~...5CREATE.TABLE.t4(a.IN |
190f80 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
190fa0 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
190fc0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
190fe0 | 52 45 20 20 5b 61 5d 69 6e 28 31 2c 31 20 67 6c 6f 62 20 61 2c 62 29 29 3d 32 30 30 30 3b 0a 49 | RE..[a]in(1,1.glob.a,b))=2000;.I |
191000 | 81 10 98 7d 04 00 82 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | ...}...%CREATE.TABLE.t4(a.INT,.b |
191020 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
191040 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
191060 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.. |
191080 | 5b 61 5d 69 6e 28 31 2c 31 20 67 6c 6f 62 20 31 2c 31 29 29 81 10 98 7c 04 00 82 25 43 52 45 41 | [a]in(1,1.glob.1,1))...|...%CREA |
1910a0 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
1910c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
1910e0 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
191100 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 2c 20 22 61 22 | 4a2.ON.t4(a).WHERE..[a]in(1,."a" |
191120 | 2c 22 62 22 2c 31 29 29 81 18 98 7b 04 00 82 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | ,"b",1))...{...5CREATE.TABLE.t4( |
191140 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
191160 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
191180 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
1911a0 | 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 2c 20 20 22 61 22 2c 22 62 22 22 61 22 2c 22 62 22 | .WHERE..[a]in(1,.."a","b""a","b" |
1911c0 | 2c 31 29 29 81 4d 98 7a 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | ,1)).M.z....CREATE.TABLE.t4(a.IN |
1911e0 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
191200 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
191220 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
191240 | 52 45 20 20 5b 61 5d 69 6e 28 2b 2d 31 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | RE..[a]in(+-11,1)=2000;.INSERT.I |
191260 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
191280 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 98 79 04 00 83 1f 43 52 45 | FLICT(a).DO.NOTHING;..M.y....CRE |
1912a0 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
1912c0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
1912e0 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
191300 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 20 2f 2a 20 2a | t4a2.ON.t4(a).WHERE..[a]in(./*.* |
191320 | 2f 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | /)=2000;.INSERT.INTO.t4(a,b).VAL |
191340 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
191360 | 48 49 4e 47 3b 0a 81 4d 98 78 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..M.x....CREATE.TABLE.t4(a. |
191380 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
1913a0 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
1913c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
1913e0 | 48 45 52 45 20 20 5b 61 5d 69 6e 28 20 2d 31 31 2c 31 29 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 | HERE..[a]in(.-11,1)=2000;REPLACE |
191400 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
191420 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 98 77 04 00 83 1f 43 | ONFLICT(a).DO.NOTHING;..M.w....C |
191440 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
191460 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
191480 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1914a0 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 20 2d 31 | X.t4a2.ON.t4(a).WHERE..[a]in(.-1 |
1914c0 | 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | 1,1)=2000;.INSERT.INTO.t4(a,b).V |
1914e0 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
191500 | 4f 54 48 49 4e 47 3b 0a 81 0a 98 76 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;....v....CREATE.TABLE.t4( |
191520 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
191540 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
191560 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
191580 | 20 57 48 45 52 45 20 20 28 31 29 69 6e 28 29 2c 48 49 4e 47 3b 0a 81 4a 98 75 04 00 83 19 43 52 | .WHERE..(1)in(),HING;..J.u....CR |
1915a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
1915c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
1915e0 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
191600 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 27 61 27 69 6e 28 31 2c 31 29 | .t4a2.ON.t4(a).WHERE..'a'in(1,1) |
191620 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
191640 | 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
191660 | 4e 47 3b 0a 81 51 98 74 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..Q.t...'CREATE.TABLE.t4(a.IN |
191680 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
1916a0 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
1916c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
1916e0 | 52 45 20 20 27 2b 32 20 64 61 79 73 61 27 69 6e 28 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | RE..'+2.daysa'in(1,1)=2000;.INSE |
191700 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
191720 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4a 98 73 04 00 83 | .CONFLICT(a).DO.NOTHING;..J.s... |
191740 | 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | .CREATE.TABLE.t4(a.INT,.b.INT);. |
191760 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
191780 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1917a0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 27 20 27 69 6e 28 31 | DEX.t4a2.ON.t4(a).WHERE..'.'in(1 |
1917c0 | 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | ,1)=2000;.INSERT.INTO.t4(a,b).VA |
1917e0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
191800 | 54 48 49 4e 47 3b 0a 81 09 98 72 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;....r....CREATE.TABLE.t4(a |
191820 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
191840 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
191860 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 3f 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(?). |
191880 | 57 48 45 52 45 20 62 3e 3d 3a 30 30 30 3b 0a 49 4e 47 3b 0a 81 4a 98 71 04 00 83 19 43 52 45 41 | WHERE.b>=:000;.ING;..J.q....CREA |
1918a0 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
1918c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
1918e0 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 20 2f 2a 20 2a 2f 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE../*.*/.INDEX.t |
191900 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 20 5b 61 5d 69 6e 28 31 2c 31 29 3d 32 | 4a2.ON.t4(a).WHERE..[a]in(1,1)=2 |
191920 | 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;.INSERT.INTO.t4(a,b).VALUES( |
191940 | 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 50,60).ON.CONFLICT(a).DO.NOTHING |
191960 | 3b 0a 81 5e 98 70 04 00 83 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;..^.p...ACREATE.TABLE.t4(a.INT, |
191980 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
1919a0 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 32 30 30 31 2d 30 31 2d 30 | 1.ON.t4(a).WHERE.b<10002001-01-0 |
1919c0 | 31 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 1;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
1919e0 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 31 32 30 30 31 35 30 31 2d 30 31 29 | 4(a).WHERE.b>.lower(12001501-01) |
191a00 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
191a20 | 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
191a40 | 4e 47 3b 0a 81 1a 98 6f 04 00 82 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;....o...9CREATE.TABLE.t4(a.IN |
191a60 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
191a80 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 20 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<100.;.CREAT |
191aa0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
191ac0 | 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 | RE.b>.json_remove(ALL)=2000;VACU |
191ae0 | 55 4d 81 29 98 6e 04 00 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | UM.).n...WCREATE.TABLE.t4(a.INT, |
191b00 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
191b20 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 2e 45 30 3b 0a 43 52 45 41 54 45 20 | 1.ON.t4(a).WHERE.b<1.E0;.CREATE. |
191b40 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
191b60 | 20 62 3e 2e 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | .b>.2000;.INSERT.INTO.t4(a,b).VA |
191b80 | 4c 55 45 53 28 35 30 2c 36 30 29 a0 4f 4e 0a 81 29 98 6d 04 00 82 57 43 52 45 41 54 45 20 54 41 | LUES(50,60).ON..).m...WCREATE.TA |
191ba0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
191bc0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
191be0 | 31 2e 38 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1.80;.CREATE.UNIQUE.INDEX.t4a2.O |
191c00 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 2e 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | N.t4(a).WHERE.b>.2000;.INSERT.IN |
191c20 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 a0 4f 4e 0a 81 41 98 6c | TO.t4(a,b).VALUES(50,60).ON..A.l |
191c40 | 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ....CREATE.TABLE.t4(a.INT,.b.INT |
191c60 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
191c80 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 2e 25 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1.%0;.CREATE.UNIQUE |
191ca0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 | .INDEX.t4a2.ON.t4(a).WHERE.b>=20 |
191cc0 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
191ce0 | 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
191d00 | 0a 81 41 98 6b 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..A.k....CREATE.TABLE.t4(a.INT,. |
191d20 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
191d40 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 2e 25 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1.%0;.CREATE.U |
191d60 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
191d80 | 62 3e 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | b>=2000;.INSERT.INTO.t4(a,b).VAL |
191da0 | 55 45 53 28 35 2e 2c 36 30 29 a0 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(5.,60).ON.CONFLICT(a).DO.NOT |
191dc0 | 48 49 4e 47 3b 0a 81 41 98 6a 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..A.j....CREATE.TABLE.t4(a. |
191de0 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
191e00 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 2e 25 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1.%0;.CRE |
191e20 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
191e40 | 48 45 52 45 20 62 3e 3d 32 30 30 2e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | HERE.b>=200.;.INSERT.INTO.t4(a,b |
191e60 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
191e80 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2c 98 69 04 00 82 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..,.i...]CREATE.TABLE. |
191ea0 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
191ec0 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 2e 20 2d | INDEX.t4a1.ON.t4(a).WHERE.b<1..- |
191ee0 | 31 45 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 1E0;.CREATE.UNIQUE.INDEX.t4a2.ON |
191f00 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 2e 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | .t4(a).WHERE.b>.2000;.INSERT.INT |
191f20 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 a0 4f 4e 0a 81 41 98 68 04 | O.t4(a,b).VALUES(50,60).ON..A.h. |
191f40 | 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ...CREATE.TABLE.t4(a.INT,.b.INT) |
191f60 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
191f80 | 28 61 29 20 57 48 45 52 45 20 62 3c 2e 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<.000;.CREATE.UNIQUE. |
191fa0 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 2e 32 30 30 | INDEX.t4a2.ON.t4(a).WHERE.b>.200 |
191fc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
191fe0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
192000 | 0d 00 00 00 26 00 a0 00 1f 49 1e 92 1d bf 1d 04 1c 49 1b 95 1a de 1a 03 19 20 18 45 17 6a 16 8f | ....&....I.......I.........E.j.. |
192020 | 15 b4 14 dd 14 06 13 2f 12 54 11 5c 10 7d 0f a2 0e c1 0d da 0d 03 0c 26 0b 4f 0a 78 09 9d 08 c2 | ......./.T.\.}.........&.O.x.... |
192040 | 07 e7 07 10 06 35 05 56 04 7f 03 a8 02 d1 01 fa 01 4d 00 a0 00 00 00 00 00 00 00 00 00 00 00 00 | .....5.V.........M.............. |
192060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
192080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1920a0 | 81 29 99 37 04 00 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .).7...WCREATE.TABLE.t4(a.INT,.b |
1920c0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
1920e0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
192100 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
192120 | 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 20 2d 31 31 45 32 30 30 31 2d 30 31 | >.json_array_length(.-11E2001-01 |
192140 | 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 81 29 99 36 04 00 82 57 43 52 45 41 54 45 20 54 41 42 4c | -011)=2000;.I.).6...WCREATE.TABL |
192160 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
192180 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
1921a0 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
1921c0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 | t4(a).WHERE.b>.json_array_length |
1921e0 | 28 20 2d 31 31 45 32 30 26 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 81 53 99 35 04 00 | (.-11E20&1-01-011)=2000;.I.S.5.. |
192200 | 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .+CREATE.TABLE.t4(a.INT,.b.INT); |
192220 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
192240 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
192260 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e | NDEX.t4a2.ON.t4(a).WHERE.b>.json |
192280 | 5f 61 72 72 61 79 28 31 3c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | _array(1<1,1)=2000;.INSERT.INTO. |
1922a0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
1922c0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 34 04 00 83 2b 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..S.4...+CREATE. |
1922e0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
192300 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
192320 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
192340 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 27 | .ON.t4(a).WHERE.b>.json_array(.' |
192360 | a7 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | .a')=2000;.INSERT.INTO.t4(a,b).V |
192380 | 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
1923a0 | 4f 54 48 49 4e 47 3b 0a 81 53 99 33 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..S.3...+CREATE.TABLE.t4( |
1923c0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
1923e0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
192400 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
192420 | 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 27 a7 5c 27 29 3d 32 30 30 30 | .WHERE.b>.json_array(.'.\')=2000 |
192440 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
192460 | 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 60).ON.CONFLICT(a).DO.NOTHING;.. |
192480 | 53 99 32 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | S.2...+CREATE.TABLE.t4(a.INT,.b. |
1924a0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
1924c0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
1924e0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
192500 | 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 27 a7 01 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | .json_array(.'..')=2000;.INSERT. |
192520 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
192540 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5b 99 31 04 00 83 3b 43 52 | NFLICT(a).DO.NOTHING;..[.1...;CR |
192560 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
192580 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
1925a0 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
1925c0 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 | .t4a2.ON.t4(a).WHERE.b>.json_arr |
1925e0 | 61 79 28 20 27 20 22 61 22 2c 22 62 22 a7 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | ay(.'."a","b".a')=2000;.INSERT.I |
192600 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
192620 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 57 99 30 04 00 83 33 43 52 45 | FLICT(a).DO.NOTHING;..W.0...3CRE |
192640 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
192660 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
192680 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
1926a0 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 | t4a2.ON.t4(a).WHERE.b>.json_arra |
1926c0 | 79 28 20 20 6a 73 6f 6e 28 31 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | y(..json(1))=2000;.INSERT.INTO.t |
1926e0 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
192700 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 2f 04 00 83 2b 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..S./...+CREATE.T |
192720 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
192740 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
192760 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
192780 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 41 | ON.t4(a).WHERE.b>.json_array(..A |
1927a0 | 4c 4c 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | LL)=2000;.INSERT.INTO.t4(a,b).VA |
1927c0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
1927e0 | 54 48 49 4e 47 3b 0a 81 57 99 2e 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..W.....3CREATE.TABLE.t4(a |
192800 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
192820 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
192840 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
192860 | 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 61 20 22 61 22 27 29 3d 32 | WHERE.b>.json_array(..'a."a"')=2 |
192880 | 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;.INSERT.INTO.t4(a,b).VALUES( |
1928a0 | 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 50,60).ON.CONFLICT(a).DO.NOTHING |
1928c0 | 3b 0a 81 57 99 2d 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;..W.-...3CREATE.TABLE.t4(a.INT, |
1928e0 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
192900 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 | 1.ON.t4(a).WHERE.b<1000;.CREATE. |
192920 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
192940 | 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 61 20 22 5c 22 27 29 3d 32 30 30 30 3b 0a | .b>.json_array(..'a."\"')=2000;. |
192960 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
192980 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 57 99 | ).ON.CONFLICT(a).DO.NOTHING;..W. |
1929a0 | 2c 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | ,...3CREATE.TABLE.t4(a.INT,.b.IN |
1929c0 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
1929e0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
192a00 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a | E.INDEX.t4a2.ON.t4(a).WHERE.b>.j |
192a20 | 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 61 20 0d 61 22 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 | son_array(..'a..a"')=2000;.INSER |
192a40 | 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | T.INTO.t4(a,b).VALUES(50,60).ON. |
192a60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 2b 04 00 83 2b | CONFLICT(a).DO.NOTHING;..S.+...+ |
192a80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
192aa0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
192ac0 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
192ae0 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 | EX.t4a2.ON.t4(a).WHERE.b>.json_a |
192b00 | 72 72 61 79 28 20 20 27 5c 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | rray(..'\')=2000;.INSERT.INTO.t4 |
192b20 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
192b40 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 2a 04 00 83 2b 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..S.*...+CREATE.TA |
192b60 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
192b80 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
192ba0 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
192bc0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 5c | N.t4(a).WHERE.b>.json_array(..'\ |
192be0 | 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | ')=2000;.INSERT.INTO.t4(a,b).VAL |
192c00 | 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
192c20 | 48 49 4e 47 3b 0a 81 59 99 29 04 00 83 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..Y.)...7CREATE.TABLE.t4(a. |
192c40 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
192c60 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
192c80 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
192ca0 | 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 41 43 54 49 4f 4e 61 27 29 3d | HERE.b>.json_array(..'ACTIONa')= |
192cc0 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
192ce0 | 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
192d00 | 47 3b 0a 81 53 99 28 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..S.(...+CREATE.TABLE.t4(a.INT |
192d20 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
192d40 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
192d60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
192d80 | 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 22 27 29 3d 32 30 30 30 3b 0a 49 4e 53 | E.b>.json_array(..'"')=2000;.INS |
192da0 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
192dc0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 63 99 27 04 00 | N.CONFLICT(a).DO.NOTHING;..c.'.. |
192de0 | 83 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .KCREATE.TABLE.t4(a.INT,.b.INT); |
192e00 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
192e20 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
192e40 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e | NDEX.t4a2.ON.t4(a).WHERE.b>.json |
192e60 | 5f 61 72 72 61 79 28 20 20 27 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 61 27 29 3d 32 30 | _array(..'.datetime(1,1,1)a')=20 |
192e80 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
192ea0 | 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
192ec0 | 0a 81 5d 99 26 04 00 83 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..].&...?CREATE.TABLE.t4(a.INT,. |
192ee0 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
192f00 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1000;.CREATE.U |
192f20 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
192f40 | 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 20 63 68 61 6e 67 65 73 28 29 61 27 29 3d 32 | b>.json_array(..'.changes()a')=2 |
192f60 | 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;.INSERT.INTO.t4(a,b).VALUES( |
192f80 | 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 50,60).ON.CONFLICT(a).DO.NOTHING |
192fa0 | 3b 0a 81 57 99 25 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;..W.%...3CREATE.TABLE.t4(a.INT, |
192fc0 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
192fe0 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 | 1.ON.t4(a).WHERE.b<1000;.CREATE. |
193000 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
193020 | 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 20 22 61 22 61 27 29 3d 32 30 30 30 3b 0a | .b>.json_array(..'."a"a')=2000;. |
193040 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
193060 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5b 99 | ).ON.CONFLICT(a).DO.NOTHING;..[. |
193080 | 24 04 00 83 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | $...;CREATE.TABLE.t4(a.INT,.b.IN |
1930a0 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
1930c0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
1930e0 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a | E.INDEX.t4a2.ON.t4(a).WHERE.b>.j |
193100 | 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 20 22 61 22 2c 22 62 22 61 27 29 3d 32 30 30 30 3b 0a 49 | son_array(..'."a","b"a')=2000;.I |
193120 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
193140 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 74 99 23 | .ON.CONFLICT(a).DO.NOTHING;..t.# |
193160 | 04 00 83 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...mCREATE.TABLE.t4(a.INT,.b.INT |
193180 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1931a0 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1931c0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 | .INDEX.t4a2.ON.t4(a).WHERE.b>.js |
1931e0 | 6f 6e 5f 61 72 72 61 79 28 20 20 27 20 22 61 22 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f | on_array(..'."a".sqlite_compileo |
193200 | 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | ption_used(1)a')=2000;.INSERT.IN |
193220 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | TO.t4(a,b).VALUES(50,60).ON.CONF |
193240 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 57 99 22 04 00 83 33 43 52 45 41 | LICT(a).DO.NOTHING;..W."...3CREA |
193260 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
193280 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
1932a0 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
1932c0 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 | 4a2.ON.t4(a).WHERE.b>.json_array |
1932e0 | 28 20 20 27 20 0d 61 22 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | (..'..a"a')=2000;.INSERT.INTO.t4 |
193300 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
193320 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 21 04 00 83 2b 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..S.!...+CREATE.TA |
193340 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
193360 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
193380 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
1933a0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 09 | N.t4(a).WHERE.b>.json_array(..'. |
1933c0 | 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | ')=2000;.INSERT.INTO.t4(a,b).VAL |
1933e0 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
193400 | 48 49 4e 47 3b 0a 81 53 99 20 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..S.....+CREATE.TABLE.t4(a. |
193420 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
193440 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
193460 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
193480 | 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 01 27 29 3d 32 30 30 30 3b 0a | HERE.b>.json_array(..'.')=2000;. |
1934a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
1934c0 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 | ).ON.CONFLICT(a).DO.NOTHING;..S. |
1934e0 | 1f 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | ....+CREATE.TABLE.t4(a.INT,.b.IN |
193500 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
193520 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
193540 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a | E.INDEX.t4a2.ON.t4(a).WHERE.b>.j |
193560 | 73 6f 6e 5f 61 72 72 61 79 28 20 20 27 01 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | son_array(..'.')=2000;.INSERT.IN |
193580 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 | TO.t4(a,b).VALUES(50,60).ON.CONF |
1935a0 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 57 99 1e 04 00 83 33 43 52 45 41 | LICT(a).DO.NOTHING;..W.....3CREA |
1935c0 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
1935e0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
193600 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
193620 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 | 4a2.ON.t4(a).WHERE.b>.json_array |
193640 | 28 20 20 20 27 61 e8 03 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | (...'a..a')=2000;.INSERT.INTO.t4 |
193660 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
193680 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 57 99 1d 04 00 83 33 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..W.....3CREATE.TA |
1936a0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
1936c0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
1936e0 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
193700 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 20 27 | N.t4(a).WHERE.b>.json_array(...' |
193720 | 61 27 27 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | a''a')=2000;.INSERT.INTO.t4(a,b) |
193740 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
193760 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 57 99 1c 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..W.....3CREATE.TABLE.t |
193780 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1937a0 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
1937c0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
1937e0 | 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 20 27 61 27 27 5c 27 | a).WHERE.b>.json_array(...'a''\' |
193800 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
193820 | 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 | ES(50,60).ON.CONFLICT(a).DO.NOTH |
193840 | 49 4e 47 3b 0a 81 57 99 1b 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ING;..W.....3CREATE.TABLE.t4(a.I |
193860 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
193880 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
1938a0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
1938c0 | 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 20 27 61 27 27 01 27 29 3d 32 30 30 | ERE.b>.json_array(...'a''.')=200 |
1938e0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
193900 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
193920 | 81 5f 99 1a 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | ._.....CCREATE.TABLE.t4(a.INT,.b |
193940 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
193960 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
193980 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
1939a0 | 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 20 20 27 61 20 22 61 22 2c 22 62 22 27 27 61 27 29 3d | >.json_array(...'a."a","b"''a')= |
1939c0 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
1939e0 | 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
193a00 | 47 3b 0a 81 57 99 19 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..W.....3CREATE.TABLE.t4(a.INT |
193a20 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
193a40 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
193a60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
193a80 | 45 20 62 3e 20 6a 73 6f 6e 20 2f 2a 20 2a 2f 28 20 20 27 20 22 61 22 61 27 29 3d 32 30 30 30 3b | E.b>.json./*.*/(..'."a"a')=2000; |
193aa0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | .INSERT.INTO.t4(a,b).VALUES(50,6 |
193ac0 | 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 | 0).ON.CONFLICT(a).DO.NOTHING;..3 |
193ae0 | 99 18 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .....kCREATE.TABLE.t4(a.INT,.b.I |
193b00 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
193b20 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
193b40 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
193b60 | 69 6e 73 74 72 28 4e 55 4c 4c 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | instr(NULL,1)=2000;.INSERT.INTO. |
193b80 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 30 99 17 04 00 82 65 43 52 45 | t4(a,b).VALUES(50,60).0.....eCRE |
193ba0 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
193bc0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
193be0 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
193c00 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 41 2c 31 | t4a2.ON.t4(a).WHERE.b>.instr(A,1 |
193c20 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
193c40 | 45 53 28 35 30 2c 36 30 29 81 37 99 16 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | ES(50,60).7.....sCREATE.TABLE.t4 |
193c60 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
193c80 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
193ca0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
193cc0 | 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 31 2c 4e 55 4c 4c 20 2d 31 31 29 3d 32 30 30 | ).WHERE.b>.instr(1,NULL.-11)=200 |
193ce0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
193d00 | 2c 36 30 29 81 37 99 15 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | ,60).7.....sCREATE.TABLE.t4(a.IN |
193d20 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
193d40 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
193d60 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
193d80 | 52 45 20 62 3e 20 69 6e 73 74 72 28 31 2c 20 6a 73 6f 6e 28 31 29 29 3d 32 30 30 30 3b 0a 49 4e | RE.b>.instr(1,.json(1))=2000;.IN |
193da0 | 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 | SERT.INTO.t4(a,b).VALUES(50,60). |
193dc0 | 4f 99 14 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | O.....#CREATE.TABLE.t4(a.INT,.b. |
193de0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
193e00 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
193e20 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
193e40 | 20 69 6e 73 74 72 28 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | .instr(1,.-11)=2000;.INSERT.INTO |
193e60 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
193e80 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 33 99 13 04 00 82 6b 43 52 45 41 54 45 | CT(a).DO.NOTHING;..3.....kCREATE |
193ea0 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
193ec0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
193ee0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
193f00 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 31 2c 20 2d 31 31 | 2.ON.t4(a).WHERE.b>.instr(1,.-11 |
193f20 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
193f40 | 45 53 28 35 30 2c 36 30 29 81 33 99 12 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | ES(50,60).3.....kCREATE.TABLE.t4 |
193f60 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
193f80 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
193fa0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
193fc0 | 29 20 57 48 45 52 45 20 62 3e 20 69 6e 73 74 72 28 20 2d 39 31 2c 31 29 3d 32 30 30 30 3b 0a 49 | ).WHERE.b>.instr(.-91,1)=2000;.I |
193fe0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
194000 | 0d 00 00 00 2d 00 ae 00 1f 5a 1e ac 1d fe 1d 50 1c b1 1c 0f 1b 71 1a d3 19 fe 19 5c 18 b7 18 11 | ....-....Z.....P.....q.....\.... |
194020 | 17 65 16 b9 16 0d 15 5d 14 b1 14 09 13 59 12 ac 11 fe 11 52 10 a8 0f f9 0f 4c 0e a6 0e 03 0d 64 | .e.....].....Y.....R.....L.....d |
194040 | 0c cb 0c 2c 0b 85 0a d4 0a 35 09 9c 08 e1 08 0e 07 3b 06 68 05 99 04 ca 03 f9 03 28 02 57 01 86 | ...,.....5.......;.h.......(.W.. |
194060 | 00 ae 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
194080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1940a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 54 99 64 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 | ...............T.d...-CREATE.TAB |
1940c0 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
1940e0 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
194100 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
194120 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 20 6c 74 72 69 6d 28 29 2c 31 | .t4(a).WHERE.b>.lower(.ltrim(),1 |
194140 | 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | ))=2000;.INSERT.INTO.t4(a,b).VAL |
194160 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
194180 | 48 49 4e 47 3b 0a 81 4d 99 63 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..M.c....CREATE.TABLE.t4(a. |
1941a0 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
1941c0 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
1941e0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
194200 | 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | HERE.b>.lower(.-11)=2000;.INSERT |
194220 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
194240 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 99 62 04 00 83 1f 43 | ONFLICT(a).DO.NOTHING;..M.b....C |
194260 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
194280 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
1942a0 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1942c0 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 20 | X.t4a2.ON.t4(a).WHERE.b>.lower(. |
1942e0 | 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | -01)=2000;.INSERT.INTO.t4(a,b).V |
194300 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
194320 | 4f 54 48 49 4e 47 3b 0a 81 4d 99 61 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..M.a....CREATE.TABLE.t4( |
194340 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
194360 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
194380 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
1943a0 | 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 20 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | .WHERE.b>.lower(.-01)=2000;.INSE |
1943c0 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
1943e0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 99 60 04 00 83 | .CONFLICT(a).DO.NOTHING;..M.`... |
194400 | 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | .CREATE.TABLE.t4(a.INT,.b.INT);. |
194420 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
194440 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
194460 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 | DEX.t4a2.ON.t4(a).WHERE.b>.lower |
194480 | 28 20 2d 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | (.-.1)=2000;.INSERT.INTO.t4(a,b) |
1944a0 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
1944c0 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 4b 99 5f 04 00 83 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..K._....CREATE.TABLE.t |
1944e0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
194500 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
194520 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
194540 | 61 29 20 57 48 45 52 45 20 62 3e 20 6c 69 6b 65 6c 79 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | a).WHERE.b>.likely(1)=2000;.INSE |
194560 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
194580 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4b 99 5e 04 00 83 | .CONFLICT(a).DO.NOTHING;..K.^... |
1945a0 | 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | .CREATE.TABLE.t4(a.INT,.b.INT);. |
1945c0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1945e0 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
194600 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 65 6e 67 74 | DEX.t4a2.ON.t4(a).WHERE.b>.lengt |
194620 | 68 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | h(1)=2000;.INSERT.INTO.t4(a,b).V |
194640 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
194660 | 4f 54 48 49 4e 47 3b 0a 81 4f 99 5d 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..O.]...#CREATE.TABLE.t4( |
194680 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
1946a0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
1946c0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
1946e0 | 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 31 29 3d 32 30 30 30 3b 0a 49 4e | .WHERE.b>.json_valid(1)=2000;.IN |
194700 | 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 | SERT.INTO.t4(a,b).VALUES(50,60). |
194720 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 99 5c 04 | ON.CONFLICT(a).DO.NOTHING;..O.\. |
194740 | 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..#CREATE.TABLE.t4(a.INT,.b.INT) |
194760 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
194780 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
1947a0 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f | INDEX.t4a2.ON.t4(a).WHERE.b>.jso |
1947c0 | 6e 5f 76 61 6c 69 64 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 | n_valid(1)=2000;.INSERT.INTO.t4( |
1947e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
194800 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 99 5b 04 00 83 23 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..O.[...#CREATE.TAB |
194820 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
194840 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
194860 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
194880 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 3d 32 30 | .t4(a).WHERE.b>.json_test1(1)=20 |
1948a0 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
1948c0 | 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
1948e0 | 0a 81 37 99 5a 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..7.Z...sCREATE.TABLE.t4(a.INT,. |
194900 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
194920 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1000;.CREATE.U |
194940 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
194960 | 62 3e 20 6a 73 6f 6e 5f 74 65 73 74 31 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | b>.json_test1(1)=2000;.INSERT.IN |
194980 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 47 3b 0a 81 15 99 59 | TO.t4(a,b).VALUES(50,60).G;....Y |
1949a0 | 04 00 82 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | .../CREATE.TABLE.t4(a.INT,.b.INT |
1949c0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1949e0 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
194a00 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 | .INDEX.t4a2.ON.t4(a).WHERE.b>.js |
194a20 | 6f 6e 5f 73 65 74 28 31 3c 31 2c 31 29 3d 32 30 30 30 3b 0a 0a 81 1b 99 58 04 00 82 3b 43 52 45 | on_set(1<1,1)=2000;.....X...;CRE |
194a40 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
194a60 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
194a80 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
194aa0 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 73 65 74 28 | t4a2.ON.t4(a).WHERE.b>.json_set( |
194ac0 | 31 2c 41 2c 31 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 0a 0a 81 2d 99 57 04 00 82 5f 43 52 45 41 | 1,A,1)=2000;VACUUM...-.W..._CREA |
194ae0 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
194b00 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
194b20 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
194b40 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 73 65 74 28 31 | 4a2.ON.t4(a).WHERE.b>.json_set(1 |
194b60 | 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 20 67 6c 6f 62 28 31 2c 31 29 3d 32 30 | ,1,1)COLLATE.nocase.glob(1,1)=20 |
194b80 | 30 30 3b 0a 0a 81 23 99 56 04 00 82 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | 00;...#.V...KCREATE.TABLE.t4(a.I |
194ba0 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
194bc0 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
194be0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
194c00 | 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 73 65 74 28 31 2c 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 32 | ERE.b>.json_set(1,1,1)COLLATE.n2 |
194c20 | 30 30 31 2d 30 31 2d 30 31 3b 0a 0a 81 1b 99 55 04 00 82 3b 43 52 45 41 54 45 20 54 41 42 4c 45 | 001-01-01;.....U...;CREATE.TABLE |
194c40 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
194c60 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
194c80 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
194ca0 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 73 65 74 28 20 31 45 39 31 29 3d 32 30 | 4(a).WHERE.b>.json_set(.1E91)=20 |
194cc0 | 30 30 3b 56 41 43 55 55 4d 0a 0a 81 15 99 54 04 00 82 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | 00;VACUUM.....T.../CREATE.TABLE. |
194ce0 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
194d00 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
194d20 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
194d40 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 73 65 74 28 20 31 45 39 31 29 2d 32 30 30 | (a).WHERE.b>.json_set(.1E91)-200 |
194d60 | 30 3b 0a 0a 81 1b 99 53 04 00 82 3b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | 0;.....S...;CREATE.TABLE.t4(a.IN |
194d80 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
194da0 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
194dc0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
194de0 | 52 45 20 62 3e 20 6a 73 6f 6e 5f 73 65 74 28 20 31 45 31 31 29 3d 32 30 30 30 3b 56 41 43 55 55 | RE.b>.json_set(.1E11)=2000;VACUU |
194e00 | 4d 0a 0a 81 1f 99 52 04 00 82 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | M.....R...CCREATE.TABLE.t4(a.INT |
194e20 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
194e40 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
194e60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
194e80 | 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 70 6c 61 63 65 28 20 31 3d 31 31 29 3d 32 30 30 30 3b 56 41 | E.b>.json_replace(.1=11)=2000;VA |
194ea0 | 43 55 55 4d 0a 0a 81 22 99 51 04 00 82 49 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | CUUM...".Q...ICREATE.TABLE.t4(a. |
194ec0 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
194ee0 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
194f00 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
194f20 | 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 4f 52 20 66 61 6c 73 65 | HERE.b>.json_remove(ALL)OR.false |
194f40 | 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 29 99 50 04 00 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 | =2000;VACUUM.).P...WCREATE.TABLE |
194f60 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
194f80 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
194fa0 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
194fc0 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 | 4(a).WHERE.b>.json_remove(ALL)=2 |
194fe0 | 30 30 30 3b 53 41 56 45 50 4f 49 4e 54 0a 49 4e 53 3b 56 41 43 55 55 4d 0a 81 2b 99 4f 04 00 82 | 000;SAVEPOINT.INS;VACUUM..+.O... |
195000 | 5b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | [CREATE.TABLE.t4(a.INT,.b.INT);. |
195020 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
195040 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
195060 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f | DEX.t4a2.ON.t4(a).WHERE.b>.json_ |
195080 | 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 53 41 56 45 50 4f 49 4e 54 0a 49 4e 53 3b 52 | remove(ALL)=2000;SAVEPOINT.INS;R |
1950a0 | 4f 4c 4c 42 41 43 4b 0a 81 26 99 4e 04 00 82 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OLLBACK..&.N...QCREATE.TABLE.t4( |
1950c0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
1950e0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
195100 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
195120 | 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b | .WHERE.b>.json_remove(ALL)=2000; |
195140 | 53 41 56 45 50 4f 49 4e 54 0a 49 4e 53 3b 45 4e 44 0a 81 28 99 4d 04 00 82 55 43 52 45 41 54 45 | SAVEPOINT.INS;END..(.M...UCREATE |
195160 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
195180 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
1951a0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
1951c0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 | 2.ON.t4(a).WHERE.b>.json_remove( |
1951e0 | 41 4c 4c 29 3d 32 30 30 30 3b 53 41 56 45 50 4f 49 4e 54 0a 49 4e 53 3b 42 45 47 49 4e 0a 81 2a | ALL)=2000;SAVEPOINT.INS;BEGIN..* |
195200 | 99 4c 04 00 82 59 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .L...YCREATE.TABLE.t4(a.INT,.b.I |
195220 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
195240 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
195260 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
195280 | 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 53 41 56 45 50 4f 49 4e 54 0a | json_remove(ALL)=2000;SAVEPOINT. |
1952a0 | 49 4e 53 3b 41 4e 41 4c 59 5a 45 0a 81 29 99 4b 04 00 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 | INS;ANALYZE..).K...WCREATE.TABLE |
1952c0 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
1952e0 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
195300 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
195320 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 20 | 4(a).WHERE.b>.json_remove(ALL)=. |
195340 | 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 3b 56 41 43 55 55 4d 0a 81 2c 99 4a 04 00 82 | json_array(1,1,1);VACUUM..,.J... |
195360 | 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | ]CREATE.TABLE.t4(a.INT,.b.INT);. |
195380 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1953a0 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1953c0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f | DEX.t4a2.ON.t4(a).WHERE.b>.json_ |
1953e0 | 72 65 6d 6f 76 65 28 41 4c 4c 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 29 3d 32 30 | remove(ALL.strftime(1,1,1,1))=20 |
195400 | 30 30 3b 56 41 43 55 55 4d 81 24 99 49 04 00 82 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | 00;VACUUM.$.I...MCREATE.TABLE.t4 |
195420 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
195440 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
195460 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
195480 | 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 20 6c 69 6b 65 6c | ).WHERE.b>.json_remove(ALL.likel |
1954a0 | 79 28 31 29 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 28 99 48 04 00 82 55 43 52 45 41 54 45 20 | y(1))=2000;VACUUM.(.H...UCREATE. |
1954c0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
1954e0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
195500 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
195520 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 | .ON.t4(a).WHERE.b>.json_remove(A |
195540 | 4c 4c 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 3c 31 2c 31 29 29 3d 32 30 30 30 3b 0a 49 81 2c 99 | LL.json_array(1<1,1))=2000;.I.,. |
195560 | 47 04 00 82 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | G...]CREATE.TABLE.t4(a.INT,.b.IN |
195580 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
1955a0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
1955c0 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a | E.INDEX.t4a2.ON.t4(a).WHERE.b>.j |
1955e0 | 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 20 6a 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 | son_remove(ALL.json_array(1,1,1) |
195600 | 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 28 99 46 04 00 82 55 43 52 45 41 54 45 20 54 41 42 4c | )=2000;VACUUM.(.F...UCREATE.TABL |
195620 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
195640 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
195660 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
195680 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 20 6a | t4(a).WHERE.b>.json_remove(ALL.j |
1956a0 | 73 6f 6e 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 29 3d 32 30 30 30 3b 0a 49 81 28 99 45 04 00 82 | son_array(1,1,1))=2000;.I.(.E... |
1956c0 | 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | UCREATE.TABLE.t4(a.INT,.b.INT);. |
1956e0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
195700 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
195720 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f | DEX.t4a2.ON.t4(a).WHERE.b>.json_ |
195740 | 72 65 6d 6f 76 65 28 41 4c 4c 20 6a 73 6f 6e 5f 61 72 72 61 79 28 20 4e 55 4c 4c 29 29 3d 32 30 | remove(ALL.json_array(.NULL))=20 |
195760 | 30 30 3b 0a 49 81 28 99 44 04 00 82 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | 00;.I.(.D...UCREATE.TABLE.t4(a.I |
195780 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
1957a0 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
1957c0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
1957e0 | 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 20 6a 73 6f 6e 5f 61 72 72 61 | ERE.b>.json_remove(ALL.json_arra |
195800 | 79 28 20 20 27 61 27 29 29 3d 32 30 30 30 3b 0a 49 81 22 99 43 04 00 82 49 43 52 45 41 54 45 20 | y(..'a'))=2000;.I.".C...ICREATE. |
195820 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
195840 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
195860 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
195880 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 | .ON.t4(a).WHERE.b>.json_remove(A |
1958a0 | 4c 4c 20 6a 73 6f 6e 28 31 29 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 21 99 42 04 00 82 47 43 | LL.json(1))=2000;VACUUM.!.B...GC |
1958c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
1958e0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
195900 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
195920 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 | X.t4a2.ON.t4(a).WHERE.b>.json_re |
195940 | 6d 6f 76 65 28 41 4c 4c 20 61 62 73 28 31 29 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 1e 99 41 | move(ALL.abs(1))=2000;VACUUM...A |
195960 | 04 00 82 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...ACREATE.TABLE.t4(a.INT,.b.INT |
195980 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1959a0 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1959c0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 | .INDEX.t4a2.ON.t4(a).WHERE.b>.js |
1959e0 | 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 20 60 61 60 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 51 | on_remove(ALL.`a`)=2000;VACUUM.Q |
195a00 | 99 40 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .@...'CREATE.TABLE.t4(a.INT,.b.I |
195a20 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
195a40 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
195a60 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
195a80 | 6a 73 6f 6e 5f 70 61 74 63 68 28 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | json_patch(1,1)=2000;.INSERT.INT |
195aa0 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
195ac0 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 1a 99 3f 04 00 82 39 43 52 45 41 54 | ICT(a).DO.NOTHING;....?...9CREAT |
195ae0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
195b00 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
195b20 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
195b40 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 | a2.ON.t4(a).WHERE.b>.json_object |
195b60 | 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 1a 99 3e 04 00 82 39 43 52 45 41 54 45 20 | (ALL)=2000;VACUUM...>...9CREATE. |
195b80 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
195ba0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
195bc0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
195be0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 41 | .ON.t4(a).WHERE.b>.json_object(A |
195c00 | 4c 4c 29 3d 32 30 30 30 3b 0a 49 4e 53 3b 0a 81 1e 99 3d 04 00 82 41 43 52 45 41 54 45 20 54 41 | LL)=2000;.INS;....=...ACREATE.TA |
195c20 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
195c40 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
195c60 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
195c80 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 3c 31 | N.t4(a).WHERE.b>.json_object(1<1 |
195ca0 | 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 3b 0a 81 1b 99 3c 04 00 82 3b 43 52 45 41 54 45 20 | ,1,1)=2000;.INS;....<...;CREATE. |
195cc0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
195ce0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
195d00 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
195d20 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 65 78 74 72 61 63 74 28 | .ON.t4(a).WHERE.b>.json_extract( |
195d40 | 31 3c 31 29 3d 32 30 30 30 3b 0a 49 4e 47 3b 0a 81 2a 99 3b 04 00 82 59 43 52 45 41 54 45 20 54 | 1<1)=2000;.ING;..*.;...YCREATE.T |
195d60 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
195d80 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
195da0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
195dc0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e | ON.t4(a).WHERE.b>.json_array_len |
195de0 | 67 74 68 28 31 45 33 30 30 20 7c 7c 20 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 81 2a | gth(1E300.||.1-01-011)=2000;.I.* |
195e00 | 99 3a 04 00 82 59 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .:...YCREATE.TABLE.t4(a.INT,.b.I |
195e20 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
195e40 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
195e60 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
195e80 | 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 45 32 30 37 20 7c 7c 20 31 2d 30 31 2d | json_array_length(1E207.||.1-01- |
195ea0 | 30 31 31 29 3d 32 30 30 30 3b 0a 49 81 2a 99 39 04 00 82 59 43 52 45 41 54 45 20 54 41 42 4c 45 | 011)=2000;.I.*.9...YCREATE.TABLE |
195ec0 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
195ee0 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
195f00 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
195f20 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 | 4(a).WHERE.b>.json_array_length( |
195f40 | 31 45 32 30 30 20 7c 7c 20 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 81 22 99 38 04 00 | 1E200.||.1-01-011)=2000;.I.".8.. |
195f60 | 82 49 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .ICREATE.TABLE.t4(a.INT,.b.INT); |
195f80 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
195fa0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
195fc0 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e | NDEX.t4a2.ON.t4(a).WHERE.b>.json |
195fe0 | 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 3c 31 29 3d 32 30 30 30 3b 44 45 54 41 43 48 0a 49 | _array_length(1<1)=2000;DETACH.I |
196000 | 0d 00 00 00 26 00 5f 00 1f 28 1e 50 1d 78 1c a0 1b c8 1a dc 1a 0e 19 80 18 af 17 d7 17 04 16 31 | ....&._..(.P.x.................1 |
196020 | 15 5d 14 8a 13 bc 12 ee 12 1e 11 4e 10 6f 0f 88 0e b1 0d da 0d 00 0c 26 0b 44 0a 6d 09 96 08 bf | .].........N.o.........&.D.m.... |
196040 | 07 e8 07 11 06 37 05 59 04 85 03 ab 02 d1 01 f7 01 39 00 5f 00 00 00 00 00 00 00 00 00 00 00 81 | .....7.Y.........9._............ |
196060 | 56 9a 0a 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | V.....1CREATE.TABLE.t4(a.INT,.b. |
196080 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
1960a0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
1960c0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
1960e0 | 20 72 6f 75 6e 64 28 30 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | .round(0,2001-01-011)=2000;.INSE |
196100 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
196120 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3a 9a 09 04 00 82 | .CONFLICT(a).DO.NOTHING;..:..... |
196140 | 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | yCREATE.TABLE.t4(a.INT,.b.INT);. |
196160 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
196180 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1961a0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 | DEX.t4a2.ON.t4(a).WHERE.b>.round |
1961c0 | 28 30 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | (0,2001-01-011)=2000;.INSERT.INT |
1961e0 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 56 9a 08 04 00 83 31 43 | O.t4(a,b).VALUES(50,60).V.....1C |
196200 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
196220 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
196240 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
196260 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 20 | X.t4a2.ON.t4(a).WHERE.b>.round(. |
196280 | 72 6f 75 6e 64 28 31 2c 31 29 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | round(1,1),1)=2000;.INSERT.INTO. |
1962a0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
1962c0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 56 9a 07 04 00 83 31 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..V.....1CREATE. |
1962e0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
196300 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
196320 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
196340 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 20 6c 74 72 69 6d 28 | .ON.t4(a).WHERE.b>.round(.ltrim( |
196360 | 31 2c 31 29 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | 1,1),1)=2000;.INSERT.INTO.t4(a,b |
196380 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
1963a0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 56 9a 06 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..V.....1CREATE.TABLE. |
1963c0 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
1963e0 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
196400 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
196420 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 20 6c 74 72 69 6d 28 31 2c 31 29 2c 31 | (a).WHERE.b>.round(.ltrim(1,1),1 |
196440 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
196460 | 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 | ES(50,60).ON.CONFLICT(a).DO.NOTH |
196480 | 49 4e 47 3b 0a 81 50 9a 05 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ING;..P.....%CREATE.TABLE.t4(a.I |
1964a0 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
1964c0 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
1964e0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
196500 | 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 39 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | ERE.b>.replace(9,1,1)=2000;.INSE |
196520 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
196540 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5a 9a 04 04 00 83 | .CONFLICT(a).DO.NOTHING;..Z..... |
196560 | 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | 9CREATE.TABLE.t4(a.INT,.b.INT);. |
196580 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1965a0 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1965c0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 | DEX.t4a2.ON.t4(a).WHERE.b>.repla |
1965e0 | 63 65 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | ce(2001-01-011,1,1)=2000;.INSERT |
196600 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
196620 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 56 9a 03 04 00 83 31 43 | ONFLICT(a).DO.NOTHING;..V.....1C |
196640 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
196660 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
196680 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1966a0 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 | X.t4a2.ON.t4(a).WHERE.b>.replace |
1966c0 | 28 31 31 31 31 2c 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (1111,1,.-11)=2000;.INSERT.INTO. |
1966e0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
196700 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 02 04 00 83 2b 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..S.....+CREATE. |
196720 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
196740 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
196760 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
196780 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 20 | .ON.t4(a).WHERE.b>.replace(1,1,. |
1967a0 | 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | -11)=2000;.INSERT.INTO.t4(a,b).V |
1967c0 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
1967e0 | 4f 54 48 49 4e 47 3b 0a 81 53 9a 01 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..S.....+CREATE.TABLE.t4( |
196800 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
196820 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
196840 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
196860 | 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 20 2d 31 31 29 3d 32 30 30 30 | .WHERE.b>.replace(1,1,.-11)=2000 |
196880 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
1968a0 | 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 60).ON.CONFLICT(a).DO.NOTHING;.. |
1968c0 | 53 9a 00 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | S.....+CREATE.TABLE.t4(a.INT,.b. |
1968e0 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
196900 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
196920 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
196940 | 20 72 65 70 6c 61 63 65 28 31 2c 31 2c 20 27 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | .replace(1,1,.'a')=2000;.INSERT. |
196960 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
196980 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 7f 04 00 83 2b 43 52 | NFLICT(a).DO.NOTHING;..S.....+CR |
1969a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
1969c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
1969e0 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
196a00 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 | .t4a2.ON.t4(a).WHERE.b>.replace( |
196a20 | 31 2c 31 2c 20 27 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | 1,1,.'a')=2000;.INSERT.INTO.t4(a |
196a40 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
196a60 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 7e 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..S.~...+CREATE.TABL |
196a80 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
196aa0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
196ac0 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
196ae0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 31 2c 20 2d 31 31 2c 31 29 | t4(a).WHERE.b>.replace(1,.-11,1) |
196b00 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
196b20 | 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
196b40 | 4e 47 3b 0a 81 5e 99 7d 04 00 83 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..^.}...ACREATE.TABLE.t4(a.IN |
196b60 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
196b80 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
196ba0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
196bc0 | 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 20 72 6f 75 6e 64 28 31 2c 31 29 20 2d 31 31 2c 31 2c | RE.b>.replace(.round(1,1).-11,1, |
196be0 | 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | 1)=2000;.INSERT.INTO.t4(a,b).VAL |
196c00 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
196c20 | 48 49 4e 47 3b 0a 81 56 99 7c 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..V.|...1CREATE.TABLE.t4(a. |
196c40 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
196c60 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
196c80 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
196ca0 | 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 20 31 31 31 2c 31 2c 20 2d 31 31 29 3d 32 30 30 | HERE.b>.replace(.111,1,.-11)=200 |
196cc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
196ce0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
196d00 | 81 56 99 7b 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .V.{...1CREATE.TABLE.t4(a.INT,.b |
196d20 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
196d40 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
196d60 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
196d80 | 3e 20 72 65 70 6c 61 63 65 28 20 31 31 31 2c 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 | >.replace(.111,1,.-11)=2000;.INS |
196da0 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
196dc0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 7a 04 00 | N.CONFLICT(a).DO.NOTHING;..S.z.. |
196de0 | 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .+CREATE.TABLE.t4(a.INT,.b.INT); |
196e00 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
196e20 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
196e40 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c | NDEX.t4a2.ON.t4(a).WHERE.b>.repl |
196e60 | 61 63 65 28 20 2d 39 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ace(.-91,1,1)=2000;.INSERT.INTO. |
196e80 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
196ea0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 99 79 04 00 83 2b 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..S.y...+CREATE. |
196ec0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
196ee0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
196f00 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
196f20 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 20 27 61 27 2c | .ON.t4(a).WHERE.b>.replace(.'a', |
196f40 | 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | 1,1)=2000;.INSERT.INTO.t4(a,b).V |
196f60 | 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
196f80 | 4f 54 48 49 4e 47 3b 0a 81 63 99 78 04 00 83 4b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..c.x...KCREATE.TABLE.t4( |
196fa0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
196fc0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
196fe0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
197000 | 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 20 27 20 74 6f 74 61 6c 5f 63 68 61 6e 67 | .WHERE.b>.replace(.'.total_chang |
197020 | 65 73 28 29 61 27 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | es()a',1,1)=2000;.INSERT.INTO.t4 |
197040 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
197060 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5b 99 77 04 00 83 3b 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..[.w...;CREATE.TA |
197080 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
1970a0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
1970c0 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
1970e0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 65 70 6c 61 63 65 28 20 27 20 62 6d 32 35 | N.t4(a).WHERE.b>.replace(.'.bm25 |
197100 | 28 31 29 61 27 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 | (1)a',1,1)=2000;.INSERT.INTO.t4( |
197120 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
197140 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c 99 76 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..L.v....CREATE.TAB |
197160 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
197180 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
1971a0 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
1971c0 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 71 75 6f 74 65 28 31 2e 31 29 3d 32 30 30 30 3b | .t4(a).WHERE.b>.quote(1.1)=2000; |
1971e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | .INSERT.INTO.t4(a,b).VALUES(50,6 |
197200 | 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c | 0).ON.CONFLICT(a).DO.NOTHING;..L |
197220 | 99 75 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .u....CREATE.TABLE.t4(a.INT,.b.I |
197240 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
197260 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
197280 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
1972a0 | 71 75 6f 74 65 28 31 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 | quote(1.1)=2000;.INSERT.INTO.t4( |
1972c0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
1972e0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4a 99 74 04 00 83 19 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..J.t....CREATE.TAB |
197300 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
197320 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
197340 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
197360 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 71 75 6f 74 65 28 31 29 3d 32 30 30 30 3b 0a 49 | .t4(a).WHERE.b>.quote(1)=2000;.I |
197380 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
1973a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4a 99 73 | .ON.CONFLICT(a).DO.NOTHING;..J.s |
1973c0 | 04 00 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ....CREATE.TABLE.t4(a.INT,.b.INT |
1973e0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
197400 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
197420 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 71 75 | .INDEX.t4a2.ON.t4(a).WHERE.b>.qu |
197440 | 6f 74 65 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | ote(1)=2000;.INSERT.INTO.t4(a,b) |
197460 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
197480 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 99 72 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..O.r...#CREATE.TABLE.t |
1974a0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1974c0 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
1974e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
197500 | 61 29 20 57 48 45 52 45 20 62 3e 20 71 75 6f 74 65 28 31 20 7c 7c 20 31 29 3d 32 30 30 30 3b 0a | a).WHERE.b>.quote(1.||.1)=2000;. |
197520 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
197540 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 50 99 | ).ON.CONFLICT(a).DO.NOTHING;..P. |
197560 | 71 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | q...%CREATE.TABLE.t4(a.INT,.b.IN |
197580 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
1975a0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
1975c0 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 71 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.q |
1975e0 | 75 6f 74 65 28 31 20 7c 7c 20 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | uote(1.||..1)=2000;.INSERT.INTO. |
197600 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
197620 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 99 70 04 00 83 23 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..O.p...#CREATE. |
197640 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
197660 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
197680 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
1976a0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 71 75 6f 74 65 28 31 20 2d 31 2e 31 29 | .ON.t4(a).WHERE.b>.quote(1.-1.1) |
1976c0 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
1976e0 | 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
197700 | 4e 47 3b 0a 81 4f 99 6f 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..O.o...#CREATE.TABLE.t4(a.IN |
197720 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
197740 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
197760 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
197780 | 52 45 20 62 3e 20 71 75 6f 74 65 28 31 20 2d 31 2e 31 29 2d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | RE.b>.quote(1.-1.1)-2000;.INSERT |
1977a0 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
1977c0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 99 6e 04 00 83 2d 43 | ONFLICT(a).DO.NOTHING;..T.n...-C |
1977e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
197800 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
197820 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
197840 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 71 75 6f 74 65 28 20 | X.t4a2.ON.t4(a).WHERE.b>.quote(. |
197860 | 6c 74 72 69 6d 28 39 2c 31 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | ltrim(9,1))=2000;.INSERT.INTO.t4 |
197880 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
1978a0 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 99 6d 04 00 83 1f 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..M.m....CREATE.TA |
1978c0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
1978e0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
197900 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
197920 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6e 75 6c 6c 69 66 28 31 2c 31 29 3d 32 30 30 | N.t4(a).WHERE.b>.nullif(1,1)=200 |
197940 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
197960 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
197980 | 81 0a 99 6c 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | ...l....CREATE.TABLE.t4(a.INT,.b |
1979a0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
1979c0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
1979e0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
197a00 | 3e 20 6d 69 6e 28 29 2c 48 49 4e 47 3b 0a 81 4a 99 6b 04 00 83 19 43 52 45 41 54 45 20 54 41 42 | >.min(),HING;..J.k....CREATE.TAB |
197a20 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
197a40 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
197a60 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
197a80 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6d 61 78 28 41 2c 31 29 3d 32 3d 30 30 3b 52 45 | .t4(a).WHERE.b>.max(A,1)=2=00;RE |
197aa0 | 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | PLACE.INTO.t4(a,b).VALUES(50,60) |
197ac0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 68 99 6a | .ON.CONFLICT(a).DO.NOTHING;..h.j |
197ae0 | 04 00 83 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...UCREATE.TABLE.t4(a.INT,.b.INT |
197b00 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
197b20 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
197b40 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f | .INDEX.t4a2.ON.t4(a).WHERE.b>.lo |
197b60 | 77 65 72 28 31 32 30 32 30 30 31 2d 30 31 2d 30 31 30 31 32 30 30 31 2d 30 31 2d 30 31 2d 30 31 | wer(1202001-01-01012001-01-01-01 |
197b80 | 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | -01)=2000;.INSERT.INTO.t4(a,b).V |
197ba0 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
197bc0 | 4f 54 48 49 4e 47 3b 0a 81 54 99 69 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..T.i...-CREATE.TABLE.t4( |
197be0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
197c00 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
197c20 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
197c40 | 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 31 32 30 30 31 35 30 31 2d 30 31 29 3d 32 30 30 | .WHERE.b>.lower(12001501-01)=200 |
197c60 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
197c80 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
197ca0 | 81 54 99 68 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .T.h...-CREATE.TABLE.t4(a.INT,.b |
197cc0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
197ce0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
197d00 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
197d20 | 3e 20 6c 6f 77 65 72 28 31 2e 30 30 31 35 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 | >.lower(1.001501-01)=2000;.INSER |
197d40 | 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | T.INTO.t4(a,b).VALUES(50,60).ON. |
197d60 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 99 67 04 00 83 2d | CONFLICT(a).DO.NOTHING;..T.g...- |
197d80 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
197da0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
197dc0 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
197de0 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 | EX.t4a2.ON.t4(a).WHERE.b>.lower( |
197e00 | 20 6c 74 72 69 6d 28 39 2c 31 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | .ltrim(9,1))=2000;.INSERT.INTO.t |
197e20 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
197e40 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 99 66 04 00 83 2d 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..T.f...-CREATE.T |
197e60 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
197e80 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
197ea0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
197ec0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 20 6c 74 72 69 6d 28 31 | ON.t4(a).WHERE.b>.lower(.ltrim(1 |
197ee0 | 2c 31 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | ,1))=2000;.INSERT.INTO.t4(a,b).V |
197f00 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
197f20 | 4f 54 48 49 4e 47 3b 0a 81 54 99 65 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..T.e...-CREATE.TABLE.t4( |
197f40 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
197f60 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
197f80 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
197fa0 | 20 57 48 45 52 45 20 62 3e 20 6c 6f 77 65 72 28 20 6c 74 72 69 6d 28 31 2c 31 29 29 3d 32 30 30 | .WHERE.b>.lower(.ltrim(1,1))=200 |
197fc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
197fe0 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
198000 | 0d 00 00 00 29 00 c3 00 1f 30 1e 60 1d b1 1c e1 1c 32 1b 83 1a d4 1a 25 19 55 18 6c 17 8e 16 ba | ....)....0.`.....2.....%.U.l.... |
198020 | 16 03 15 45 14 91 13 d3 13 09 12 4b 11 8d 10 cf 10 1b 0f 67 0e 97 0d f3 0d 2b 0c 6d 0b af 0a f1 | ...E.......K.......g.....+.m.... |
198040 | 0a 33 09 75 08 b3 07 f5 07 37 06 79 05 bb 04 fd 04 23 03 50 02 7d 01 a0 00 c3 00 00 00 00 00 00 | .3.u.....7.y.....#.P.}.......... |
198060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
198080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1980a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1980c0 | 00 00 00 81 59 9a 33 04 00 83 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | ....Y.3...7CREATE.TABLE.t4(a.INT |
1980e0 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
198100 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
198120 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
198140 | 45 20 62 3e 20 72 74 72 69 6d 28 31 2c 20 2d 32 30 30 31 2d 30 31 2d 30 31 31 2e 29 3d 32 30 30 | E.b>.rtrim(1,.-2001-01-011.)=200 |
198160 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
198180 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
1981a0 | 81 59 9a 32 04 00 83 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .Y.2...7CREATE.TABLE.t4(a.INT,.b |
1981c0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
1981e0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
198200 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
198220 | 3e 20 72 74 72 69 6d 28 31 2c 20 2d 31 2e 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a | >.rtrim(1,.-1.2001-01-01)=2000;. |
198240 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
198260 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 9a | ).ON.CONFLICT(a).DO.NOTHING;..O. |
198280 | 31 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | 1...#CREATE.TABLE.t4(a.INT,.b.IN |
1982a0 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
1982c0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
1982e0 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.r |
198300 | 74 72 69 6d 28 31 2c 20 2d 31 2e 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | trim(1,.-1.)=2000;.INSERT.INTO.t |
198320 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
198340 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 9a 30 04 00 83 23 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..O.0...#CREATE.T |
198360 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
198380 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
1983a0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
1983c0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 74 72 69 6d 28 31 2c 20 2d 31 2e 29 3d | ON.t4(a).WHERE.b>.rtrim(1,.-1.)= |
1983e0 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
198400 | 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
198420 | 47 3b 0a 81 56 9a 2f 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..V./...1CREATE.TABLE.t4(a.INT |
198440 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
198460 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
198480 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
1984a0 | 45 20 62 3e 20 72 6f 75 6e 64 28 32 30 30 31 2d 30 31 2d 30 31 31 2c 31 29 3d 32 30 30 30 3b 0a | E.b>.round(2001-01-011,1)=2000;. |
1984c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
1984e0 | 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3a 9a | ).ON.CONFLICT(a).DO.NOTHING;..:. |
198500 | 2e 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | ....yCREATE.TABLE.t4(a.INT,.b.IN |
198520 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
198540 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
198560 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.r |
198580 | 6f 75 6e 64 28 31 45 32 30 30 36 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | ound(1E2006-01-011)=2000;.INSERT |
1985a0 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 2d 04 | .INTO.t4(a,b).VALUES(50,60).:.-. |
1985c0 | 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..yCREATE.TABLE.t4(a.INT,.b.INT) |
1985e0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
198600 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
198620 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 | INDEX.t4a2.ON.t4(a).WHERE.b>.rou |
198640 | 6e 64 28 31 45 32 30 30 32 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | nd(1E2002-01-011)=2000;.INSERT.I |
198660 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 2c 04 00 82 | NTO.t4(a,b).VALUES(50,60).:.,... |
198680 | 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | yCREATE.TABLE.t4(a.INT,.b.INT);. |
1986a0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1986c0 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1986e0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 | DEX.t4a2.ON.t4(a).WHERE.b>.round |
198700 | 28 31 45 32 30 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 8a 49 4e 53 45 52 54 20 49 4e 54 | (1E2001-01-011)=2000;.INSERT.INT |
198720 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 2b 04 00 82 79 43 | O.t4(a,b).VALUES(50,60).:.+...yC |
198740 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
198760 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
198780 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1987a0 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 | X.t4a2.ON.t4(a).WHERE.b>.round(1 |
1987c0 | 45 32 30 30 31 2d 30 31 2c 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | E2001-01,011)=2000;.INSERT.INTO. |
1987e0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 2a 04 00 82 79 43 52 45 | t4(a,b).VALUES(50,60).:.*...yCRE |
198800 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
198820 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
198840 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
198860 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 | t4a2.ON.t4(a).WHERE.b>.round(1E2 |
198880 | 30 30 2f 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | 00/-01-011)=2000;.INSERT.INTO.t4 |
1988a0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3e 9a 29 04 00 83 01 43 52 45 41 54 | (a,b).VALUES(50,60).>.)....CREAT |
1988c0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
1988e0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
198900 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
198920 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 30 30 | a2.ON.t4(a).WHERE.b>.round(1E200 |
198940 | 20 7c 7c 20 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | .||.1-01-011)=2000;.INSERT.INTO. |
198960 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 28 04 00 82 79 43 52 45 | t4(a,b).VALUES(50,60).:.(...yCRE |
198980 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
1989a0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
1989c0 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
1989e0 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 | t4a2.ON.t4(a).WHERE.b>.round(1E2 |
198a00 | 30 30 20 7c 7c 20 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | 00.||.-011)=2000;.INSERT.INTO.t4 |
198a20 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 27 04 00 82 79 43 52 45 41 54 | (a,b).VALUES(50,60).:.'...yCREAT |
198a40 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
198a60 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
198a80 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
198aa0 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 30 2f | a2.ON.t4(a).WHERE.b>.round(1E20/ |
198ac0 | 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | 1-01-011)=2000;.INSERT.INTO.t4(a |
198ae0 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 26 04 00 82 79 43 52 45 41 54 45 20 | ,b).VALUES(50,60).:.&...yCREATE. |
198b00 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
198b20 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
198b40 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
198b60 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 30 2d 30 31 | .ON.t4(a).WHERE.b>.round(1E20-01 |
198b80 | 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | -011)=2000;.INSERT.T.INTO.t4(a,b |
198ba0 | 29 20 56 41 4c 55 45 53 28 35 30 18 36 30 29 81 3a 9a 25 04 00 82 79 43 52 45 41 54 45 20 54 41 | ).VALUES(50.60).:.%...yCREATE.TA |
198bc0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
198be0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
198c00 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
198c20 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 30 26 31 2d 30 31 | N.t4(a).WHERE.b>.round(1E20&1-01 |
198c40 | 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | -011)=2000;.INSERT.INTO.t4(a,b). |
198c60 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 24 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c | VALUES(50,60).:.$...yCREATE.TABL |
198c80 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
198ca0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
198cc0 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
198ce0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 45 32 30 20 7c 7c 20 31 2d 30 | t4(a).WHERE.b>.round(1E20.||.1-0 |
198d00 | 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | 11)=2000;.INSERT.INTO.t4(a,b).VA |
198d20 | 4c 55 45 53 28 35 30 2c 36 30 29 81 44 9a 23 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | LUES(50,60).D.#....CREATE.TABLE. |
198d40 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
198d60 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
198d80 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
198da0 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 32 30 30 31 2d 30 31 2d 30 31 2c 32 | (a).WHERE.b>.round(12001-01-01,2 |
198dc0 | 30 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | 001-01-011)=2000;.INSERT.INTO.t4 |
198de0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 20 9a 22 04 00 82 45 43 52 45 41 54 | (a,b).VALUES(50,60)..."...ECREAT |
198e00 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
198e20 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
198e40 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
198e60 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2f 30 29 3d | a2.ON.t4(a).WHERE.b>.round(1/0)= |
198e80 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2f 81 4c 9a 21 04 00 83 1d 43 | 2000;.INSERT.INTO.t4(a/.L.!....C |
198ea0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
198ec0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
198ee0 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
198f00 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 | X.t4a2.ON.t4(a).WHERE.b>.round(1 |
198f20 | 2f 30 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | /0)=2000;.INSERT.INTO.t4(a,b).VA |
198f40 | 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
198f60 | 54 48 49 4e 47 3b 0a 81 30 9a 20 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..0.....eCREATE.TABLE.t4(a |
198f80 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
198fa0 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
198fc0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
198fe0 | 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 39 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | WHERE.b>.round(1,9)=2000;.INSERT |
199000 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 30 9a 1f 04 | .INTO.t4(a,b).VALUES(50,60).0... |
199020 | 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..eCREATE.TABLE.t4(a.INT,.b.INT) |
199040 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
199060 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
199080 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 | INDEX.t4a2.ON.t4(a).WHERE.b>.rou |
1990a0 | 6e 64 28 31 2c 38 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | nd(1,8)=2000;.INSERT.INTO.t4(a,b |
1990c0 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 1e 04 00 82 79 43 52 45 41 54 45 20 54 41 | ).VALUES(50,60).:.....yCREATE.TA |
1990e0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
199100 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
199120 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
199140 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 32 30 30 31 2e 30 31 | N.t4(a).WHERE.b>.round(1,2001.01 |
199160 | 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | -011)=2000;.INSERT.INTO.t4(a,b). |
199180 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 1d 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c | VALUES(50,60).:.....yCREATE.TABL |
1991a0 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
1991c0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
1991e0 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
199200 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 32 30 30 31 2d 30 31 2d 30 | t4(a).WHERE.b>.round(1,2001-01-0 |
199220 | 31 31 29 20 7c 7c 20 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | 11).||.0;.INSERT.INTO.t4(a,b).VA |
199240 | 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 1c 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 | LUES(50,60).:.....yCREATE.TABLE. |
199260 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
199280 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
1992a0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
1992c0 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 32 30 30 2f 2d 30 31 2d 30 31 31 | (a).WHERE.b>.round(1,200/-01-011 |
1992e0 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
199300 | 45 53 28 35 30 2c 36 30 29 81 46 9a 1b 04 00 83 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | ES(50,60).F......CREATE.TABLE.t4 |
199320 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
199340 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
199360 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
199380 | 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 32 30 30 20 7c 7c 20 7a 65 72 6f 62 6c | ).WHERE.b>.round(1,200.||.zerobl |
1993a0 | 6f 62 28 31 29 20 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | ob(1).-011)=2000;.INSERT.INTO.t4 |
1993c0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9a 1a 04 00 82 79 43 52 45 41 54 | (a,b).VALUES(50,60).:.....yCREAT |
1993e0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
199400 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
199420 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
199440 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 32 30 30 | a2.ON.t4(a).WHERE.b>.round(1,200 |
199460 | 20 7c 7c 20 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | .||.-011)=2000;.INSERT.INTO.t4(a |
199480 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 30 9a 19 04 00 82 65 43 52 45 41 54 45 20 | ,b).VALUES(50,60).0.....eCREATE. |
1994a0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
1994c0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
1994e0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
199500 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 31 29 26 32 2e | .ON.t4(a).WHERE.b>.round(1,1)&2. |
199520 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
199540 | 30 2c 36 30 29 81 3a 9a 18 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | 0,60).:.....yCREATE.TABLE.t4(a.I |
199560 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
199580 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
1995a0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
1995c0 | 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 20 68 65 78 28 31 29 20 2d 31 31 29 3d 32 30 30 30 | ERE.b>.round(1,.hex(1).-11)=2000 |
1995e0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
199600 | 36 30 29 81 33 9a 17 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | 60).3.....kCREATE.TABLE.t4(a.INT |
199620 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
199640 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
199660 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
199680 | 45 20 62 3e 20 72 6f 75 6e 64 28 31 2c 20 27 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | E.b>.round(1,.'a')=2000;.INSERT. |
1996a0 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 50 9a 16 04 00 | INTO.t4(a,b).VALUES(50,60).P.... |
1996c0 | 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .%CREATE.TABLE.t4(a.INT,.b.INT); |
1996e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
199700 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
199720 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e | NDEX.t4a2.ON.t4(a).WHERE.b>.roun |
199740 | 64 28 31 20 7c 7c 20 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 | d(1.||..1)=2000;.INSERT.INTO.t4( |
199760 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
199780 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5a 9a 15 04 00 83 39 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..Z.....9CREATE.TAB |
1997a0 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
1997c0 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
1997e0 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
199800 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 20 7c 20 68 65 78 28 31 29 | .t4(a).WHERE.b>.round(1.|.hex(1) |
199820 | 7c 4e 4f 54 20 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c | |NOT..1)=2000;.INSERT.INTO.t4(a, |
199840 | 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | b).VALUES(50,60).ON.CONFLICT(a). |
199860 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 65 9a 14 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..e.....OCREATE.TABLE |
199880 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
1998a0 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
1998c0 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
1998e0 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 31 20 43 4f 4c 4c 41 54 45 20 6e 6f | 4(a).WHERE.b>.round(1.COLLATE.no |
199900 | 63 61 73 65 7c 20 68 65 78 28 31 29 7c 20 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | case|.hex(1)|..1)=2000;.INSERT.I |
199920 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
199940 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c 9a 13 04 00 83 1d 43 52 45 | FLICT(a).DO.NOTHING;..L......CRE |
199960 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
199980 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
1999a0 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
1999c0 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 39 | t4a2.ON.t4(a).WHERE.b>.round(0,9 |
1999e0 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
199a00 | 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 | ES(50,60).ON.CONFLICT(a).DO.NOTH |
199a20 | 49 4e 47 3b 0a 81 2b 9a 12 04 00 82 5b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ING;..+.....[CREATE.TABLE.t4(a.I |
199a40 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
199a60 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
199a80 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
199aa0 | 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 38 29 3d 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 7e 4e 55 4c | ERE.b>.round(0,8)=~~~~~~~~~~~NUL |
199ac0 | 4c 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 47 3b 0a 81 2b 9a 11 04 00 82 5b 43 52 45 41 | L;.INSERT.INTO.t4G;..+.....[CREA |
199ae0 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
199b00 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
199b20 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
199b40 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 38 29 | 4a2.ON.t4(a).WHERE.b>.round(0,8) |
199b60 | 3d 7e 7e 7e 7e 7e 7e 7e 61 7e 7e 7e 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | =~~~~~~~a~~~2000;.INSERT.INTO.t4 |
199b80 | 47 3b 0a 81 2b 9a 10 04 00 82 5b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..+.....[CREATE.TABLE.t4(a.INT |
199ba0 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
199bc0 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
199be0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
199c00 | 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 38 29 3d 7e 7e 7e 7e 7e 7e 7e 42 7e 7e 7e 32 30 30 30 3b | E.b>.round(0,8)=~~~~~~~B~~~2000; |
199c20 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 47 3b 0a 81 2b 9a 0f 04 00 82 5b 43 52 45 41 54 45 | .INSERT.INTO.t4G;..+.....[CREATE |
199c40 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
199c60 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
199c80 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
199ca0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 38 29 3d 7e | 2.ON.t4(a).WHERE.b>.round(0,8)=~ |
199cc0 | 7e 7e 7e 7e 7e 61 7e 7e 7e 7e 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 47 3b | ~~~~~a~~~~2000;.INSERT.INTO.t4G; |
199ce0 | 0a 81 4c 9a 0e 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..L......CREATE.TABLE.t4(a.INT,. |
199d00 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
199d20 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1000;.CREATE.U |
199d40 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
199d60 | 62 3e 20 72 6f 75 6e 64 28 30 2c 38 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | b>.round(0,8)=2000;.INSERT.INTO. |
199d80 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
199da0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 2b 9a 0d 04 00 82 5b 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..+.....[CREATE. |
199dc0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
199de0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
199e00 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
199e20 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 38 29 2d 7e 7e | .ON.t4(a).WHERE.b>.round(0,8)-~~ |
199e40 | 7e 7e 7e 7e 7e 7e 7e 7e 7e 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 47 3b 0a | ~~~~~~~~~2000;.INSERT.INTO.t4G;. |
199e60 | 81 4c 9a 0c 04 00 83 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .L......CREATE.TABLE.t4(a.INT,.b |
199e80 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
199ea0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
199ec0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
199ee0 | 3e 20 72 6f 75 6e 64 28 30 2c 37 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | >.round(0,7)=2000;.INSERT.INTO.t |
199f00 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
199f20 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4c 9a 0b 04 00 83 1d 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..L......CREATE.T |
199f40 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
199f60 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
199f80 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
199fa0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 72 6f 75 6e 64 28 30 2c 34 29 3d 32 30 30 | ON.t4(a).WHERE.b>.round(0,4)=200 |
199fc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
199fe0 | 2c 36 30 29 3b 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60);ON.CONFLICT(a).DO.NOTHING;. |
19a000 | 0d 01 4a 00 26 00 69 00 1f 29 1e 52 1d 6d 1c 90 1b b7 1a e0 1a 09 19 32 18 5b 17 84 16 ad 15 d6 | ..J.&.i..).R.m.........2.[...... |
19a020 | 14 ff 14 28 13 51 12 7a 11 a3 10 cc 0f f5 0f 1e 0e 47 0d 70 0c 99 0b c2 0a eb 0a 14 09 3d 08 66 | ...(.Q.z.........G.p.........=.f |
19a040 | 07 8f 06 b8 05 e1 05 35 04 89 03 e7 03 06 02 2f 01 50 00 69 00 00 00 00 00 00 00 00 00 00 00 00 | .......5......./.P.i............ |
19a060 | 00 00 00 00 00 00 00 00 00 81 5d 9a 59 04 00 83 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | ..........].Y...?CREATE.TABLE.t4 |
19a080 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19a0a0 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19a0c0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19a0e0 | 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 74 72 69 6d 28 31 2c 31 29 20 20 | ).WHERE.b>.strftime(.trim(1,1).. |
19a100 | 2f 2a 20 2a 2f 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | /*.*/)=2000;.INSERT.INTO.t4(a,b) |
19a120 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
19a140 | 20 4e 4f 54 48 49 4e 47 3b 0a 00 00 00 06 04 00 81 5b 9a 58 04 00 83 3b 43 52 45 41 54 45 20 54 | .NOTHING;........[.X...;CREATE.T |
19a160 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
19a180 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
19a1a0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
19a1c0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 6a 73 6f 6e | ON.t4(a).WHERE.b>.strftime(.json |
19a1e0 | 28 31 29 20 20 2f 2a 20 2a 2f 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | (1)../*.*/)=2000;.INSERT.INTO.t4 |
19a200 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
19a220 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 57 04 00 83 2b 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..S.W...+CREATE.TA |
19a240 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
19a260 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
19a280 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
19a2a0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 68 65 78 28 31 | N.t4(a).WHERE.b>.strftime(.hex(1 |
19a2c0 | 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | ))=2000;.INSERT.INTO.t4(a,b).VAL |
19a2e0 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
19a300 | 48 49 4e 47 3b 0a 81 5d 9a 56 04 00 83 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..].V...?CREATE.TABLE.t4(a. |
19a320 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
19a340 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
19a360 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
19a380 | 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 64 61 74 65 28 31 2c 31 2c 31 29 2f 2a 20 | HERE.b>.strftime(.date(1,1,1)/*. |
19a3a0 | 2a 2f 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | */)=2000;.INSERT.INTO.t4(a,b).VA |
19a3c0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
19a3e0 | 54 48 49 4e 47 3b 0a 81 1e 9a 55 04 00 82 41 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;....U...ACREATE.TABLE.t4(a |
19a400 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19a420 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19a440 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19a460 | 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 27 43 4f 4c 4c 41 54 45 27 62 27 | WHERE.b>.strftime(.'a'COLLATE'b' |
19a480 | 29 3d 32 3d 20 31 3d 31 0a 81 28 9a 54 04 00 82 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | )=2=.1=1..(.T...UCREATE.TABLE.t4 |
19a4a0 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19a4c0 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19a4e0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19a500 | 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 27 43 4f 4c 4c 41 54 45 27 | ).WHERE.b>.strftime(.'a'COLLATE' |
19a520 | 62 27 20 67 6c 6f 62 28 31 2c 31 29 29 3d 32 3d 30 30 3b 3b 0a 81 28 9a 53 04 00 82 55 43 52 45 | b'.glob(1,1))=2=00;;..(.S...UCRE |
19a540 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
19a560 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
19a580 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
19a5a0 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 | t4a2.ON.t4(a).WHERE.b>.strftime( |
19a5c0 | 20 27 61 27 43 4f 4c 4c 41 54 45 27 62 27 20 67 6c 6f 62 28 31 2c 31 29 29 3d 32 30 30 30 3b 3b | .'a'COLLATE'b'.glob(1,1))=2000;; |
19a5e0 | 0a 81 53 9a 52 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..S.R...+CREATE.TABLE.t4(a.INT,. |
19a600 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
19a620 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1000;.CREATE.U |
19a640 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
19a660 | 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 26 a7 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 | b>.strftime(.'a&.b')=2000;.INSER |
19a680 | 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | T.INTO.t4(a,b).VALUES(50,60).ON. |
19a6a0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 51 04 00 83 2b | CONFLICT(a).DO.NOTHING;..S.Q...+ |
19a6c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
19a6e0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
19a700 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
19a720 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 | EX.t4a2.ON.t4(a).WHERE.b>.strfti |
19a740 | 6d 65 28 20 27 61 25 c9 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | me(.'a%.b')=2000;.INSERT.INTO.t4 |
19a760 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
19a780 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 50 04 00 83 2b 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..S.P...+CREATE.TA |
19a7a0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
19a7c0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
19a7e0 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
19a800 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 77 62 | N.t4(a).WHERE.b>.strftime(.'a%wb |
19a820 | 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | ')=2000;.INSERT.INTO.t4(a,b).VAL |
19a840 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
19a860 | 48 49 4e 47 3b 0a 81 53 9a 4f 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..S.O...+CREATE.TABLE.t4(a. |
19a880 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
19a8a0 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
19a8c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
19a8e0 | 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 77 62 27 29 3d 32 30 30 30 3b 0a | HERE.b>.strftime(.'a%wb')=2000;. |
19a900 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
19a920 | 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a | ).ON.CONFLICT(a).DO.NOTHING;..S. |
19a940 | 4e 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | N...+CREATE.TABLE.t4(a.INT,.b.IN |
19a960 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
19a980 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
19a9a0 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.s |
19a9c0 | 74 72 66 74 69 6d 65 28 20 27 61 25 73 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | trftime(.'a%sb')=2000;.INSERT.IN |
19a9e0 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | TO.t4(a,b).VALUES(50,60).ON.CONF |
19aa00 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 4d 04 00 83 2b 43 52 45 41 | LICT(a).DO.NOTHING;..S.M...+CREA |
19aa20 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
19aa40 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
19aa60 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
19aa80 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 | 4a2.ON.t4(a).WHERE.b>.strftime(. |
19aaa0 | 27 61 25 73 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | 'a%sb')=2000;.INSERT.INTO.t4(a,b |
19aac0 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
19aae0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 4c 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..S.L...+CREATE.TABLE. |
19ab00 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
19ab20 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
19ab40 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
19ab60 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 6d 62 27 29 3d 32 | (a).WHERE.b>.strftime(.'a%mb')=2 |
19ab80 | 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;.INSERT.INTO.t4(a,b).VALUES( |
19aba0 | 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | 50,60).ON.CONFLICT(a).DO.NOTHING |
19abc0 | 3b 0a 81 53 9a 4b 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;..S.K...+CREATE.TABLE.t4(a.INT, |
19abe0 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
19ac00 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 | 1.ON.t4(a).WHERE.b<1000;.CREATE. |
19ac20 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
19ac40 | 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 6d 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | .b>.strftime(.'a%mb')=2000;.INSE |
19ac60 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
19ac80 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 4a 04 00 83 | .CONFLICT(a).DO.NOTHING;..S.J... |
19aca0 | 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | +CREATE.TABLE.t4(a.INT,.b.INT);. |
19acc0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
19ace0 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
19ad00 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 | DEX.t4a2.ON.t4(a).WHERE.b>.strft |
19ad20 | 69 6d 65 28 20 27 61 25 6a 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ime(.'a%jb')=2000;.INSERT.INTO.t |
19ad40 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
19ad60 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 49 04 00 83 2b 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..S.I...+CREATE.T |
19ad80 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
19ada0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
19adc0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
19ade0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 6a | ON.t4(a).WHERE.b>.strftime(.'a%j |
19ae00 | 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | b')=2000;.INSERT.INTO.t4(a,b).VA |
19ae20 | 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
19ae40 | 54 48 49 4e 47 3b 0a 81 53 9a 48 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..S.H...+CREATE.TABLE.t4(a |
19ae60 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19ae80 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19aea0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19aec0 | 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 66 62 27 29 3d 32 30 30 30 3b | WHERE.b>.strftime(.'a%fb')=2000; |
19aee0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | .INSERT.INTO.t4(a,b).VALUES(50,6 |
19af00 | 30 29 3b 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 | 0);ON.CONFLICT(a).DO.NOTHING;..S |
19af20 | 9a 47 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .G...+CREATE.TABLE.t4(a.INT,.b.I |
19af40 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
19af60 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
19af80 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
19afa0 | 73 74 72 66 74 69 6d 65 28 20 27 61 25 64 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | strftime(.'a%db')=2000;.INSERT.I |
19afc0 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
19afe0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 46 04 00 83 2b 43 52 45 | FLICT(a).DO.NOTHING;..S.F...+CRE |
19b000 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
19b020 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
19b040 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
19b060 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 | t4a2.ON.t4(a).WHERE.b>.strftime( |
19b080 | 20 27 61 25 59 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c | .'a%Yb')=2000;.INSERT.INTO.t4(a, |
19b0a0 | 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | b).VALUES(50,60).ON.CONFLICT(a). |
19b0c0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 45 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..S.E...+CREATE.TABLE |
19b0e0 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
19b100 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
19b120 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
19b140 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 59 62 27 29 3d | 4(a).WHERE.b>.strftime(.'a%Yb')= |
19b160 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
19b180 | 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
19b1a0 | 47 3b 0a 81 53 9a 44 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..S.D...+CREATE.TABLE.t4(a.INT |
19b1c0 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
19b1e0 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
19b200 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
19b220 | 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 57 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 | E.b>.strftime(.'a%Wb')=2000;.INS |
19b240 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
19b260 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 43 04 00 | N.CONFLICT(a).DO.NOTHING;..S.C.. |
19b280 | 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .+CREATE.TABLE.t4(a.INT,.b.INT); |
19b2a0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
19b2c0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
19b2e0 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 | NDEX.t4a2.ON.t4(a).WHERE.b>.strf |
19b300 | 74 69 6d 65 28 20 27 61 25 57 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | time(.'a%Wb')=2000;.INSERT.INTO. |
19b320 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
19b340 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 42 04 00 83 2b 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..S.B...+CREATE. |
19b360 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
19b380 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
19b3a0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
19b3c0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 | .ON.t4(a).WHERE.b>.strftime(.'a% |
19b3e0 | 53 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | Sb')=2000;.INSERT.INTO.t4(a,b).V |
19b400 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
19b420 | 4f 54 48 49 4e 47 3b 0a 81 53 9a 41 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..S.A...+CREATE.TABLE.t4( |
19b440 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
19b460 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
19b480 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
19b4a0 | 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 53 62 27 29 3d 32 30 30 30 | .WHERE.b>.strftime(.'a%Sb')=2000 |
19b4c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
19b4e0 | 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 60).ON.CONFLICT(a).DO.NOTHING;.. |
19b500 | 53 9a 40 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | S.@...+CREATE.TABLE.t4(a.INT,.b. |
19b520 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
19b540 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
19b560 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
19b580 | 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 4d 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | .strftime(.'a%Mb')=2000;.INSERT. |
19b5a0 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
19b5c0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 3f 04 00 83 2b 43 52 | NFLICT(a).DO.NOTHING;..S.?...+CR |
19b5e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
19b600 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
19b620 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
19b640 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 | .t4a2.ON.t4(a).WHERE.b>.strftime |
19b660 | 28 20 27 61 25 4d 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | (.'a%Mb')=2000;.INSERT.INTO.t4(a |
19b680 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
19b6a0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 3e 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..S.>...+CREATE.TABL |
19b6c0 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
19b6e0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
19b700 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
19b720 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 4a 62 27 29 | t4(a).WHERE.b>.strftime(.'a%Jb') |
19b740 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
19b760 | 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
19b780 | 4e 47 3b 0a 81 53 9a 3d 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..S.=...+CREATE.TABLE.t4(a.IN |
19b7a0 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
19b7c0 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
19b7e0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
19b800 | 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 4a 62 27 29 3d 32 30 30 30 3b 0a 49 4e | RE.b>.strftime(.'a%Jb')=2000;.IN |
19b820 | 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 | SERT.INTO.t4(a,b).VALUES(50,60). |
19b840 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 3c 04 | ON.CONFLICT(a).DO.NOTHING;..S.<. |
19b860 | 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..+CREATE.TABLE.t4(a.INT,.b.INT) |
19b880 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
19b8a0 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
19b8c0 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 | INDEX.t4a2.ON.t4(a).WHERE.b>.str |
19b8e0 | 66 74 69 6d 65 28 20 27 61 25 49 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ftime(.'a%Ib')=2000;.INSERT.INTO |
19b900 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
19b920 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 3b 04 00 83 2b 43 52 45 41 54 45 | CT(a).DO.NOTHING;..S.;...+CREATE |
19b940 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
19b960 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
19b980 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
19b9a0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 | 2.ON.t4(a).WHERE.b>.strftime(.'a |
19b9c0 | 25 49 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | %Ib')=2000;.INSERT.INTO.t4(a,b). |
19b9e0 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | VALUES(50,60).ON.CONFLICT(a).DO. |
19ba00 | 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 3a 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | NOTHING;..S.:...+CREATE.TABLE.t4 |
19ba20 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19ba40 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19ba60 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19ba80 | 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 48 62 27 29 3d 32 30 30 | ).WHERE.b>.strftime(.'a%Hb')=200 |
19baa0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
19bac0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
19bae0 | 81 53 9a 39 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .S.9...+CREATE.TABLE.t4(a.INT,.b |
19bb00 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
19bb20 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
19bb40 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
19bb60 | 3e 20 73 74 72 66 74 69 6d 65 28 20 27 61 25 48 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | >.strftime(.'a%Hb')=2000;.INSERT |
19bb80 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
19bba0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 55 9a 38 04 00 83 2f 43 | ONFLICT(a).DO.NOTHING;..U.8.../C |
19bbc0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
19bbe0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
19bc00 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
19bc20 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d | X.t4a2.ON.t4(a).WHERE.b>.strftim |
19bc40 | 65 28 20 27 61 25 25 59 49 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | e(.'a%%YIb')=2000;.INSERT.INTO.t |
19bc60 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
19bc80 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 59 9a 37 04 00 83 37 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..Y.7...7CREATE.T |
19bca0 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
19bcc0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
19bce0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
19bd00 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 41 43 54 | ON.t4(a).WHERE.b>.strftime(.'ACT |
19bd20 | 49 4f 4e 61 27 27 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | IONa''b')=2000;.INSERT.INTO.t4(a |
19bd40 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
19bd60 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 61 9a 36 04 00 83 47 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..a.6...GCREATE.TABL |
19bd80 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
19bda0 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
19bdc0 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
19bde0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 27 20 63 6f 61 6c 65 | t4(a).WHERE.b>.strftime(.'.coale |
19be00 | 73 63 65 28 31 2c 31 29 61 27 27 62 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | sce(1,1)a''b')=2000;.INSERT.INTO |
19be20 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
19be40 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 35 04 00 83 2b 43 52 45 41 54 45 | CT(a).DO.NOTHING;..S.5...+CREATE |
19be60 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
19be80 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
19bea0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
19bec0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 20 2f | 2.ON.t4(a).WHERE.b>.strftime(../ |
19bee0 | 2a 20 2a 2f 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | *.*/)=2000;.INSERT.INTO.t4(a,b). |
19bf00 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | VALUES(50,60).ON.CONFLICT(a).DO. |
19bf20 | 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 34 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | NOTHING;..S.4...+CREATE.TABLE.t4 |
19bf40 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19bf60 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19bf80 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19bfa0 | 29 20 57 48 45 52 45 20 62 3e 20 73 74 72 66 74 69 6d 65 28 20 20 2f 2a 20 2a 2f 29 3d 32 30 30 | ).WHERE.b>.strftime(../*.*/)=200 |
19bfc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
19bfe0 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
19c000 | 0d 00 00 00 26 00 b7 00 1f 1f 1e 49 1d 8b 1c cd 1b f7 1b 39 1a 71 19 9a 18 c3 17 ec 17 16 16 3c | ....&......I.......9.q.........< |
19c020 | 15 69 14 93 13 af 12 cb 11 e7 11 25 10 67 0f 91 0e d3 0d fd 0d 2a 0c 57 0b 84 0a bc 09 dc 09 06 | .i.........%.g.......*.W........ |
19c040 | 08 33 07 60 06 9b 05 c5 04 f3 04 14 03 3f 02 67 01 8f 00 b7 00 00 00 00 00 00 00 00 00 00 00 00 | .3.`.........?.g................ |
19c060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
19c080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
19c0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 54 9a 7f 04 00 83 2d 43 | ........................T.....-C |
19c0c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
19c0e0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
19c100 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
19c120 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 20 2d | X.t4a2.ON.t4(a).WHERE.b>.time(.- |
19c140 | 31 31 20 7c 7c 20 2e 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | 11.||..1,1)=2000;.INSERT.INTO.t4 |
19c160 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
19c180 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 9a 7e 04 00 83 2d 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..T.~...-CREATE.TA |
19c1a0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
19c1c0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
19c1e0 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
19c200 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 20 2d 31 31 20 7c 7c 20 2e 31 | N.t4(a).WHERE.b>.time(.-11.||..1 |
19c220 | 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | ,1)=2000;.INSERT.INTO.t4(a,b).VA |
19c240 | 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
19c260 | 54 48 49 4e 47 3b 0a 81 54 9a 7d 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..T.}...-CREATE.TABLE.t4(a |
19c280 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19c2a0 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19c2c0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19c2e0 | 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 20 2d 2e 31 20 7c 7c 20 2e 31 2c 31 29 3d 32 30 30 30 | WHERE.b>.time(.-.1.||..1,1)=2000 |
19c300 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
19c320 | 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 60).ON.CONFLICT(a).DO.NOTHING;.. |
19c340 | 51 9a 7c 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | Q.|...'CREATE.TABLE.t4(a.INT,.b. |
19c360 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
19c380 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
19c3a0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
19c3c0 | 20 74 69 6d 65 28 20 27 4e 4f 54 62 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | .time(.'NOTb',1)=2000;.INSERT.IN |
19c3e0 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | TO.t4(a,b).VALUES(50,60).ON.CONF |
19c400 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5b 9a 7b 04 00 83 3b 43 52 45 41 | LICT(a).DO.NOTHING;..[.{...;CREA |
19c420 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
19c440 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
19c460 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
19c480 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 20 27 32 30 30 | 4a2.ON.t4(a).WHERE.b>.time(.'200 |
19c4a0 | 31 2d 30 31 2d 30 31 61 27 27 62 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 1-01-01a''b',1)=2000;.INSERT.INT |
19c4c0 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
19c4e0 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 9a 7a 04 00 83 21 43 52 45 41 54 | ICT(a).DO.NOTHING;..N.z...!CREAT |
19c500 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
19c520 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
19c540 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
19c560 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 32 30 30 31 | a2.ON.t4(a).WHERE.b>.substr(2001 |
19c580 | 2d 30 31 2d 30 31 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a | -01-011,2001-01-011,.-11)=2000;. |
19c5a0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
19c5c0 | 29 00 47 3b 0a 81 52 9a 79 04 00 83 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ).G;..R.y...)CREATE.TABLE.t4(a.I |
19c5e0 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
19c600 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
19c620 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
19c640 | 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 45 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e | ERE.b>.substr(1E1,.-11)=2000;.IN |
19c660 | 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 | SERT.INTO.t4(a,b).VALUES(50,60). |
19c680 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 9a 78 04 | ON.CONFLICT(a).DO.NOTHING;..A.x. |
19c6a0 | 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ...CREATE.TABLE.t4(a.INT,.b.INT) |
19c6c0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
19c6e0 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
19c700 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 | INDEX.t4a2.ON.t4(a).WHERE.b>.sub |
19c720 | 73 74 72 28 31 32 30 30 31 2d 30 31 2d 30 31 2c 20 2d 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 | str(12001-01-01,.-1)=2000;.INSER |
19c740 | 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 47 3b 0a | T.INTO.t4(a,b).VALUES(50,60).G;. |
19c760 | 81 4f 9a 77 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .O.w...#CREATE.TABLE.t4(a.INT,.b |
19c780 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
19c7a0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
19c7c0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
19c7e0 | 3e 20 73 75 62 73 74 72 28 31 2f 30 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | >.substr(1/0,1)=2000;.INSERT.INT |
19c800 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
19c820 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 9a 76 04 00 83 23 43 52 45 41 54 | ICT(a).DO.NOTHING;..O.v...#CREAT |
19c840 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
19c860 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
19c880 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
19c8a0 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2f 30 2c | a2.ON.t4(a).WHERE.b>.substr(1/0, |
19c8c0 | 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | 1)=2000;.INSERT.INTO.t4(a,b).VAL |
19c8e0 | 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
19c900 | 48 49 4e 47 3b 0a 81 52 9a 75 04 00 83 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..R.u...)CREATE.TABLE.t4(a. |
19c920 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
19c940 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
19c960 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
19c980 | 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2e 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 | HERE.b>.substr(1.1,.-11)=2000;.I |
19c9a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
19c9c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5c 9a 74 | .ON.CONFLICT(a).DO.NOTHING;..\.t |
19c9e0 | 04 00 83 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...=CREATE.TABLE.t4(a.INT,.b.INT |
19ca00 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
19ca20 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
19ca40 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 | .INDEX.t4a2.ON.t4(a).WHERE.b>.su |
19ca60 | 62 73 74 72 28 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 | bstr(1,2001-01-011,.-11)=2000;.I |
19ca80 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
19caa0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 44 9a 73 | .ON.CONFLICT(a).DO.NOTHING;..D.s |
19cac0 | 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ....CREATE.TABLE.t4(a.INT,.b.INT |
19cae0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
19cb00 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
19cb20 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 | .INDEX.t4a2.ON.t4(a).WHERE.b>.su |
19cb40 | 62 73 74 72 28 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 | bstr(1,2001-01-011,.-11)=2000;.I |
19cb60 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
19cb80 | 00 47 3b 0a 81 4f 9a 72 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | .G;..O.r...#CREATE.TABLE.t4(a.IN |
19cba0 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
19cbc0 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
19cbe0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
19cc00 | 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 32 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | RE.b>.substr(1,2,1)=2000;.INSERT |
19cc20 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
19cc40 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 9a 71 04 00 83 23 43 | ONFLICT(a).DO.NOTHING;..O.q...#C |
19cc60 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
19cc80 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
19cca0 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
19ccc0 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 | X.t4a2.ON.t4(a).WHERE.b>.substr( |
19cce0 | 31 2c 31 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | 1,1.1)=2000;.INSERT.INTO.t4(a,b) |
19cd00 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
19cd20 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 4f 9a 70 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..O.p...#CREATE.TABLE.t |
19cd40 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
19cd60 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
19cd80 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
19cda0 | 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2e 31 29 3d 32 30 30 30 3b 0a | a).WHERE.b>.substr(1,1.1)=2000;. |
19cdc0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
19cde0 | 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 52 9a | ).ON.CONFLICT(a).DO.NOTHING;..R. |
19ce00 | 6f 04 00 83 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | o...)CREATE.TABLE.t4(a.INT,.b.IN |
19ce20 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
19ce40 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
19ce60 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.s |
19ce80 | 75 62 73 74 72 28 31 2c 31 2c 4e 55 4c 4c 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | ubstr(1,1,NULL)=2000;.INSERT.INT |
19cea0 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
19cec0 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3a 9a 6e 04 00 82 79 43 52 45 41 54 | ICT(a).DO.NOTHING;..:.n...yCREAT |
19cee0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
19cf00 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
19cf20 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
19cf40 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c | a2.ON.t4(a).WHERE.b>.substr(1,1, |
19cf60 | 4e 55 4c 4c 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | NULL)=2000;.INSERT.INTO.t4(a,b). |
19cf80 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 47 3b 0a 81 52 9a 6d 04 00 83 29 43 52 45 41 54 45 20 | VALUES(50,60).G;..R.m...)CREATE. |
19cfa0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
19cfc0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
19cfe0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
19d000 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c 20 2e | .ON.t4(a).WHERE.b>.substr(1,1,.. |
19d020 | 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | 11)=2000;.INSERT.INTO.t4(a,b).VA |
19d040 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
19d060 | 54 48 49 4e 47 3b 0a 81 3a 9a 6c 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..:.l...yCREATE.TABLE.t4(a |
19d080 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19d0a0 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19d0c0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19d0e0 | 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c 20 2e 31 31 29 3d 32 30 30 30 3b 0a | WHERE.b>.substr(1,1,..11)=2000;. |
19d100 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
19d120 | 29 00 47 3b 0a 81 3e 9a 6b 04 00 83 01 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ).G;..>.k....CREATE.TABLE.t4(a.I |
19d140 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
19d160 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
19d180 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
19d1a0 | 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c 20 2d 31 20 7c 7c 20 31 29 3d 32 30 30 30 | ERE.b>.substr(1,1,.-1.||.1)=2000 |
19d1c0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
19d1e0 | 36 30 29 00 47 3b 0a 81 60 9a 6a 04 00 83 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | 60).G;..`.j...ECREATE.TABLE.t4(a |
19d200 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19d220 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19d240 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19d260 | 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c 20 27 61 27 43 4f 4c 4c 41 54 45 20 | WHERE.b>.substr(1,1,.'a'COLLATE. |
19d280 | ee 6f 63 61 73 65 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | .ocase)=2000;.INSERT.INTO.t4(a,b |
19d2a0 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
19d2c0 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 60 9a 69 04 00 83 45 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..`.i...ECREATE.TABLE. |
19d2e0 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
19d300 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
19d320 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
19d340 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c 20 27 61 27 43 4f 4c 4c | (a).WHERE.b>.substr(1,1,.'a'COLL |
19d360 | 41 54 45 20 6e 6f 63 61 73 65 29 bd 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | ATE.nocase).2000;.INSERT.INTO.t4 |
19d380 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
19d3a0 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 60 9a 68 04 00 83 45 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..`.h...ECREATE.TA |
19d3c0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
19d3e0 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
19d400 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
19d420 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c 20 27 61 27 | N.t4(a).WHERE.b>.substr(1,1,.'a' |
19d440 | 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3d 32 3d 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | COLLATE.nocase)=2=00;.INSERT.INT |
19d460 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
19d480 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 52 9a 67 04 00 83 29 43 52 45 41 54 | ICT(a).DO.NOTHING;..R.g...)CREAT |
19d4a0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
19d4c0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
19d4e0 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
19d500 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 31 2c | a2.ON.t4(a).WHERE.b>.substr(1,1, |
19d520 | 20 27 61 27 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | .'a')=2000;.INSERT.INTO.t4(a,b). |
19d540 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | VALUES(50,60).ON.CONFLICT(a).DO. |
19d560 | 4e 4f 54 48 49 4e 47 3b 0a 81 4f 9a 66 04 00 83 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | NOTHING;..O.f...#CREATE.TABLE.t4 |
19d580 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19d5a0 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19d5c0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19d5e0 | 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 2c 30 2c 31 29 3d 32 30 30 30 3b 0a 49 | ).WHERE.b>.substr(1,0,1)=2000;.I |
19d600 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
19d620 | 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 56 9a 65 | .ON.CONFLICT(a).DO.NOTHING;..V.e |
19d640 | 04 00 83 31 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...1CREATE.TABLE.t4(a.INT,.b.INT |
19d660 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
19d680 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
19d6a0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 | .INDEX.t4a2.ON.t4(a).WHERE.b>.su |
19d6c0 | 62 73 74 72 28 31 2c 30 2c 20 2d 31 20 7c 7c 20 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | bstr(1,0,.-1.||.1)=2000;.INSERT. |
19d6e0 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
19d700 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 52 9a 64 04 00 83 29 43 52 | NFLICT(a).DO.NOTHING;..R.d...)CR |
19d720 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
19d740 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
19d760 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
19d780 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 | .t4a2.ON.t4(a).WHERE.b>.substr(1 |
19d7a0 | 2c 20 2d 31 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c | ,.-11,1)=2000;.INSERT.INTO.t4(a, |
19d7c0 | 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | b).VALUES(50,60).ON.CONFLICT(a). |
19d7e0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 63 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..S.c...+CREATE.TABLE |
19d800 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
19d820 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
19d840 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
19d860 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 31 20 7c 7e 20 2e 31 2c 34 29 3d | 4(a).WHERE.b>.substr(1.|~..1,4)= |
19d880 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
19d8a0 | 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
19d8c0 | 47 3b 0a 81 53 9a 62 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..S.b...+CREATE.TABLE.t4(a.INT |
19d8e0 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
19d900 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
19d920 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
19d940 | 45 20 62 3e 20 73 75 62 73 74 72 28 31 20 7c 7c 20 2e 31 2c 39 29 3d 32 30 30 30 3b 0a 49 4e 53 | E.b>.substr(1.||..1,9)=2000;.INS |
19d960 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
19d980 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9a 61 04 00 | N.CONFLICT(a).DO.NOTHING;..S.a.. |
19d9a0 | 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .+CREATE.TABLE.t4(a.INT,.b.INT); |
19d9c0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
19d9e0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
19da00 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 | NDEX.t4a2.ON.t4(a).WHERE.b>.subs |
19da20 | 74 72 28 31 20 7c 7c 20 2e 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | tr(1.||..1,1)=2000;.INSERT.INTO. |
19da40 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
19da60 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 44 9a 60 04 00 83 0d 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..D.`....CREATE. |
19da80 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
19daa0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
19dac0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
19dae0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 20 2d 31 32 30 30 | .ON.t4(a).WHERE.b>.substr(.-1200 |
19db00 | 31 2d 30 31 2d 30 31 31 2c 20 2d 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 1-01-011,.-1)=2000;.INSERT.INTO. |
19db20 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 47 3b 0a 81 3a 9a 5f 04 00 82 | t4(a,b).VALUES(50,60).G;..:._... |
19db40 | 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | yCREATE.TABLE.t4(a.INT,.b.INT);. |
19db60 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
19db80 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
19dba0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 | DEX.t4a2.ON.t4(a).WHERE.b>.subst |
19dbc0 | 72 28 20 2d 31 31 2e 31 2c 31 29 2d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | r(.-11.1,1)-2000;.INSERT.INTO.t4 |
19dbe0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 47 3b 0a 81 52 9a 5e 04 00 83 29 43 | (a,b).VALUES(50,60).G;..R.^...)C |
19dc00 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
19dc20 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
19dc40 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
19dc60 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 | X.t4a2.ON.t4(a).WHERE.b>.substr( |
19dc80 | 20 2d 31 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | .-11,1,1)=2000;.INSERT.INTO.t4(a |
19dca0 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
19dcc0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3a 9a 5d 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..:.]...yCREATE.TABL |
19dce0 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
19dd00 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
19dd20 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
19dd40 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 20 2d 31 31 2c 31 2c 31 29 2d | t4(a).WHERE.b>.substr(.-11,1,1)- |
19dd60 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
19dd80 | 28 35 30 2c 36 30 29 00 47 3b 0a 81 3a 9a 5c 04 00 82 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 | (50,60).G;..:.\...yCREATE.TABLE. |
19dda0 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
19ddc0 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
19dde0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
19de00 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 20 2d 31 31 2c 20 2d 31 29 3d 32 30 | (a).WHERE.b>.substr(.-11,.-1)=20 |
19de20 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
19de40 | 30 2c 36 30 29 00 47 3b 0a 81 52 9a 5b 04 00 83 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | 0,60).G;..R.[...)CREATE.TABLE.t4 |
19de60 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19de80 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19dea0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19dec0 | 29 20 57 48 45 52 45 20 62 3e 20 73 75 62 73 74 72 28 20 2d 31 2c 20 2d 31 31 29 3d 32 30 30 30 | ).WHERE.b>.substr(.-1,.-11)=2000 |
19dee0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
19df00 | 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 60).ON.CONFLICT(a).DO.NOTHING;.. |
19df20 | 5d 9a 5a 04 00 83 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | ].Z...?CREATE.TABLE.t4(a.INT,.b. |
19df40 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
19df60 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
19df80 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
19dfa0 | 20 73 74 72 66 74 69 6d 65 28 20 74 72 69 6d 28 31 2c 31 29 20 20 2f 2a 20 2a 2f 29 3d 32 30 30 | .strftime(.trim(1,1)../*.*/)=200 |
19dfc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
19dfe0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
19e000 | 0d 00 00 00 26 00 58 00 1f 2f 1e 5e 1d 89 1c b8 1b e7 1b 10 1a 3c 19 6b 18 9a 17 c6 16 f1 16 1c | ....&.X../.^.........<.k........ |
19e020 | 15 47 14 72 13 9d 12 cc 11 fb 11 2a 10 59 0f 88 0e b6 0d e4 0d 0f 0c 3a 0b 5a 0a 85 09 b3 08 d7 | .G.r.......*.Y.........:.Z...... |
19e040 | 07 fb 07 26 06 51 05 72 04 96 03 ba 02 e5 02 10 01 34 00 58 00 00 00 00 81 58 9b 25 04 00 83 35 | ...&.Q.r.........4.X.....X.%...5 |
19e060 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
19e080 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
19e0a0 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
19e0c0 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 | EX.t4a2.ON.t4(a).WHERE.b>.trim(. |
19e0e0 | 2d 31 39 2c 31 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | -19,12001-01-01)=2000;.INSERT.IN |
19e100 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | TO.t4(a,b).VALUES(50,60).ON.CONF |
19e120 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 24 04 00 83 35 43 52 45 41 | LICT(a).DO.NOTHING;..X.$...5CREA |
19e140 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
19e160 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
19e180 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
19e1a0 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 39 2c | 4a2.ON.t4(a).WHERE.b>.trim(.-19, |
19e1c0 | 31 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | 12001-01-01)=2000;.INSERT.INTO.t |
19e1e0 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
19e200 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 23 04 00 83 27 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..Q.#...'CREATE.T |
19e220 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
19e240 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
19e260 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
19e280 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 4e 55 4c 4c | ON.t4(a).WHERE.b>.trim(.-11,NULL |
19e2a0 | 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )=2000;.INSERT.INTO.t4(a,b).VALU |
19e2c0 | 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 | ES(50,60).ON.CONFLICT(a).DO.NOTH |
19e2e0 | 49 4e 47 3b 0a 81 51 9b 22 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ING;..Q."...'CREATE.TABLE.t4(a.I |
19e300 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
19e320 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
19e340 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
19e360 | 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 4e 55 4c 4c 29 3d 32 30 30 30 3b 0a 49 4e 53 | ERE.b>.trim(.-11,NULL)=2000;.INS |
19e380 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
19e3a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 21 04 00 | N.CONFLICT(a).DO.NOTHING;..X.!.. |
19e3c0 | 83 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .5CREATE.TABLE.t4(a.INT,.b.INT); |
19e3e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
19e400 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
19e420 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d | NDEX.t4a2.ON.t4(a).WHERE.b>.trim |
19e440 | 28 20 2d 31 31 2c 39 32 30 32 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | (.-11,92021-01-01)=2000;.INSERT. |
19e460 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
19e480 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 20 04 00 83 35 43 52 | NFLICT(a).DO.NOTHING;..X.....5CR |
19e4a0 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
19e4c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
19e4e0 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
19e500 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 | .t4a2.ON.t4(a).WHERE.b>.trim(.-1 |
19e520 | 31 2c 39 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | 1,92001-01-01)=2000;.INSERT.INTO |
19e540 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
19e560 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5b 9b 1f 04 00 83 3b 43 52 45 41 54 45 | CT(a).DO.NOTHING;..[.....;CREATE |
19e580 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
19e5a0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
19e5c0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
19e5e0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 32 30 | 2.ON.t4(a).WHERE.b>.trim(.-11,20 |
19e600 | 32 30 30 31 2d 30 31 2d 30 31 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 2001-01-0101)=2000;.INSERT.INTO. |
19e620 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
19e640 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 1e 04 00 83 27 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..Q.....'CREATE. |
19e660 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
19e680 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
19e6a0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
19e6c0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 32 30 30 | .ON.t4(a).WHERE.b>.trim(.-11,200 |
19e6e0 | 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | 1)=2000;.INSERT.INTO.t4(a,b).VAL |
19e700 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
19e720 | 48 49 4e 47 3b 0a 81 51 9b 1d 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..Q.....'CREATE.TABLE.t4(a. |
19e740 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
19e760 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
19e780 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
19e7a0 | 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 32 30 30 31 29 3d 32 30 30 30 3b 0a 49 4e | HERE.b>.trim(.-11,2001)=2000;.IN |
19e7c0 | 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 | SERT.INTO.t4(a,b).VALUES(50,60). |
19e7e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 1c 04 | ON.CONFLICT(a).DO.NOTHING;..X... |
19e800 | 00 83 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..5CREATE.TABLE.t4(a.INT,.b.INT) |
19e820 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
19e840 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
19e860 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 | INDEX.t4a2.ON.t4(a).WHERE.b>.tri |
19e880 | 6d 28 20 2d 31 31 2c 31 32 30 30 31 2d 32 30 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | m(.-11,12001-20011)=2000;.INSERT |
19e8a0 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
19e8c0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 1b 04 00 83 35 43 | ONFLICT(a).DO.NOTHING;..X.....5C |
19e8e0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
19e900 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
19e920 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
19e940 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d | X.t4a2.ON.t4(a).WHERE.b>.trim(.- |
19e960 | 31 31 2c 31 32 30 30 20 7c 7c 20 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 11,1200.||.-01)=2000;.INSERT.INT |
19e980 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
19e9a0 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 9b 1a 04 00 83 21 43 52 45 41 54 | ICT(a).DO.NOTHING;..N.....!CREAT |
19e9c0 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
19e9e0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
19ea00 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
19ea20 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 31 | a2.ON.t4(a).WHERE.b>.trim(.-11,1 |
19ea40 | 29 2d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | )-2000;.INSERT.INTO.t4(a,b).VALU |
19ea60 | 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 | ES(50,60).ON.CONFLICT(a).DO.NOTH |
19ea80 | 49 4e 47 3b 0a 81 51 9b 19 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ING;..Q.....'CREATE.TABLE.t4(a.I |
19eaa0 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
19eac0 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<1000;.CREA |
19eae0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
19eb00 | 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 2e 30 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 | ERE.b>.trim(.-11,.001)=2000;.INS |
19eb20 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
19eb40 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5c 9b 18 04 00 | N.CONFLICT(a).DO.NOTHING;..\.... |
19eb60 | 83 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .=CREATE.TABLE.t4(a.INT,.b.INT); |
19eb80 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
19eba0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
19ebc0 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d | NDEX.t4a2.ON.t4(a).WHERE.b>.trim |
19ebe0 | 28 20 2d 31 31 2c 20 72 6f 75 6e 64 28 31 2c 31 29 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 | (.-11,.round(1,1).-11)=2000;.INS |
19ec00 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
19ec20 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 17 04 00 | N.CONFLICT(a).DO.NOTHING;..Q.... |
19ec40 | 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .'CREATE.TABLE.t4(a.INT,.b.INT); |
19ec60 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
19ec80 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
19eca0 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d | NDEX.t4a2.ON.t4(a).WHERE.b>.trim |
19ecc0 | 28 20 2d 31 31 2c 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | (.-11,.-11)=2000;.INSERT.INTO.t4 |
19ece0 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
19ed00 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 16 04 00 83 27 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..Q.....'CREATE.TA |
19ed20 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
19ed40 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
19ed60 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
19ed80 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 20 2d 31 31 29 | N.t4(a).WHERE.b>.trim(.-11,.-11) |
19eda0 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
19edc0 | 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
19ede0 | 4e 47 3b 0a 81 4e 9b 15 04 00 83 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..N.....!CREATE.TABLE.t4(a.IN |
19ee00 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
19ee20 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
19ee40 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
19ee60 | 52 45 20 62 3e 20 74 72 69 6d 28 20 27 61 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 | RE.b>.trim(.'a',1)=2000;.INSERT. |
19ee80 | 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f | INTO.t4(a,b).VALUES(50,60).ON.CO |
19eea0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 9b 14 04 00 83 21 43 52 | NFLICT(a).DO.NOTHING;..N.....!CR |
19eec0 | 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 | EATE.TABLE.t4(a.INT,.b.INT);.CRE |
19eee0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a1.ON.t4(a).W |
19ef00 | 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | HERE.b<1000;.CREATE.UNIQUE.INDEX |
19ef20 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 27 61 | .t4a2.ON.t4(a).WHERE.b>.trim(.'a |
19ef40 | 27 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | ',1)=2000;.INSERT.INTO.t4(a,b).V |
19ef60 | 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
19ef80 | 4f 54 48 49 4e 47 3b 0a 81 4d 9b 13 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..M......CREATE.TABLE.t4( |
19efa0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
19efc0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
19efe0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
19f000 | 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 2c 31 45 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | .WHERE.b>.time(1,1E1)=2000;.INSE |
19f020 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
19f040 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 12 04 00 83 | .CONFLICT(a).DO.NOTHING;..M..... |
19f060 | 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | .CREATE.TABLE.t4(a.INT,.b.INT);. |
19f080 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
19f0a0 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
19f0c0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 | DEX.t4a2.ON.t4(a).WHERE.b>.time( |
19f0e0 | 31 2c 31 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | 1,1.1)=2000;.INSERT.INTO.t4(a,b) |
19f100 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
19f120 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 11 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..M......CREATE.TABLE.t |
19f140 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
19f160 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
19f180 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
19f1a0 | 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e | a).WHERE.b>.time(1,1,1)=2000;.IN |
19f1c0 | 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 20 6a 75 6c | SERT.INTO.t4(a,b).VALUES(50,.jul |
19f1e0 | 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 10 04 | ianday(1,1,1)).DO.NOTHING;..M... |
19f200 | 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ...CREATE.TABLE.t4(a.INT,.b.INT) |
19f220 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
19f240 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
19f260 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d | INDEX.t4a2.ON.t4(a).WHERE.b>.tim |
19f280 | 65 28 31 2c 20 2d 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c | e(1,.-1)=2000;.INSERT.INTO.t4(a, |
19f2a0 | 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | b).VALUES(50,60).ON.CONFLICT(a). |
19f2c0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 0f 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..M......CREATE.TABLE |
19f2e0 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
19f300 | 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX.t4a1.ON.t4(a).WHERE.b<100 |
19f320 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX.t4a2.ON.t |
19f340 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 2c 20 2d 31 29 3d 32 30 30 30 3b 0a | 4(a).WHERE.b>.time(1,.-1)=2000;. |
19f360 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 | INSERT.INTO.t4(a,b).VALUES(50,60 |
19f380 | 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b | ).ON.CONFLICT(a).DO.NOTHING;..Q. |
19f3a0 | 0e 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e | ....'CREATE.TABLE.t4(a.INT,.b.IN |
19f3c0 | 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 | T);.CREATE.UNIQUE.INDEX.t4a1.ON. |
19f3e0 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | t4(a).WHERE.b<1000;.CREATE.UNIQU |
19f400 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 | E.INDEX.t4a2.ON.t4(a).WHERE.b>.t |
19f420 | 69 6d 65 28 31 20 7c 7c 32 30 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | ime(1.||20011)=2000;.INSERT.INTO |
19f440 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
19f460 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 0d 04 00 83 27 43 52 45 41 54 45 | CT(a).DO.NOTHING;..Q.....'CREATE |
19f480 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
19f4a0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
19f4c0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
19f4e0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 20 7c 7c 32 30 30 | 2.ON.t4(a).WHERE.b>.time(1.||200 |
19f500 | 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | 11)=2000;.INSERT.INTO.t4(a,b).VA |
19f520 | 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
19f540 | 54 48 49 4e 47 3b 0a 81 51 9b 0c 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..Q.....'CREATE.TABLE.t4(a |
19f560 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19f580 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19f5a0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19f5c0 | 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 20 7c 7c 20 2e 31 34 31 29 3d 32 30 30 30 3b 0a 49 | WHERE.b>.time(1.||..141)=2000;.I |
19f5e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
19f600 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 0b | .ON.CONFLICT(a).DO.NOTHING;..Q.. |
19f620 | 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...'CREATE.TABLE.t4(a.INT,.b.INT |
19f640 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
19f660 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
19f680 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 | .INDEX.t4a2.ON.t4(a).WHERE.b>.ti |
19f6a0 | 6d 65 28 31 20 7c 7c 20 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | me(1.||..-11)=2000;.INSERT.INTO. |
19f6c0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
19f6e0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 0a 04 00 83 27 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..Q.....'CREATE. |
19f700 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
19f720 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
19f740 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
19f760 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 20 7c 7c 20 20 2d 31 | .ON.t4(a).WHERE.b>.time(1.||..-1 |
19f780 | 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | 1)=2000;.INSERT.INTO.t4(a,b).VAL |
19f7a0 | 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
19f7c0 | 48 49 4e 47 3b 0a 81 50 9b 09 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..P.....%CREATE.TABLE.t4(a. |
19f7e0 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
19f800 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
19f820 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
19f840 | 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 20 41 4e 44 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 | HERE.b>.time(1.AND-11)=2000;.INS |
19f860 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
19f880 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 08 04 00 | N.CONFLICT(a).DO.NOTHING;..M.... |
19f8a0 | 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | ..CREATE.TABLE.t4(a.INT,.b.INT); |
19f8c0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
19f8e0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
19f900 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 | NDEX.t4a2.ON.t4(a).WHERE.b>.time |
19f920 | 28 31 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | (1.-11)=2000;.INSERT.INTO.t4(a,b |
19f940 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
19f960 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 07 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..M......CREATE.TABLE. |
19f980 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
19f9a0 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1000 |
19f9c0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
19f9e0 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 | (a).WHERE.b>.time(1.-11)=2000;.I |
19fa00 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
19fa20 | 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 50 9b 06 | .ON.CONFLICT(a).DO.NOTHING;..P.. |
19fa40 | 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...%CREATE.TABLE.t4(a.INT,.b.INT |
19fa60 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
19fa80 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
19faa0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 | .INDEX.t4a2.ON.t4(a).WHERE.b>.ti |
19fac0 | 6d 65 28 30 20 41 4e 44 3f 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | me(0.AND?11)=2000;.INSERT.INTO.t |
19fae0 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
19fb00 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9b 05 04 00 83 2b 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;..S.....+CREATE.T |
19fb20 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
19fb40 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
19fb60 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
19fb80 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 30 20 41 4e 44 2d 20 3f 31 | ON.t4(a).WHERE.b>.time(0.AND-.?1 |
19fba0 | 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | 11)=2000;.INSERT.INTO.t4(a,b).VA |
19fbc0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
19fbe0 | 54 48 49 4e 47 3b 0a 81 4d 9b 04 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..M......CREATE.TABLE.t4(a |
19fc00 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
19fc20 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
19fc40 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
19fc60 | 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 2d 2e 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 | WHERE.b>.time(-.1,1)=2000;.INSER |
19fc80 | 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | T.INTO.t4(a,b).VALUES(50,60).ON. |
19fca0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 03 04 00 83 1f | CONFLICT(a).DO.NOTHING;..M...... |
19fcc0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
19fce0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
19fd00 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
19fd20 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 2d | EX.t4a2.ON.t4(a).WHERE.b>.time(- |
19fd40 | 2e 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | .1,1)=2000;.INSERT.INTO.t4(a,b). |
19fd60 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | VALUES(50,60).ON.CONFLICT(a).DO. |
19fd80 | 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 02 04 00 83 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | NOTHING;..Q.....'CREATE.TABLE.t4 |
19fda0 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
19fdc0 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
19fde0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
19fe00 | 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 20 68 65 78 28 31 29 2c 31 29 3d 32 30 30 30 3b | ).WHERE.b>.time(.hex(1),1)=2000; |
19fe20 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | .INSERT.INTO.t4(a,b).VALUES(50,6 |
19fe40 | 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d | 0).ON.CONFLICT(a).DO.NOTHING;..M |
19fe60 | 9b 01 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | ......CREATE.TABLE.t4(a.INT,.b.I |
19fe80 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
19fea0 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
19fec0 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
19fee0 | 74 69 6d 65 28 20 31 45 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | time(.1E11)=2000;.INSERT.INTO.t4 |
19ff00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
19ff20 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 00 04 00 83 1f 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..M......CREATE.TA |
19ff40 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
19ff60 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
19ff80 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
19ffa0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 20 31 45 31 31 29 3d 32 30 30 | N.t4(a).WHERE.b>.time(.1E11)=200 |
19ffc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
19ffe0 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
1a0000 | 0d 1a c1 00 25 00 b9 00 1f 24 1e 48 1d 73 1c 97 1b 9e 1a c7 19 e4 18 f9 18 2a 17 51 16 6e 15 95 | ....%....$.H.s...........*.Q.n.. |
1a0020 | 14 b9 13 e0 13 0e 12 3c 11 63 10 8a 0f b1 0e d8 0d ff 0d 1c 0c 39 0b 67 0a 95 09 c6 08 f7 08 43 | .......<.c...........9.g.......C |
1a0040 | 07 72 06 a1 05 c9 04 f1 04 19 03 41 02 69 01 91 00 b9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .r.........A.i.................. |
1a0060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 54 9b 4a 04 00 83 | ..........................T.J... |
1a00c0 | 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | -CREATE.TABLE.t4(a.INT,.b.INT);. |
1a00e0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a0100 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1a0120 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 | DEX.t4a2.ON.t4(a).WHERE.b>.upper |
1a0140 | 28 32 30 30 31 2d 38 31 45 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (2001-81E011)=2000;.INSERT.INTO. |
1a0160 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
1a0180 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 9b 49 04 00 83 2d 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..T.I...-CREATE. |
1a01a0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
1a01c0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
1a01e0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
1a0200 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 28 32 30 30 31 2d 30 31 | .ON.t4(a).WHERE.b>.upper(2001-01 |
1a0220 | 45 32 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | E211)=2000;.INSERT.INTO.t4(a,b). |
1a0240 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | VALUES(50,60).ON.CONFLICT(a).DO. |
1a0260 | 4e 4f 54 48 49 4e 47 3b 0a 81 54 9b 48 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | NOTHING;..T.H...-CREATE.TABLE.t4 |
1a0280 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
1a02a0 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
1a02c0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
1a02e0 | 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 28 32 30 30 31 2d 30 31 45 31 31 31 29 3d 32 30 | ).WHERE.b>.upper(2001-01E111)=20 |
1a0300 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
1a0320 | 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
1a0340 | 0a 81 54 9b 47 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..T.G...-CREATE.TABLE.t4(a.INT,. |
1a0360 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
1a0380 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1000;.CREATE.U |
1a03a0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
1a03c0 | 62 3e 20 75 70 70 65 72 28 32 30 30 31 2d 30 31 45 30 31 35 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | b>.upper(2001-01E015)=2000;.INSE |
1a03e0 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
1a0400 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 9b 46 04 00 83 | .CONFLICT(a).DO.NOTHING;..T.F... |
1a0420 | 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | -CREATE.TABLE.t4(a.INT,.b.INT);. |
1a0440 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a0460 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1a0480 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 | DEX.t4a2.ON.t4(a).WHERE.b>.upper |
1a04a0 | 28 32 30 30 31 2d 30 31 45 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | (2001-01E011)=2000;.INSERT.INTO. |
1a04c0 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 45 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50E60).ON.CONFLIC |
1a04e0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 54 9b 45 04 00 83 2d 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..T.E...-CREATE. |
1a0500 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
1a0520 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
1a0540 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
1a0560 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 28 32 30 30 31 2d 30 31 | .ON.t4(a).WHERE.b>.upper(2001-01 |
1a0580 | 45 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 | E011)=2000;.INSERT.INTO.t4(a,b). |
1a05a0 | 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | VALUES(50,60).ON.CONFLICT(a).DO. |
1a05c0 | 4e 4f 54 48 49 4e 47 3b 0a 81 54 9b 44 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 | NOTHING;..T.D...-CREATE.TABLE.t4 |
1a05e0 | 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | (a.INT,.b.INT);.CREATE.UNIQUE.IN |
1a0600 | 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a | DEX.t4a1.ON.t4(a).WHERE.b<1000;. |
1a0620 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
1a0640 | 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 28 32 30 30 2f 2d 30 31 45 30 31 31 29 3d 32 30 | ).WHERE.b>.upper(200/-01E011)=20 |
1a0660 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
1a0680 | 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
1a06a0 | 0a 81 4d 9b 43 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ..M.C....CREATE.TABLE.t4(a.INT,. |
1a06c0 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
1a06e0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.b<1000;.CREATE.U |
1a0700 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
1a0720 | 62 3e 20 75 70 70 65 72 28 20 2d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | b>.upper(.-11)=2000;.INSERT.INTO |
1a0740 | 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 | .t4(a,b).VALUES(50,60).ON.CONFLI |
1a0760 | 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 42 04 00 83 1f 43 52 45 41 54 45 | CT(a).DO.NOTHING;..M.B....CREATE |
1a0780 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
1a07a0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
1a07c0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
1a07e0 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 28 20 0d 31 31 29 3d | 2.ON.t4(a).WHERE.b>.upper(..11)= |
1a0800 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
1a0820 | 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
1a0840 | 47 3b 0a 81 30 9b 41 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..0.A...eCREATE.TABLE.t4(a.INT |
1a0860 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
1a0880 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
1a08a0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
1a08c0 | 45 20 62 3e 20 75 6e 69 63 6f 64 65 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | E.b>.unicode(1)=2000;.INSERT.INT |
1a08e0 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 4b 9b 40 04 00 83 1b 43 | O.t4(a,b).VALUES(50,60).K.@....C |
1a0900 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
1a0920 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
1a0940 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1a0960 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 79 70 65 6f 66 28 | X.t4a2.ON.t4(a).WHERE.b>.typeof( |
1a0980 | 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | 1)=2000;.INSERT.INTO.t4(a,b).VAL |
1a09a0 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
1a09c0 | 48 49 4e 47 3b 0a 81 4b 9b 3f 04 00 83 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..K.?....CREATE.TABLE.t4(a. |
1a09e0 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
1a0a00 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
1a0a20 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
1a0a40 | 48 45 52 45 20 62 3e 20 74 79 70 65 6f 66 28 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | HERE.b>.typeof(1)=2000;.INSERT.I |
1a0a60 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
1a0a80 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 9b 3e 04 00 83 21 43 52 45 | FLICT(a).DO.NOTHING;..N.>...!CRE |
1a0aa0 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
1a0ac0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
1a0ae0 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
1a0b00 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 4e 55 4c 4c | t4a2.ON.t4(a).WHERE.b>.trim(NULL |
1a0b20 | 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | ,1)=2000;.INSERT.INTO.t4(a,b).VA |
1a0b40 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
1a0b60 | 54 48 49 4e 47 3b 0a 81 4e 9b 3d 04 00 83 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..N.=...!CREATE.TABLE.t4(a |
1a0b80 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
1a0ba0 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
1a0bc0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
1a0be0 | 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 4e 55 4c 4c 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | WHERE.b>.trim(NULL,1)=2000;.INSE |
1a0c00 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
1a0c20 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5f 9b 3c 04 00 83 | .CONFLICT(a).DO.NOTHING;.._.<... |
1a0c40 | 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | CCREATE.TABLE.t4(a.INT,.b.INT);. |
1a0c60 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a0c80 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1a0ca0 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 | DEX.t4a2.ON.t4(a).WHERE.b>.trim( |
1a0cc0 | 39 32 30 30 31 2d 30 31 2d 30 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 | 92001-01-01,2001-01-011)=2000;.I |
1a0ce0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
1a0d00 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5f 9b 3b | .ON.CONFLICT(a).DO.NOTHING;.._.; |
1a0d20 | 04 00 83 43 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...CCREATE.TABLE.t4(a.INT,.b.INT |
1a0d40 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a0d60 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a0d80 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 | .INDEX.t4a2.ON.t4(a).WHERE.b>.tr |
1a0da0 | 69 6d 28 39 32 30 30 31 2d 30 31 2d 30 31 2c 31 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 | im(92001-01-01,12001-01-01)=2000 |
1a0dc0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c | ;.INSERT.INTO.t4(a,b).VALUES(50, |
1a0de0 | 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | 60).ON.CONFLICT(a).DO.NOTHING;.. |
1a0e00 | 55 9b 3a 04 00 83 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 | U.:.../CREATE.TABLE.t4(a.INT,.b. |
1a0e20 | 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f | INT);.CREATE.UNIQUE.INDEX.t4a1.O |
1a0e40 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 | N.t4(a).WHERE.b<1000;.CREATE.UNI |
1a0e60 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e | QUE.INDEX.t4a2.ON.t4(a).WHERE.b> |
1a0e80 | 20 74 72 69 6d 28 39 2c 32 30 30 31 32 30 30 31 45 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 | .trim(9,20012001E11)=2000;.INSER |
1a0ea0 | 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 | T.INTO.t4(a,b).VALUES(50,60).ON. |
1a0ec0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 55 9b 39 04 00 83 2f | CONFLICT(a).DO.NOTHING;..U.9.../ |
1a0ee0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
1a0f00 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
1a0f20 | 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | .WHERE.b<1000;.CREATE.UNIQUE.IND |
1a0f40 | 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 39 | EX.t4a2.ON.t4(a).WHERE.b>.trim(9 |
1a0f60 | 2c 32 30 30 31 32 30 30 31 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,20012001011)=2000;.INSERT.INTO. |
1a0f80 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
1a0fa0 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 55 9b 38 04 00 83 2f 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..U.8.../CREATE. |
1a0fc0 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
1a0fe0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
1a1000 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
1a1020 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 39 2c 32 30 30 31 32 30 | .ON.t4(a).WHERE.b>.trim(9,200120 |
1a1040 | 30 31 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | 01011)=2000;.INSERT.INTO.t4(a,b) |
1a1060 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
1a1080 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 55 9b 37 04 00 83 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..U.7.../CREATE.TABLE.t |
1a10a0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1a10c0 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
1a10e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
1a1100 | 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 39 2c 20 6c 74 72 69 6d 28 31 2c 31 29 29 3d | a).WHERE.b>.trim(9,.ltrim(1,1))= |
1a1120 | 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 | 2000;.INSERT.INTO.t4(a,b).VALUES |
1a1140 | 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e | (50,60).ON.CONFLICT(a).DO.NOTHIN |
1a1160 | 47 3b 0a 81 55 9b 36 04 00 83 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 | G;..U.6.../CREATE.TABLE.t4(a.INT |
1a1180 | 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ,.b.INT);.CREATE.UNIQUE.INDEX.t4 |
1a11a0 | 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 | a1.ON.t4(a).WHERE.b<1000;.CREATE |
1a11c0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a2.ON.t4(a).WHER |
1a11e0 | 45 20 62 3e 20 74 72 69 6d 28 39 2c 20 6c 74 72 69 6d 28 31 2c 31 29 29 3d 32 30 30 30 3b 0a 49 | E.b>.trim(9,.ltrim(1,1))=2000;.I |
1a1200 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
1a1220 | 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 9b 35 | .ON.CONFLICT(a).DO.NOTHING;..N.5 |
1a1240 | 04 00 83 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...!CREATE.TABLE.t4(a.INT,.b.INT |
1a1260 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a1280 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a12a0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 | .INDEX.t4a2.ON.t4(a).WHERE.b>.tr |
1a12c0 | 69 6d 28 39 2c 20 0d 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 | im(9,..11)=2000;.INSERT.INTO.t4( |
1a12e0 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
1a1300 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4e 9b 34 04 00 83 21 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..N.4...!CREATE.TAB |
1a1320 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
1a1340 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
1a1360 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
1a1380 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 39 2c 20 0d 31 31 29 3d 32 30 30 | .t4(a).WHERE.b>.trim(9,..11)=200 |
1a13a0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
1a13c0 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
1a13e0 | 81 55 9b 33 04 00 83 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .U.3.../CREATE.TABLE.t4(a.INT,.b |
1a1400 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
1a1420 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
1a1440 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
1a1460 | 3e 20 74 72 69 6d 28 32 30 30 31 2d 30 31 2d 30 31 39 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | >.trim(2001-01-019,1)=2000;.INSE |
1a1480 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
1a14a0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 32 04 00 83 | .CONFLICT(a).DO.NOTHING;..X.2... |
1a14c0 | 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | 5CREATE.TABLE.t4(a.INT,.b.INT);. |
1a14e0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a1500 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1a1520 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 | DEX.t4a2.ON.t4(a).WHERE.b>.trim( |
1a1540 | 32 30 30 30 2c 31 32 30 30 31 2d 32 30 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 | 2000,12001-20011)=2000;.INSERT.I |
1a1560 | 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e | NTO.t4(a,b).VALUES(50,60).ON.CON |
1a1580 | 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 55 9b 31 04 00 83 2f 43 52 45 | FLICT(a).DO.NOTHING;..U.1.../CRE |
1a15a0 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
1a15c0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
1a15e0 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
1a1600 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 31 45 32 30 | t4a2.ON.t4(a).WHERE.b>.trim(1E20 |
1a1620 | 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 | 01-01-011)=2000;.INSERT.INTO.t4( |
1a1640 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
1a1660 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 5f 9b 30 04 00 83 43 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;.._.0...CCREATE.TAB |
1a1680 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
1a16a0 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
1a16c0 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
1a16e0 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 31 32 30 30 31 2d 30 31 2d 30 31 | .t4(a).WHERE.b>.trim(12001-01-01 |
1a1700 | 2c 31 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | ,12001-01-01)=2000;.INSERT.INTO. |
1a1720 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 | t4(a,b).VALUES(50,60).ON.CONFLIC |
1a1740 | 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 55 9b 2f 04 00 83 2f 43 52 45 41 54 45 20 | T(a).DO.NOTHING;..U./.../CREATE. |
1a1760 | 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 | TABLE.t4(a.INT,.b.INT);.CREATE.U |
1a1780 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a1.ON.t4(a).WHERE. |
1a17a0 | 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b<1000;.CREATE.UNIQUE.INDEX.t4a2 |
1a17c0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 31 32 30 30 31 2d 30 31 | .ON.t4(a).WHERE.b>.trim(12001-01 |
1a17e0 | 2d 20 60 61 60 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | -.`a`)=2000;.INSERT.INTO.t4(a,b) |
1a1800 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
1a1820 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 4b 9b 2e 04 00 83 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..K......CREATE.TABLE.t |
1a1840 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1a1860 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
1a1880 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
1a18a0 | 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 31 2e 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 | a).WHERE.b>.trim(1.1)=2000;.INSE |
1a18c0 | 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 00 4f 4e | RT.INTO.t4(a,b).VALUES(50,60).ON |
1a18e0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 67 9b 2d 04 00 83 | .CONFLICT(a).DO.NOTHING;..g.-... |
1a1900 | 53 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | SCREATE.TABLE.t4(a.INT,.b.INT);. |
1a1920 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a1940 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1a1960 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 | DEX.t4a2.ON.t4(a).WHERE.b>.trim( |
1a1980 | 31 2c 20 72 6f 75 6e 64 28 31 2c 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 20 2d 31 31 29 | 1,.round(1,1)COLLATE.nocase.-11) |
1a19a0 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
1a19c0 | 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
1a19e0 | 4e 47 3b 0a 81 59 9b 2c 04 00 83 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..Y.,...7CREATE.TABLE.t4(a.IN |
1a1a00 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
1a1a20 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
1a1a40 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
1a1a60 | 52 45 20 62 3e 20 74 72 69 6d 28 31 2c 20 72 6f 75 6e 64 28 31 2c 31 29 20 2f 31 31 29 3d 32 30 | RE.b>.trim(1,.round(1,1)./11)=20 |
1a1a80 | 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | 00;.INSERT.INTO.t4(a,b).VALUES(5 |
1a1aa0 | 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
1a1ac0 | 0a 00 00 00 06 04 00 81 53 9b 2b 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | ........S.+...+CREATE.TABLE.t4(a |
1a1ae0 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
1a1b00 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
1a1b20 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
1a1b40 | 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 31 2c 20 20 6a 73 6f 6e 28 31 29 29 3d 32 30 30 30 3b | WHERE.b>.trim(1,..json(1))=2000; |
1a1b60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 | .INSERT.INTO.t4(a,b).VALUES(50,6 |
1a1b80 | 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 75 | 0).ON.CONFLICT(a).DO.NOTHING;..u |
1a1ba0 | 9b 2a 04 00 83 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .*...oCREATE.TABLE.t4(a.INT,.b.I |
1a1bc0 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
1a1be0 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
1a1c00 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
1a1c20 | 74 72 69 6d 28 20 62 3e 20 74 72 69 6d 28 20 2d 31 31 2c 31 32 30 30 31 2d 32 30 30 31 31 29 3d | trim(.b>.trim(.-11,12001-20011)= |
1a1c40 | 32 30 30 2d 31 31 2c 31 32 30 30 31 2d 32 30 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 | 200-11,12001-20011)=2000;.INSERT |
1a1c60 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 49 20 43 | .INTO.t4(a,b).VALUES(50,60).OI.C |
1a1c80 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 58 9b 29 04 00 83 35 43 | ONFLICT(a).DO.NOTHING;..X.)...5C |
1a1ca0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
1a1cc0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
1a1ce0 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1a1d00 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 31 | X.t4a2.ON.t4(a).WHERE.b>.trim(.1 |
1a1d20 | 31 31 2c 39 32 30 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | 11,92001-01-01)=2000;.INSERT.INT |
1a1d40 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c | O.t4(a,b).VALUES(50,60).ON.CONFL |
1a1d60 | 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 51 9b 28 04 00 83 27 43 52 45 41 54 | ICT(a).DO.NOTHING;..Q.(...'CREAT |
1a1d80 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
1a1da0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
1a1dc0 | 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | E.b<1000;.CREATE.UNIQUE.INDEX.t4 |
1a1de0 | 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 31 31 31 2c 32 | a2.ON.t4(a).WHERE.b>.trim(.111,2 |
1a1e00 | 30 30 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | 001)=2000;.INSERT.INTO.t4(a,b).V |
1a1e20 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
1a1e40 | 4f 54 48 49 4e 47 3b 0a 81 58 9b 27 04 00 83 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..X.'...5CREATE.TABLE.t4( |
1a1e60 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
1a1e80 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
1a1ea0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
1a1ec0 | 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 20 31 31 31 2c 31 32 30 30 31 2d 32 30 30 31 31 29 | .WHERE.b>.trim(.111,12001-20011) |
1a1ee0 | 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | =2000;.INSERT.INTO.t4(a,b).VALUE |
1a1f00 | 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
1a1f20 | 4e 47 3b 0a 81 58 9b 26 04 00 83 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e | NG;..X.&...5CREATE.TABLE.t4(a.IN |
1a1f40 | 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | T,.b.INT);.CREATE.UNIQUE.INDEX.t |
1a1f60 | 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 | 4a1.ON.t4(a).WHERE.b<1000;.CREAT |
1a1f80 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a2.ON.t4(a).WHE |
1a1fa0 | 52 45 20 62 3e 20 74 72 69 6d 28 20 2d 31 39 2c 31 32 38 30 31 2d 30 31 2d 30 31 29 3d 32 30 30 | RE.b>.trim(.-19,12801-01-01)=200 |
1a1fc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
1a1fe0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
1a2000 | 0d 00 00 00 2e 00 ec 00 1f 2f 1e 5e 1d aa 1d 19 1c 88 1b db 1b 46 1a 92 19 f4 19 0d 18 35 17 77 | ........./.^.........F.......5.w |
1a2020 | 16 c7 15 fc 15 30 14 7c 13 b7 12 f2 12 3c 11 6e 10 ba 0f e2 0f 42 0e 8b 0d ed 0d 28 0c 9b 0b cf | .....0.|.....<.n.....B.....(.... |
1a2040 | 0b 38 0a a1 0a 0a 09 73 08 dc 08 45 07 ae 07 17 06 80 05 f0 05 2b 04 66 03 a1 03 4e 02 c1 02 34 | .8.....s...E.........+.f...N...4 |
1a2060 | 01 8a 00 ec 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 81 1a 9b 78 04 00 82 39 43 52 45 41 54 45 20 54 41 42 4c 45 | ...............x...9CREATE.TABLE |
1a2100 | 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | .t4(a.INT,.b.INT);.CREATE.UNIQUE |
1a2120 | 20 49 4e 44 45 58 20 ff ff ff ff 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 | .INDEX......ON.t4(a).WHERE.b<100 |
1a2140 | 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 8b cb 9e cd 20 4f 4e 20 74 | 0;.CREATE.UNIQUE.INDEX......ON.t |
1a2160 | 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 | 4(a).WHERE.b>.json_remove(ALL)=2 |
1a2180 | 30 30 30 3b 56 41 43 55 55 4d 81 26 9b 77 04 00 82 51 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | 000;VACUUM.&.w...QCREATE.TABLE.t |
1a21a0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1a21c0 | 4e 44 45 58 20 ff ff ff ff 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX......ON.t4(a).WHERE.b<1000; |
1a21e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
1a2200 | 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 20 61 66 66 69 | a).WHERE.b>.json_remove(ALL.affi |
1a2220 | 6e 69 74 79 28 31 29 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 09 9b 76 04 00 82 17 43 52 45 41 | nity(1))=2000;VACUUM...v....CREA |
1a2240 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
1a2260 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 e1 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4.1.ON.t4(a).WHE |
1a2280 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
1a22a0 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 3a 30 30 30 3b 0a 49 4e 47 3b | 4a2.ON.t4(a).WHERE.b>=:000;.ING; |
1a22c0 | 0a 81 09 9b 75 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | ....u....CREATE.TABLE.t4(a.INT,. |
1a22e0 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 | b.INT);.CREATE.UNIQUE.INDEX.t4a2 |
1a2300 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 2d 31 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE.-11000;.CREATE.U |
1a2320 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
1a2340 | 62 3e 35 32 30 30 30 3b 0a 49 4e 47 3b 0a 50 9b 74 04 00 81 25 43 52 45 41 54 45 20 54 41 42 4c | b>52000;.ING;.P.t...%CREATE.TABL |
1a2360 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
1a2380 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | E.INDEX.t4a1.ON.t4(a,b).VALUES(5 |
1a23a0 | 30 81 41 9b 73 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | 0.A.s....CREATE.TABLE.t4(a.INT,. |
1a23c0 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
1a23e0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2d 2f 2a 20 2a 2f 30 3b 0a 43 52 45 41 54 45 20 55 | .ON.t4(a).WHERE-/*.*/0;.CREATE.U |
1a2400 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 | NIQUE.INDEX.t4a2.ON.t4(a).WHERE. |
1a2420 | 62 3e 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c | b>=2000;REPLACE.INTO.t4(a,b).VAL |
1a2440 | 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 | UES(50,60).ON.CONFLICT(a).DO.NOT |
1a2460 | 48 49 4e 47 3b 0a 81 41 9b 72 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | HING;..A.r....CREATE.TABLE.t4(a. |
1a2480 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
1a24a0 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE+b<1000;.CRE |
1a24c0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
1a24e0 | 48 45 52 45 2b 6a 73 6f 6e 28 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 | HERE+json(1);.INSERT.INTO.t4(a,b |
1a2500 | 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ).VALUES(50,60).ON.CONFLICT(a).D |
1a2520 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 9b 71 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;..A.q....CREATE.TABLE. |
1a2540 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
1a2560 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 62 3c 31 30 30 30 | INDEX.t4a1.ON.t4(a).WHERE+b<1000 |
1a2580 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
1a25a0 | 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 | (a).WHERE.b>=2000;REPLACE.INTO.t |
1a25c0 | 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | 4(a,b).VALUES(50,60).ON.CONFLICT |
1a25e0 | 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0c 9b 70 04 00 82 1d 43 52 45 41 54 45 20 54 | (a).DO.NOTHING;....p....CREATE.T |
1a2600 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
1a2620 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 4e | IQUE.INDEX.t4a1.ON.t4(a).WHERE+N |
1a2640 | 4f 54 28 31 29 49 53 20 74 72 75 65 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 | OT(1)IS.true;.CNTO.t4(a,b).VALUE |
1a2660 | 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 | S(50,60).ON.CONFLICT(a).DO.NOTHI |
1a2680 | 81 13 9b 6f 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | ...o...+CREATE.TABLE.t4(a.INT,.b |
1a26a0 | 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | .INT);.CREATE.UNIQUE.INDEX.t4a1. |
1a26c0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 2b 2b 2d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b | ON.t4(a).WHERE+++-++++++++++++++ |
1a26e0 | 2b 2b 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 | ++b<1000;.CREATE.UNIQUE.INDEX.t4 |
1a2700 | 61 32 20 4f 4e 20 74 72 6c 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a 49 81 13 9b 6e 04 00 82 2b 43 | a2.ON.trlen.th(1,1)=;.I...n...+C |
1a2720 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
1a2740 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
1a2760 | 57 48 45 52 45 2b 2b 2b 2b 2d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 62 3c 31 30 30 30 3b | WHERE++++-+++++++++++++++b<1000; |
1a2780 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 72 6c | .CREATE.UNIQUE.INDEX.t4a2.ON.trl |
1a27a0 | 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a 49 81 13 9b 6d 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 | en.th(1,1)=;.I...m...+CREATE.TAB |
1a27c0 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
1a27e0 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 2b 2b 2b | UE.INDEX.t4a1.ON.t4(a).WHERE++++ |
1a2800 | 2b 2b 2b 2b 2d 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 | ++++-+++++++++++b<1000;.CREATE.U |
1a2820 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 72 6c 65 6e 84 74 68 28 31 2c 31 | NIQUE.INDEX.t4a2.ON.trlen.th(1,1 |
1a2840 | 29 3d 3b 0a 49 81 13 9b 6c 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | )=;.I...l...+CREATE.TABLE.t4(a.I |
1a2860 | 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b.INT);.CREATE.UNIQUE.INDEX. |
1a2880 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 2b 2b 2b 2b 2b 2b 2b 2b 2d 2b 2b 2b | t4a1.ON.t4(a).WHERE+++++++++-+++ |
1a28a0 | 2b 2b 2b 2b 2b 2b 2b 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | +++++++b<1000;.CREATE.UNIQUE.IND |
1a28c0 | 45 58 20 74 34 61 32 20 4f 4e 20 74 72 6c 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a 49 81 13 9b 6b | EX.t4a2.ON.trlen.th(1,1)=;.I...k |
1a28e0 | 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...+CREATE.TABLE.t4(a.INT,.b.INT |
1a2900 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a2920 | 34 28 61 29 20 57 48 45 52 45 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 62 3c | 4(a).WHERE++++++++++++++++++++b< |
1a2940 | 31 30 30 30 3b 52 45 49 4e 44 45 58 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;REINDEX.UNIQUE.INDEX.t4a2.O |
1a2960 | 4e 20 74 72 6c 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a 49 81 13 9b 6a 04 00 82 2b 43 52 45 41 54 | N.trlen.th(1,1)=;.I...j...+CREAT |
1a2980 | 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 | E.TABLE.t4(a.INT,.b.INT);.CREATE |
1a29a0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 | .UNIQUE.INDEX.t4a1.ON.t4(a).WHER |
1a29c0 | 45 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 62 3c 31 30 30 30 3b 0a 43 52 45 | E++++++++++++++++++++b<1000;.CRE |
1a29e0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 72 6c 65 6e 84 74 | ATE.UNIQUE.INDEX.t4a2.ON.trlen.t |
1a2a00 | 68 28 31 2c 31 29 3d 3b 0a 49 81 13 9b 69 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | h(1,1)=;.I...i...+CREATE.TABLE.t |
1a2a20 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1a2a40 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 2b 2b 2b 2b 2b 2b 2b | NDEX.t4a1.ON.t4(a).WHERE++++++++ |
1a2a60 | 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 62 2c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | ++++++++++++b,1000;.CREATE.UNIQU |
1a2a80 | 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 72 6c 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a | E.INDEX.t4a2.ON.trlen.th(1,1)=;. |
1a2aa0 | 49 81 13 9b 68 04 00 82 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 | I...h...+CREATE.TABLE.t4(a.INT,. |
1a2ac0 | 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | b.INT);.CREATE.UNIQUE.INDEX.t4a1 |
1a2ae0 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b | .ON.t4(a).WHERE+++++++++++++++++ |
1a2b00 | 2b 2b 2b 62 20 67 6c 6f 62 28 31 2c 31 29 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | +++b.glob(1,1)ATE.UNIQUE.INDEX.t |
1a2b20 | 34 61 32 20 4f 4e 20 74 72 6c 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a 49 81 13 9b 67 04 00 82 2b | 4a2.ON.trlen.th(1,1)=;.I...g...+ |
1a2b40 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
1a2b60 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
1a2b80 | 20 57 48 45 52 45 2b 2b 2b 2b 28 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 62 3c 31 30 30 30 | .WHERE++++(+++++++++++++++b<1000 |
1a2ba0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 72 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.tr |
1a2bc0 | 6c 65 6e 84 74 68 28 31 2c 31 29 3d 3b 0a 49 81 48 9b 66 04 00 83 15 43 52 45 41 54 45 20 54 41 | len.th(1,1)=;.I.H.f....CREATE.TA |
1a2be0 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
1a2c00 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 7c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b| |
1a2c20 | 20 60 61 60 4f 52 20 74 72 75 65 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | .`a`OR.true;.CREATE.UNIQUE.INDEX |
1a2c40 | 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 52 45 50 | .t4a2.ON.t4(a).WHERE.b>=2000;REP |
1a2c60 | 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 | LACE.INTO.t4(a,b).VALUES(50,60). |
1a2c80 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9b 65 04 | ON.CONFLICT(a).DO.NOTHING;....e. |
1a2ca0 | 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ...CREATE.TABLE.t4(a.INT,.b.INT) |
1a2cc0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
1a2ce0 | 28 61 29 20 57 48 45 52 45 20 62 3c 3f 30 30 30 30 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 | (a).WHERE.b<?0000.CNTO.t4(a,b).V |
1a2d00 | 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e | ALUES(50,60).ON.CONFLICT(a).DO.N |
1a2d20 | 4f 54 48 49 4e 47 3b 0a 81 41 9b 64 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | OTHING;..A.d....CREATE.TABLE.t4( |
1a2d40 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
1a2d60 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 3d 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<=000;.C |
1a2d80 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
1a2da0 | 20 57 48 45 52 45 20 62 3c 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 | .WHERE.b<=2000;REPLACE.INTO.t4(a |
1a2dc0 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
1a2de0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 1a 9b 63 04 00 82 39 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;....c...9CREATE.TABL |
1a2e00 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
1a2e20 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 3c 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<<0 |
1a2e40 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
1a2e60 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d | t4(a).WHERE.b>.json_remove(ALL)= |
1a2e80 | 32 30 30 30 3b 56 41 43 55 55 4d 81 33 9b 62 04 00 82 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | 2000;VACUUM.3.b...kCREATE.TABLE. |
1a2ea0 | 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | t4(a.INT,.b.INT);.CREATE.UNIQUE. |
1a2ec0 | 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 45 30 30 | INDEX.t4a1.ON.t4(a).WHERE.b<1E00 |
1a2ee0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a2.ON.t4 |
1a2f00 | 28 61 29 20 57 48 45 52 45 20 62 3e 20 74 72 69 6d 28 31 45 31 29 3d 32 30 30 30 3b 0a 49 4e 53 | (a).WHERE.b>.trim(1E1)=2000;.INS |
1a2f20 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 a0 47 | ERT.INTO.t4(a,b).VALUES(50,60).G |
1a2f40 | 3b 0a 81 1c 9b 61 04 00 82 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | ;....a...=CREATE.TABLE.t4(a.INT, |
1a2f60 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
1a2f80 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 45 30 3b 0a 43 52 45 41 54 45 20 | 1.ON.t4(a).WHERE.b<10E0;.CREATE. |
1a2fa0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
1a2fc0 | 20 62 3e 20 6a 73 6f 6e 5f 61 72 72 61 79 5f 6c 65 6e 67 74 68 28 31 45 31 29 3d 32 30 30 30 3b | .b>.json_array_length(1E1)=2000; |
1a2fe0 | 0a 49 81 54 9b 60 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c | .I.T.`...-CREATE.TABLE.t4(a.INT, |
1a3000 | 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b.INT);.CREATE.UNIQUE.INDEX.t4a |
1a3020 | 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 45 58 50 4c 41 49 4e 0a | 1.ON.t4(a).WHERE.b<1000;EXPLAIN. |
1a3040 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a2.ON.t4(a |
1a3060 | 29 20 57 48 45 52 45 20 62 3e 20 74 69 6d 65 28 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 | ).WHERE.b>.time(1,1,1)=2000;.INS |
1a3080 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f | ERT.INTO.t4(a,b).VALUES(50,60).O |
1a30a0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 9b 5f 04 00 | N.CONFLICT(a).DO.NOTHING;..0._.. |
1a30c0 | 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .eCREATE.TABLE.t4(a.INT,.b.INT); |
1a30e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
1a3100 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
1a3120 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2d 62 3e 3e 69 6e 73 74 | NDEX.t4a2.ON.t4(a).WHERE-b>>inst |
1a3140 | 72 28 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | r(1,1)=2000;.INSERT.INTO.t4(a,b) |
1a3160 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 4a 9b 5e 04 00 83 19 43 52 45 41 54 45 20 54 41 42 | .VALUES(50,60).J.^....CREATE.TAB |
1a3180 | 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | LE.t4(a.INT,.b.INT);.CREATE.UNIQ |
1a31a0 | 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 | UE.INDEX.t4a1.ON.t4(a).WHERE.b<1 |
1a31c0 | 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e | 000;.CREATE.UNIQUE.INDEX.t4a2.ON |
1a31e0 | 20 74 34 28 61 29 20 57 48 45 52 45 2d 20 5b 61 5d 69 6e 28 31 3c 31 29 3d 32 30 30 30 3b 0a 49 | .t4(a).WHERE-.[a]in(1<1)=2000;.I |
1a3200 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
1a3220 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 32 9b 5d | .ON.CONFLICT(a).DO.NOTHING;..2.] |
1a3240 | 04 00 82 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...iCREATE.TABLE.t4(a.INT,.b.INT |
1a3260 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a3280 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a32a0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2d 20 27 61 27 69 | .INDEX.t4a2.ON.t4(a).WHERE-.'a'i |
1a32c0 | 6e 28 31 2c 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | n(1,1)=2000;.INSERT.INTO.t4(a,b) |
1a32e0 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 a0 4f 3b 0a 81 41 9b 5c 04 00 83 07 43 52 45 41 54 45 | .VALUES(50,60).O;..A.\....CREATE |
1a3300 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
1a3320 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
1a3340 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
1a3360 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 6a 73 6f 6e 28 31 29 41 4e 44 20 74 72 75 65 | 2.ON.t4(a).WHERE+json(1)AND.true |
1a3380 | 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 | .INTO.t4(a,b).VALUES(50,60).ON.C |
1a33a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 41 9b 5b 04 00 83 07 43 | ONFLICT(a).DO.NOTHING;..A.[....C |
1a33c0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
1a33e0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
1a3400 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1a3420 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 2b 6a 73 6f 6e 28 31 29 3b 0a 49 | X.t4a2.ON.t4(a).WHERE+json(1);.I |
1a3440 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 2b 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(+0,60) |
1a3460 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 30 9b 5a | .ON.CONFLICT(a).DO.NOTHING;..0.Z |
1a3480 | 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ...eCREATE.TABLE.t4(a.INT,.b.INT |
1a34a0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a34c0 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a34e0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 23 62 3e 20 72 6f | .INDEX.t4a2.ON.t4(a).WHERE#b>.ro |
1a3500 | 75 6e 64 28 31 2c 31 29 41 4e 44 20 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c | und(1,1)AND.0;.INSERT.INTO.t4(a, |
1a3520 | 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 48 9b 59 04 00 83 15 43 52 45 41 54 45 20 54 | b).VALUES(50,60).H.Y....CREATE.T |
1a3540 | 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e | ABLE.t4(a.INT,.b.INT);.CREATE.UN |
1a3560 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
1a3580 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
1a35a0 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 6a 73 6f 6e 28 31 29 4e 4f 54 4e 55 4c 4c 3b 0a 49 | ON.t4(a).WHERE.json(1)NOTNULL;.I |
1a35c0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 | NSERT.INTO.t4(a,b).VALUES(50,60) |
1a35e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 47 9b 58 | .ON.CONFLICT(a).DO.NOTHING;..G.X |
1a3600 | 04 00 83 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 | ....CREATE.TABLE.t4(a.INT,.b.INT |
1a3620 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | );.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a3640 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a3660 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 6a 73 6f 6e 28 | .INDEX.t4a2.ON.t4(a).WHERE.json( |
1a3680 | 31 29 49 53 20 60 61 60 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 | 1)IS.`a`;.INSERT.INTO.t4(a,b).VA |
1a36a0 | 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f | LUES(50,60).ON.CONFLICT(a).DO.NO |
1a36c0 | 54 48 49 4e 47 3b 0a 81 2c 9b 57 04 00 82 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 | THING;..,.W...]CREATE.TABLE.t4(a |
1a36e0 | 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | .INT,.b.INT);.CREATE.UNIQUE.INDE |
1a3700 | 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 | X.t4a1.ON.t4(a).WHERE.b<1000;.CR |
1a3720 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a2.ON.t4(a). |
1a3740 | 57 48 45 52 45 20 6a 73 6f 6e 28 20 2d 31 20 7c 7c 20 31 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | WHERE.json(.-1.||.1);.INSERT.INT |
1a3760 | 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 3a 9b 56 04 00 82 79 43 | O.t4(a,b).VALUES(50,60).:.V...yC |
1a3780 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 | REATE.TABLE.t4(a.INT,.b.INT);.CR |
1a37a0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 | EATE.UNIQUE.INDEX.t4a1.ON.t4(a). |
1a37c0 | 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | WHERE.b<1000;.CREATE.UNIQUE.INDE |
1a37e0 | 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 6c 65 6e 67 74 68 28 31 | X.t4a2.ON.t4(a).WHERE.b>length(1 |
1a3800 | 45 32 30 30 31 2d 30 31 2d 30 31 31 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | E2001-01-011)=2000;.INSERT.INTO. |
1a3820 | 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 54 9b 55 04 00 83 2d 43 52 45 | t4(a,b).VALUES(50,60).T.U...-CRE |
1a3840 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 | ATE.TABLE.t4(a.INT,.b.INT);.CREA |
1a3860 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a1.ON.t4(a).WH |
1a3880 | 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | ERE.b<1000;.CREATE.UNIQUE.INDEX. |
1a38a0 | 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 6c 65 6e 67 74 68 28 20 6c 74 | t4a2.ON.t4(a).WHERE.b>length(.lt |
1a38c0 | 72 69 6d 28 39 2c 31 29 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 | rim(9,1))=2000;.INSERT.INTO.t4(a |
1a38e0 | 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | ,b).VALUES(50,60).ON.CONFLICT(a) |
1a3900 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 63 9b 54 04 00 83 4b 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..c.T...KCREATE.TABL |
1a3920 | 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | E.t4(a.INT,.b.INT);.CREATE.UNIQU |
1a3940 | 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 | E.INDEX.t4a1.ON.t4(a).WHERE.b<10 |
1a3960 | 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 | 00;.CREATE.UNIQUE.INDEX.t4a2.ON. |
1a3980 | 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 4e 4f 54 20 73 75 62 73 74 72 28 31 2c 31 2c 20 27 61 | t4(a).WHERE.b>NOT.substr(1,1,.'a |
1a39a0 | 27 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e | 'COLLATE.nocase)=2000;.INSERT.IN |
1a39c0 | 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | TO.t4(a,b).VALUES(50,60).ON.CONF |
1a39e0 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 1a 9b 53 04 00 82 39 43 52 45 41 | LICT(a).DO.NOTHING;....S...9CREA |
1a3a00 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 | TE.TABLE.t4(a.INT,.b.INT);.CREAT |
1a3a20 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
1a3a40 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | RE.b<1000;.CREATE.UNIQUE.INDEX.t |
1a3a60 | 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3e 6a 73 6f 6e 5f 72 65 6d 6f 76 | 4a2.ON.t4(a).WHERE.b>>json_remov |
1a3a80 | 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 30 9b 52 04 00 82 65 43 52 45 41 54 45 | e(ALL)=2000;VACUUM.0.R...eCREATE |
1a3aa0 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 | .TABLE.t4(a.INT,.b.INT);.CREATE. |
1a3ac0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a1.ON.t4(a).WHERE |
1a3ae0 | 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 | .b<1000;.CREATE.UNIQUE.INDEX.t4a |
1a3b00 | 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 3e 69 6e 73 74 72 28 31 2c 31 29 3d 32 | 2.ON.t4(a).WHERE.b>>instr(1,1)=2 |
1a3b20 | 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 | 000;.INSERT.INTO.t4(a,b).VALUES( |
1a3b40 | 35 30 2c 36 30 29 81 11 9b 51 04 00 82 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 | 50,60)...Q...'CREATE.TABLE.t4(a. |
1a3b60 | 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | INT,.b.INT);.CREATE.UNIQUE.INDEX |
1a3b80 | 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 | .t4a1.ON.t4(a).WHERE.b<1000;.CRE |
1a3ba0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 | ATE.UNIQUE.INDEX.t4a2.ON.t4(a).W |
1a3bc0 | 48 45 52 45 20 62 3e 3d 32 30 30 30 3b 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 20 0a 81 29 9b 50 04 | HERE.b>=2000;ANALYZE.INTO...).P. |
1a3be0 | 00 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 | ..WCREATE.TABLE.t4(a.INT,.b.INT) |
1a3c00 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 | ;.CREATE.UNIQUE.INDEX.t4a1.ON.t4 |
1a3c20 | 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | (a).WHERE.b<1000;.CREATE.UNIQUE. |
1a3c40 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 2e 32 38 30 | INDEX.t4a2.ON.t4(a).WHERE.b>.280 |
1a3c60 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
1a3c80 | 2c 36 30 29 a0 4f 4e 0a 81 0d 9b 4f 04 00 82 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 | ,60).ON....O....CREATE.TABLE.t4( |
1a3ca0 | 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | a.INT,.b.INT);.CREATE.UNIQUE.IND |
1a3cc0 | 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 | EX.t4a1.ON.t4(a).WHERE.b<1000;.C |
1a3ce0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a2.ON.t4(a) |
1a3d00 | 20 57 48 45 52 45 20 62 3e 2e 32 30 30 30 30 0a 49 4e 53 45 52 54 20 49 0a 81 0d 9b 4e 04 00 82 | .WHERE.b>.20000.INSERT.I....N... |
1a3d20 | 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a | .CREATE.TABLE.t4(a.INT,.b.INT);. |
1a3d40 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a3d60 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ).WHERE.b<1000;.CREATE.UNIQUE.IN |
1a3d80 | 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 2e 32 30 30 30 30 | DEX.t4a2.ON.t4(a).WHERE.b>.20000 |
1a3da0 | 0a 49 4e 20 45 52 54 20 49 0a 81 30 9b 4d 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .IN.ERT.I..0.M...eCREATE.TABLE.t |
1a3dc0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | 4(a.INT,.b.INT);.CREATE.UNIQUE.I |
1a3de0 | 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b | NDEX.t4a1.ON.t4(a).WHERE.b<1000; |
1a3e00 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a2.ON.t4( |
1a3e20 | 61 29 20 57 48 45 52 45 20 62 3e 20 7a 65 72 6f 62 6c 6f 62 28 31 29 7c 7c 20 30 3b 0a 49 4e 53 | a).WHERE.b>.zeroblob(1)||.0;.INS |
1a3e40 | 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 81 4d | ERT.INTO.t4(a,b).VALUES(50,60).M |
1a3e60 | 9b 4c 04 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 | .L....CREATE.TABLE.t4(a.INT,.b.I |
1a3e80 | 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e | NT);.CREATE.UNIQUE.INDEX.t4a1.ON |
1a3ea0 | 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .t4(a).WHERE.b<1000;.CREATE.UNIQ |
1a3ec0 | 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 | UE.INDEX.t4a2.ON.t4(a).WHERE.b>. |
1a3ee0 | 75 70 70 65 72 28 4e 55 4c 4c 29 3d 32 30 30 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 | upper(NULL)=2000;.INSERT.INTO.t4 |
1a3f00 | 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | (a,b).VALUES(50,60).ON.CONFLICT( |
1a3f20 | 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 4d 9b 4b 04 00 83 1f 43 52 45 41 54 45 20 54 41 | a).DO.NOTHING;..M.K....CREATE.TA |
1a3f40 | 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | BLE.t4(a.INT,.b.INT);.CREATE.UNI |
1a3f60 | 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c | QUE.INDEX.t4a1.ON.t4(a).WHERE.b< |
1a3f80 | 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f | 1000;.CREATE.UNIQUE.INDEX.t4a2.O |
1a3fa0 | 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 75 70 70 65 72 28 4e 55 4c 4c 29 3d 32 30 30 | N.t4(a).WHERE.b>.upper(NULL)=200 |
1a3fc0 | 30 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;.INSERT.INTO.t4(a,b).VALUES(50 |
1a3fe0 | 2c 36 30 29 00 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
1a4000 | 0d 00 00 00 23 01 2f 00 1f 58 1e ba 1e 15 1d 75 1c d9 1c 32 1b 8a 1a c5 1a 00 19 38 18 94 18 05 | ....#./..X.....u...2.......8.... |
1a4020 | 17 77 16 6c 15 5e 14 45 13 37 12 a8 11 f9 10 e5 0f d1 0e bc 0d a7 0c 87 0b 72 0a bc 09 a8 08 a3 | .w.l.^.E.7...............r...... |
1a4040 | 07 95 06 87 05 79 04 63 03 55 02 43 01 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....y.c.U.C./.................. |
1a4060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a4080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a40a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a40c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a40e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a4100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a4120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 82 10 9c 1b 04 00 84 25 43 52 45 41 54 45 20 54 41 | ......................%CREATE.TA |
1a4140 | 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | BLE.t6(...a.INT.UNIQUE.ON.CONFLI |
1a4160 | 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c | CT.fail,...b.INT.UNIQUE.ON.CONFL |
1a4180 | 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 | ICT.replace,...c.INT.UNIQUE.ON.C |
1a41a0 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 | ONFLICT.fail,...d.INT.UNIQUE.ON. |
1a41c0 | 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | CONFLICT.replace.);.INSERT.INTO. |
1a41e0 | 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 20 69 6e 73 74 72 28 31 2c 31 29 2c 36 | t6(a,b,c,d).VALUES(.instr(1,1),6 |
1a4200 | 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,7,8),(1,100,110,120)...ON.CONFL |
1a4220 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 56 41 43 55 | ICT(a).DO.UPDATE.SET.a=1000;VACU |
1a4240 | 55 4d 0a 82 0e 9c 1a 04 00 84 21 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 | UM........!CREATE.TABLE.t6(...a. |
1a4260 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 | INT.UNIQUE.ON.CONFLICT.fail,...b |
1a4280 | 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c | .INT.UNIQUE.ON.CONFLICT.replace, |
1a42a0 | 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c | ...c.INT.UNIQUE.ON.CONFLICT.fail |
1a42c0 | 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 | ,...d.INT.UNIQUE.ON.CONFLICT.rep |
1a42e0 | 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 | lace.);.INSERT.INTO.t6(a,b,c,d). |
1a4300 | 56 41 4c 55 45 53 28 20 61 2c 62 31 2c 32 2c 33 2c 20 61 2c 62 35 2c 36 2c 37 2c 38 29 2c 28 31 | VALUES(.a,b1,2,3,.a,b5,6,7,8),(1 |
1a4320 | 2c 31 30 30 2c 31 31 30 2c 31 2c 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ,100,110,1,0)...ON.CONFLICT(a).D |
1a4340 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 19 04 00 84 19 43 52 45 | O.UPDATE.SET.a=1000;.........CRE |
1a4360 | 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 | ATE.TABLE.t6(...a.INT.UNIQUE.ON. |
1a4380 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e | CONFLICT.fail,...b.INT.UNIQUE.ON |
1a43a0 | 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 | .CONFLICT.replace,...c.INT.UNIQU |
1a43c0 | 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 | E.ON.CONFLICT.fail,...d.INT.UNIQ |
1a43e0 | 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 | UE.ON.CONFLICT.replace.);.INSERT |
1a4400 | 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 20 2f 2a 20 2a 2f 28 | .INTO.t6(a,b,c,d).VALUES(./*.*/( |
1a4420 | 31 2c 31 29 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e | 1,1),6,7,8),(1,100,110,120)...ON |
1a4440 | 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 | .CONFLICT(b).DO.UPDATE.SET.a=100 |
1a4460 | 30 3b 0a 82 12 9c 18 04 00 84 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 | 0;........)CREATE.TABLE.t6(...a. |
1a4480 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 | INT.UNIQUE.ON.CONFLICT.fail,...b |
1a44a0 | 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c | .INT.UNIQUE.ON.CONFLICT.replace, |
1a44c0 | 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c | ...c.INT.UNIQUE.ON.CONFLICT.fail |
1a44e0 | 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 | ,...d.INT.UNIQUE.ON.CONFLICT.rep |
1a4500 | 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 | lace.);.INSERT.INTO.t6(a,b,c,d). |
1a4520 | 56 41 4c 55 45 53 28 20 20 61 2c 62 61 2c 62 31 2c 32 2c 33 2c 20 61 2c 62 35 2c 36 2c 37 2c 38 | VALUES(..a,ba,b1,2,3,.a,b5,6,7,8 |
1a4540 | 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ),(1,100,110,120)...ON.CONFLICT( |
1a4560 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 17 04 00 84 | a).DO.UPDATE.SET.a=1000;........ |
1a4580 | 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 | .CREATE.TABLE.t6(...a.INT.UNIQUE |
1a45a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 | .ON.CONFLICT.fail,...b.INT.UNIQU |
1a45c0 | 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 | E.ON.CONFLICT.replace,...c.INT.U |
1a45e0 | 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 | NIQUE.ON.CONFLICT.fail,...d.INT. |
1a4600 | 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e | UNIQUE.ON.CONFLICT.replace.);.IN |
1a4620 | 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 28 53 45 4c | SERT.INTO.t6(a,b,c,d).SELECT(SEL |
1a4640 | 45 43 54 20 61 2c 62 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a | ECT.a,b5,6,7,8),(1,100,110,120). |
1a4660 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ..ON.CONFLICT(a).DO.UPDATE.SET.a |
1a4680 | 3d 31 30 30 30 3b 0a 82 0a 9c 16 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a | =1000;.........CREATE.TABLE.t6(. |
1a46a0 | 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c | ..a.INT.UNIQUE.ON.CONFLICT.fail, |
1a46c0 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c | ...b.INT.UNIQUE.ON.CONFLICT.repl |
1a46e0 | 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ace,...c.INT.UNIQUE.ON.CONFLICT. |
1a4700 | 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | fail,...d.INT.UNIQUE.ON.CONFLICT |
1a4720 | 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 | .replace.);.INSERT.INTO.t6(a,b,c |
1a4740 | 2c 64 29 20 53 45 4c 45 43 54 28 31 2c 32 2c 33 2c 20 61 2c 62 35 2c 36 2c 37 2c 38 29 2c 28 31 | ,d).SELECT(1,2,3,.a,b5,6,7,8),(1 |
1a4760 | 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ,100,110,120)...ON.CONFLICT(a).D |
1a4780 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 15 04 00 84 19 43 52 45 | O.UPDATE.SET.a=1000;.........CRE |
1a47a0 | 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 | ATE.TABLE.t6(...a.INT.UNIQUE.ON. |
1a47c0 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e | CONFLICT.fail,...b.INT.UNIQUE.ON |
1a47e0 | 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 | .CONFLICT.replace,...c.INT.UNIQU |
1a4800 | 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 | E.ON.CONFLICT.fail,...d.INT.UNIQ |
1a4820 | 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 | UE.ON.CONFLICT.replace.);.INSERT |
1a4840 | 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 53 45 4c 45 43 54 20 2a 2c 32 2c 33 2c 20 | .INTO.t6(a,b,c,d).SELECT.*,2,3,. |
1a4860 | 61 2c 62 35 2c 43 4f 4e 46 4c 49 43 54 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e | a,b5,CONFLICT1,100,110,120)...ON |
1a4880 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 | .CONFLICT(a).DO.UPDATE.SET.a=100 |
1a48a0 | 30 3b 0a 82 01 9c 14 04 00 84 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 | 0;.........CREATE.TABLE.t6(...a. |
1a48c0 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 | INT.UNIQUE.ON.CONFLICT.fail,...b |
1a48e0 | 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c | .INT.UNIQUE.ON.CONFLICT.replace, |
1a4900 | 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c | ...c.INT.UNIQUE.ON.CONFLICT.fail |
1a4920 | 2c 0a 20 20 64 20 49 4e 54 20 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 | ,...d.INT..CONFLICT.replace.);.I |
1a4940 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t6(a,b,c,d).VALUES(1, |
1a4960 | 32 2c 33 2c 34 29 2c 28 47 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 | 2,3,4),(G,6,7,8),(1,100,110,120) |
1a4980 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
1a49a0 | 61 3d 31 30 30 30 3b 0a 82 10 9c 13 04 00 84 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 | a=1000;........%CREATE.TABLE.t6( |
1a49c0 | 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c | ...a.INT.UNIQUE.ON.CONFLICT.fail |
1a49e0 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 2c 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 | ,...b.INT.UNIQUE.,N.CONFLICT.rep |
1a4a00 | 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | lace,...c.INT.UNIQUE.ON.CONFLICT |
1a4a20 | 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .fail,...d.INT.UNIQUE.ON.CONFLIC |
1a4a40 | 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c | T.replace.);.INSERT.INTO.t6(a,b, |
1a4a60 | 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 | c,d).VALUES(1,2,3,4),(5,6,7,8),( |
1a4a80 | 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | 1,100,110,120)...ON.CONFLICT(a). |
1a4aa0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 56 41 43 55 55 4d 0a 81 32 9c 12 | DO.UPDATE.SET.a=1000;VACUUM..2.. |
1a4ac0 | 04 00 82 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 | ...iCREATE.TABLE.t6(...a.INT.UNI |
1a4ae0 | 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e | QUE.ON.CONFLICT.fail,...b.INT.UN |
1a4b00 | 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e | I.a,bON.CONFLICT.replace,...c.IN |
1a4b20 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 | T.UNIQUE.ON.CONFLICT.fail,...d.I |
1a4b40 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 43 4f | NT.UNIQUE.ON.CONFLICT.replace.CO |
1a4b60 | 4c 4c 41 54 45 20 6e 6f 63 61 73 65 20 74 36 28 3b 0a 82 11 9c 11 04 00 84 27 43 52 45 41 54 45 | LLATE.nocase.t6(;........'CREATE |
1a4b80 | 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e | .TABLE.t6(...a.INT.UNIQUE.ON.CON |
1a4ba0 | 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f | FLICT.fail,...b.INT.UNI.a,bON.CO |
1a4bc0 | 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f | NFLICT.replace,...c.INT.UNIQUE.O |
1a4be0 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 | N.CONFLICT.fail,...d.INT.UNIQUE. |
1a4c00 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 45 58 50 4c 41 49 4e 0a 49 4e | ON.CONFLICT.replace.);EXPLAIN.IN |
1a4c20 | 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 | SERT.INTO.t6(a,b,c,d).VALUES(1,2 |
1a4c40 | 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a | ,3,4),(5,6,7,8),(1,100,110,120). |
1a4c60 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 | ..ON.CONFLICT(a).DO.UPDATE.SET.a |
1a4c80 | 3d 31 30 30 30 3b 0a 82 1c 9c 10 04 00 84 3d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a | =1000;........=CREATE.TABLE.t6(. |
1a4ca0 | 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c | ..a.INT.UNIQUE.ON.CONFLICT.fail, |
1a4cc0 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c | ...b.INT.UNI.a,bON.CONFLICT.repl |
1a4ce0 | 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ace,...c.INT.UNIQUE.ON.CONFLICT. |
1a4d00 | 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | fail,...d.INT.UNIQUE.ON.CONFLICT |
1a4d20 | 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 | .replace.);.INSERT.INTO.t6(a,b,c |
1a4d40 | 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 | ,d).VALUES(1,2,3,4),(5,6,7,8),(1 |
1a4d60 | 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ,100,110,120)...ON.CONFLICT(a).D |
1a4d80 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 52 45 49 4e 44 45 58 20 72 74 72 69 | O.UPDATE.SET.a=1000;REINDEX.rtri |
1a4da0 | 6d 28 31 2c 31 29 0a 82 11 9c 0f 04 00 84 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a | m(1,1)........'CREATE.TABLE.t6(. |
1a4dc0 | 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c | ..a.INT.UNIQUE.ON.CONFLICT.fail, |
1a4de0 | 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c | ...b.INT.UNI.a,bON.CONFLICT.repl |
1a4e00 | 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ace,...c.INT.UNIQUE.ON.CONFLICT. |
1a4e20 | 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | fail,...d.INT.UNIQUE.ON.CONFLICT |
1a4e40 | 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 | .replace.);.INSERT.INTO.t6(a,b,c |
1a4e60 | 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 | ,d).VALUES(1,2,3,4),(5,6,7,8),(1 |
1a4e80 | 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | ,100,110,120)...ON.CONFLICT(a).D |
1a4ea0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 52 45 49 4e 44 45 58 0a 82 11 9c 0e | O.UPDATE.SET.a=1000;REINDEX..... |
1a4ec0 | 04 00 84 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 | ...'CREATE.TABLE.t6(...a.INT.UNI |
1a4ee0 | 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e | QUE.ON.CONFLICT.fail,...b.INT.UN |
1a4f00 | 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e | I.a,bON.CONFLICT.replace,...c.IN |
1a4f20 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 | T.UNIQUE.ON.CONFLICT.fail,...d.I |
1a4f40 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b | NT.UNIQUE.ON.CONFLICT.replace.); |
1a4f60 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t6(a,b,c,d).VALUES( |
1a4f80 | 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 | 1,2,3,4),(5,6,7,8),(1,100,110,12 |
1a4fa0 | 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 0)...ON.CONFLICT(a).DO.UPDATE.SE |
1a4fc0 | 54 20 61 3d 31 30 30 30 3b 41 4e 41 4c 59 5a 45 0a 82 10 9c 0d 04 00 84 25 43 52 45 41 54 45 20 | T.a=1000;ANALYZE........%CREATE. |
1a4fe0 | 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 | TABLE.t6(...a.INT.UNIQUE.ON.CONF |
1a5000 | 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e | LICT.fail,...b.INT.UNI.a,bON.CON |
1a5020 | 46 4c 49 43 54 20 72 65 70 2c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 20 61 2c 62 4e | FLICT.rep,ace,...c.INT.UNIQ.a,bN |
1a5040 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f | .CONFLICT.fail,...d.INT.UNIQUE.O |
1a5060 | 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | N.CONFLICT.replace.);.INSERT.INT |
1a5080 | 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t6(a,b,c,d).VALUES(1,2,3,4),(5 |
1a50a0 | 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e | ,6,7,8),(1,100,110,120)...ON.CON |
1a50c0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 56 41 | FLICT(a).DO.UPDATE.SET.a=1000;VA |
1a50e0 | 43 55 55 4d 0a 82 10 9c 0c 04 00 84 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 | CUUM........%CREATE.TABLE.t6(... |
1a5100 | 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 | a.INT.UNIQUE.ON.CONFLICT.fail,.. |
1a5120 | 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 61 6c 61 63 | .b.INT.UNI.a,bON.CONFLICT.realac |
1a5140 | 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | e,...c.INT.UNIQUE.ON.CONFLICT.fa |
1a5160 | 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 | il,...d.INT.UNIQUE.ON.CONFLICT.r |
1a5180 | 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 | eplace.);.INSERT.INTO.t6(a,b,c,d |
1a51a0 | 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 | ).VALUES(1,2,3,4),(5,6,7,8),(1,1 |
1a51c0 | 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 | 00,110,120)...ON.CONFLICT(a).DO. |
1a51e0 | 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 56 41 43 55 55 4d 0a 81 2b 9c 0b 04 00 82 | UPDATE.SET.a=1000;VACUUM..+..... |
1a5200 | 5b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 | [CREATE.TABLE.t6(...a.INT.UNIQUE |
1a5220 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 | .ON.CONFLICT.fail,...b.INT.UNI.a |
1a5240 | 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 54 20 72 65 61 6c 2c 0a 20 20 63 20 49 4e 72 54 20 | ,bON.CONFLICT.rT.real,...c.INrT. |
1a5260 | 72 65 61 6c 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 ff 54 20 55 | real,...c.INT.UNIQUE.ON.CONF.T.U |
1a5280 | 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 ff 49 43 54 20 66 20 4f 55 50 44 41 54 45 20 53 45 54 20 | NIQUE.ON.CONF.ICT.f.OUPDATE.SET. |
1a52a0 | 61 3d 31 30 30 30 3b 0a 81 0b 9c 0a 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 | a=1000;.........CREATE.TABLE.t6( |
1a52c0 | 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c | ...a.INT.UNIQUE.ON.CONFLICT.fail |
1a52e0 | 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 54 20 | ,...b.INT.UNI.a,bON.CONFLICT.rT. |
1a5300 | 72 65 61 6c 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | real,...c.INT.UNIQUE.ON.CONFLICT |
1a5320 | 20 66 20 4f 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 09 04 00 84 19 43 | .f.OUPDATE.SET.a=1000;.........C |
1a5340 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f | REATE.TABLE.t6(...a.INT.UNIQUE.O |
1a5360 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 20 61 2c 62 | N.CONFLICT.fail,...b.INT.UNI.a,b |
1a5380 | 4f 20 62 6c 6f 62 46 4c 49 43 54 20 72 65 61 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 | O.blobFLICT.realace,...c.INT.UNI |
1a53a0 | 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e | QUE.ON.CONFLICT.fail,...d.INT.UN |
1a53c0 | 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 | IQUE.ON.CONFLICT.replace.);.INSE |
1a53e0 | 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 | RT.INTO.t6(a,b,c,d).VALUES(1,2,3 |
1a5400 | 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 | ,4),(5,6,7,8),(1,100,110,120)... |
1a5420 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 | ON.CONFLICT(a).DO.UPDATE.SET.a=1 |
1a5440 | 30 30 30 3b 0a 82 15 9c 08 04 00 84 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 | 000;......../CREATE.TABLE.t6(... |
1a5460 | 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 | a.INT.UNIQUE.ON.CONFLICT.fail,.. |
1a5480 | 20 62 20 44 45 46 45 52 52 41 42 4c 45 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 61 6c 61 63 | .b.DEFERRABLEbON.CONFLICT.realac |
1a54a0 | 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | e,...c.INT.UNIQUE.ON.CONFLICT.fa |
1a54c0 | 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 | il,...d.INT.UNIQUE.ON.CONFLICT.r |
1a54e0 | 65 70 6c 61 63 65 0a 50 52 49 4d 41 52 59 20 4b 45 59 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | eplace.PRIMARY.KEY);.INSERT.INTO |
1a5500 | 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c | .t6(a,b,c,d).VALUES(1,2,3,4),(5, |
1a5520 | 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 | 6,7,8),(1,100,110,120)...ON.CONF |
1a5540 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a | LICT(a).DO.UPDATE.SET.a=1000;... |
1a5560 | 9c 07 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 | ......CREATE.TABLE.t6(...a.INT.U |
1a5580 | 4e 49 51 55 45 20 2c 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 | NIQUE.,N.CONFLICT.fail,...b.INT. |
1a55a0 | 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 | UNIQUE.ON.CONFLICT.replace,...c. |
1a55c0 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 | INT.UNIQUE.ON.CONFLICT.fail,...d |
1a55e0 | 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a | .INT.UNIQUE.ON.CONFLICT.replace. |
1a5600 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 | );.INSERT.INTO.t6(a,b,c,d).VALUE |
1a5620 | 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c | S(1,2,3,4),(5,6,7,8),(1,100,110, |
1a5640 | 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 | 120)...ON.CONFLICT(b).DO.UPDATE. |
1a5660 | 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 07 9c 06 04 00 84 13 43 52 45 41 54 45 20 54 41 42 4c 45 | SET.a=1000;.........CREATE.TABLE |
1a5680 | 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 20 43 4f 4a 46 4c 49 43 54 4f 4e 46 4c 49 43 54 20 | .t6(...a.INT.UN.COJFLICTONFLICT. |
1a56a0 | 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | fail,...b.INT.UNIQUE.ON.CONFLICT |
1a56c0 | 20 72 65 70 6c 61 63 65 2c 0a 20 20 4f 54 20 66 61 69 6c 2c 0a 20 20 4e 20 43 4f 4e 46 4c 49 43 | .replace,...OT.fail,...N.CONFLIC |
1a56e0 | 54 20 66 61 69 6c 2c 0a 20 20 64 49 4e 54 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | T.fail,...dINTT.UNIQUE.ON.CONFLI |
1a5700 | 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 4d 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 | CT.replace.);.INSMRT.INTO.t6(a,b |
1a5720 | 2c 63 2c 64 29 20 56 41 4c 55 2a 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c | ,c,d).VALU*S(1,2,3,4),(5,6,7,8), |
1a5740 | 28 31 2c 31 30 30 2c 31 31 41 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | (1,100,11A,120)...ON.CONFLICT(a) |
1a5760 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 81 0a 9c 05 04 00 82 19 43 | .DO.UPDATE.SET.a=1000;.........C |
1a5780 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 0a 20 20 62 20 49 4e 54 20 55 4e | REATE.TABLE.t6(...a.I...b.INT.UN |
1a57a0 | 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e | IQUE.ON.CONFLICT.replace,...c.IN |
1a57c0 | 54 20 55 45 36 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 | T.UE6ON.CONFLICT.fail,...d.INT.U |
1a57e0 | 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 50 52 49 4d 41 52 | NIQUE.ON.CONFLICT.replace.PRIMAR |
1a5800 | 59 20 4b 45 59 81 0b 9c 04 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | Y.KEY........CREATE.TABLE.t4(a.I |
1a5820 | 4e 80 ff ff ff 20 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | N.....INT);.CREATE.UNIQUE.INDEX. |
1a5840 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 5c 45 3c 31 2f 2a 30 3b 0a 43 20 57 48 45 52 45 20 | t4a1.ON.t4(a).W\E<1/*0;.C.WHERE. |
1a5860 | 62 4f 20 65 63 6f 72 64 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 | bO.ecordb).VALUES(50,60).ON.CONF |
1a5880 | 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 20 9c 03 04 00 82 45 43 52 45 41 | LICT(a).DO.NOTHING;........ECREA |
1a58a0 | 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 45 58 43 45 50 54 2c 20 62 20 49 4e 54 29 3b | TE.TABLE.t4(a.INTEXCEPT,.b.INT); |
1a58c0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX.t4a1.ON.t4( |
1a58e0 | 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<1000;.CREATE.UNIQUE.I |
1a5900 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e | NDEX.t4a2.ON.t4(a).WHERE.b>.json |
1a5920 | 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 44 9c 02 04 00 83 0d | _remove(ALL)=2000;VACUUM.D...... |
1a5940 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 31 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT1.b.INT);.C |
1a5960 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX.t4a1.ON.t4(a) |
1a5980 | 20 57 48 45 52 45 20 4e 4f 54 2f 2a 20 2a 2f 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | .WHERE.NOT/*.*/0;.CREATE.UNIQUE. |
1a59a0 | 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 2e 45 52 45 20 62 3e 3d 32 30 30 | INDEX.t4a2.ON.t4(a).W.ERE.b>=200 |
1a59c0 | 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 | 0;REPLACE.INTO.t4(a,b).VALUES(50 |
1a59e0 | 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,60).ON.CONFLICT(a).DO.NOTHING;. |
1a5a00 | 81 41 9c 01 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 | .A......CREATE.TABLE.t4(a.INT,.b |
1a5a20 | 2c 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | ,INT);.CREATE.UNIQUE.INDEX.t4a1. |
1a5a40 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 20 60 61 60 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<.`a`;.CREATE.UN |
1a5a60 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
1a5a80 | 3e 3d 32 30 30 30 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 | >=2000;REPLACE.INTO.t4(a,b).VALU |
1a5aa0 | 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 | ES(50,60).ON.CONFLICT(a).DO.NOTH |
1a5ac0 | 49 4e 47 3b 0a 81 41 9c 00 04 00 83 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 | ING;..A......CREATE.TABLE.t4(a.I |
1a5ae0 | 4e 54 2c 20 62 2c 49 4e 54 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 | NT,.b,INT);.CREATE.UNIQUE.INDEX. |
1a5b00 | 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 20 60 61 60 3b 0a 43 52 45 41 | t4a1.ON.t4(a).WHERE.b<.`a`;.CREA |
1a5b20 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 | TE.UNIQUE.INDEX.t4a2.ON.t4(a).WH |
1a5b40 | 45 52 45 20 62 3e 3d 20 60 61 60 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 34 28 61 2c 62 29 | ERE.b>=.`a`;REPLACE.INTO.t4(a,b) |
1a5b60 | 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | .VALUES(50,60).ON.CONFLICT(a).DO |
1a5b80 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 24 9b 7f 04 00 82 4d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;..$.....MCREATE.TABLE.t |
1a5ba0 | 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 6f 62 6a 65 63 74 29 3b 0a 43 52 45 41 54 45 20 55 4e | 4(a.INT,.b.INTobject);.CREATE.UN |
1a5bc0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a1.ON.t4(a).WHERE.b |
1a5be0 | 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 | <1000;.CREATE.UNIQUE.INDEX.t4a2. |
1a5c00 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 67 6c 6f 62 28 31 2c 31 29 3d 32 30 30 30 | ON.t4(a).WHERE.b>.glob(1,1)=2000 |
1a5c20 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4e 46 4c 49 43 54 81 23 9b 7e 04 00 82 4b 43 52 45 41 54 45 | ;.INSERT.INTNFLICT.#.~...KCREATE |
1a5c40 | 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 45 58 50 4c 41 49 4e 0a | .TABLE.t4(a.INT,.b.INT);EXPLAIN. |
1a5c60 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 | CREATE.UNIQUE.INDEX.t4a1.ON.t4(a |
1a5c80 | 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 55 4e | ).WHERE.b<1000;EXPLAIN.CREATE.UN |
1a5ca0 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
1a5cc0 | 3e 20 6a 73 6f 6e 5f 73 65 74 28 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 0a 81 18 9b 7d 04 00 82 | >.json_set(1,1,1)=2000;.....}... |
1a5ce0 | 35 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 45 | 5CREATE.TABLE.t4(a.INT,.b.INT);E |
1a5d00 | 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 | XPLAIN.CREATE.UNIQUE.INDEX.t4a1. |
1a5d20 | 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e | ON.t4(a).WHERE.b<1000;.CREATE.UN |
1a5d40 | 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 | IQUE.INDEX.t4a2.ON.t4(a).WHERE.b |
1a5d60 | 3e 3d 32 30 30 30 3b 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 0a 81 1c 9b 7c 04 00 82 3d 43 52 45 | >=2000;REINDEX.INTO.....|...=CRE |
1a5d80 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 45 58 50 4c 41 | ATE.TABLE.t4(a.INT,.b.INT);EXPLA |
1a5da0 | 49 4e 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | IN.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a5dc0 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a5de0 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 | .INDEX.t4a2.ON.t4(a).WHERE.b>.js |
1a5e00 | 6f 6e 5f 73 65 74 28 31 2c 31 2c 31 29 3d 32 30 30 30 3b 0a 0a 81 21 9b 7b 04 00 82 47 43 52 45 | on_set(1,1,1)=2000;...!.{...GCRE |
1a5e20 | 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 45 58 50 4c 41 | ATE.TABLE.t4(a.INT,.b.INT);EXPLA |
1a5e40 | 49 4e 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 | IN.CREATE.UNIQUE.INDEX.t4a1.ON.t |
1a5e60 | 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | 4(a).WHERE.b<1000;.CREATE.UNIQUE |
1a5e80 | 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 | .INDEX.t4a2.ON.t4(a).WHERE.b>.js |
1a5ea0 | 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 1a 9b 7a 04 00 | on_remove(ALL)=2000;VACUUM...z.. |
1a5ec0 | 82 39 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b | .9CREATE.TABLE.t4(a.INT,.b.INT); |
1a5ee0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 ff ff ff ff 20 4f 4e 20 74 34 28 | .CREATE.UNIQUE.INDEX......ON.t4( |
1a5f00 | 61 29 20 57 48 45 52 45 20 62 3c 3e 30 30 30 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | a).WHERE.b<>000;.CREATE.UNIQUE.I |
1a5f20 | 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3e 20 6a 73 6f 6e | NDEX.t4a2.ON.t4(a).WHERE.b>.json |
1a5f40 | 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 55 4d 81 24 9b 79 04 00 82 4d | _remove(ALL)=2000;VACUUM.$.y...M |
1a5f60 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 34 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 0a 43 | CREATE.TABLE.t4(a.INT,.b.INT);.C |
1a5f80 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 ff ff ff ff 20 4f 4e 20 74 34 28 61 29 | REATE.UNIQUE.INDEX......ON.t4(a) |
1a5fa0 | 20 57 48 45 52 45 20 62 3c 31 30 32 30 30 31 2d 30 31 2d 30 31 30 30 3b 0a 43 52 45 41 54 45 20 | .WHERE.b<102001-01-0100;.CREATE. |
1a5fc0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 32 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 | UNIQUE.INDEX.t4a2.ON.t4(a).WHERE |
1a5fe0 | 20 62 3e 20 6a 73 6f 6e 5f 72 65 6d 6f 76 65 28 41 4c 4c 29 3d 32 30 30 30 3b 56 41 43 55 55 4d | .b>.json_remove(ALL)=2000;VACUUM |
1a6000 | 0d 00 00 00 22 00 78 00 1e ea 1d dc 1c ce 1b c0 1a b2 19 9d 18 8f 17 81 16 ad 15 98 14 8a 13 6e | ....".x........................n |
1a6020 | 12 4c 11 32 10 82 0f 8b 0e 7d 0d 6f 0c 8f 0b 7b 0a 6d 09 5f 08 51 07 9b 06 7a 05 59 04 63 03 52 | .L.2.....}.o...{.m._.Q...z.Y.c.R |
1a6040 | 02 d2 02 52 01 d3 01 42 00 f4 00 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ...R...B...x.................... |
1a6060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 79 9c 3d 04 00 81 77 43 | ........................y.=...wC |
1a6080 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 4e 47 45 2c 20 62 20 55 4e 49 51 55 | REATE.TABLE.t7(a.UNINGE,.b.UNIQU |
1a60a0 | 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 | E);.INSERT.INTO.t7(a,b).VALUES(1 |
1a60c0 | 2c 31 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 | ,1),(1,2).ON.CONFLICT(b.COLLATE. |
1a60e0 | 62 69 78 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 4b 9c 3c 04 00 81 1b 43 52 45 41 54 | bixary).DO.NOTHING;.K.<....CREAT |
1a6100 | 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 20 52 45 46 45 52 45 4e 43 45 53 22 61 22 44 45 | E.TABLE.t7(a.UNI.REFERENCES"a"DE |
1a6120 | 46 45 52 52 41 42 4c 45 3b 0a 49 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | FERRABLE;.ITE.binary).DO.NOTHING |
1a6140 | 3b 0a 81 0d 9c 3b 04 00 82 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 20 | ;....;....CREATE.TABLE.t7(a.UNI. |
1a6160 | 52 45 46 45 52 45 4e 43 45 53 22 61 22 44 45 46 45 52 52 41 42 4c 45 2c 22 62 22 4e 49 51 55 45 | REFERENCES"a"DEFERRABLE,"b"NIQUE |
1a6180 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | );.INSERT.INTO.t7(a,b).VALUES(1, |
1a61a0 | 31 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 | 1),(1,2).ON.CONFLICT(b.COLLATE.b |
1a61c0 | 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 7c 9c 3a 04 00 81 7d 43 52 45 41 54 45 | inary).DO.NOTHING;.|.:...}CREATE |
1a61e0 | 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 33 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 | .TABLE.t7(a.UN3QUE,.b.UNIQUE);.I |
1a6200 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c 28 | NSERT.INTO.t7(a,b).VALUES(1,1),( |
1a6220 | 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 49 4e 54 69 | 1,2).ON.CONFLICT(b.COLLATE.bINTi |
1a6240 | 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 7d 9c 39 04 00 81 7f 43 52 45 41 54 45 20 | nary).DO.NOTHING;.}.9....CREATE. |
1a6260 | 54 41 42 4c 45 20 74 37 28 61 20 49 51 55 45 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 | TABLE.t7(a.IQUEUNIQUE,.b.UNIQUE) |
1a6280 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 | ;.INSERT.INTO.t7(a,b).VALUES(1,1 |
1a62a0 | 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 74 | ),(1,2).ON.CONFLICT(b.COLLATE.bt |
1a62c0 | 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 7d 9c 38 04 00 81 7f 43 52 45 41 54 45 20 | nary).DO.NOTHING;.}.8....CREATE. |
1a62e0 | 54 41 42 4c 45 20 74 37 28 20 60 60 e0 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 | TABLE.t7(.``.a.UNIQUE,.b.UNIQUE) |
1a6300 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 | ;.INSERT.INTO.t7(a,b).VALUES(1,1 |
1a6320 | 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 | ),(1,2).ON.CONFLICT(b.COLLATE.bi |
1a6340 | 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 82 0d 9c 37 04 00 84 1f 43 52 45 41 54 45 | nary).DO.NOTHING;....7....CREATE |
1a6360 | 20 54 41 42 4c 45 20 74 36 49 4e 54 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 | .TABLE.t6INT(...a.INT.UNIQUE.ON. |
1a6380 | 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e | CONFLICT.fail,...b.INT.UNIQUE.ON |
1a63a0 | 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 52 45 43 | .CONFLICT.replace,...c.INT.UNREC |
1a63c0 | 55 52 53 49 56 45 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 | URSIVEONFLICT.fail,...d.INT.UNIQ |
1a63e0 | 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 | UE.ON.CONFLICT.replace.);.INSERT |
1a6400 | 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 | .INTO.t6(a,b,c,d).VALUES(1,2,3,4 |
1a6420 | 29 2c 28 35 2c 36 2c 37 2c 38 29 37 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e | ),(5,6,7,8)7(1,100,110,120)...ON |
1a6440 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 40 54 45 20 53 45 54 20 61 3d 31 30 30 | .CONFLICT(a).DO.UPD@TE.SET.a=100 |
1a6460 | 30 3b 0a 81 72 9c 36 04 00 83 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 66 | 0;..r.6...iCREATE.TABLE.t6(...af |
1a6480 | 61 4c 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | aLl,...b.INT.UNIQUE.ON.CONFLICT. |
1a64a0 | 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c | replace,...c.INT.UNIQUE.ON.CONFL |
1a64c0 | 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 | ICT.fail,...d.INT.UNIQUE.ON.CONF |
1a64e0 | 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 | LICT.replace.);.INSERT.INTO.t6(a |
1a6500 | 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 | ,b,c,d).VALUES(1,2,3,4),(5,6,7,8 |
1a6520 | 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ),(1,100,110,120)...ON.CONFLICT( |
1a6540 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 1d 9c 35 04 00 84 | a).DO.UPDATE.SET.a=1000;....5... |
1a6560 | 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 57 49 54 48 4f 55 54 20 52 4f | ?CREATE.TABLE.t6(...a.WITHOUT.RO |
1a6580 | 57 49 44 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a | WIDINT.UNIQUE.ON.CONFLICT.fail,. |
1a65a0 | 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 | ..b.INT.UNIQUE.ON.CONFLICT.repla |
1a65c0 | 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | ce,...c.INT.UNIQUE.ON.CONFLICT.f |
1a65e0 | 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ail,...d.INT.UNIQUE.ON.CONFLICT. |
1a6600 | 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c | replace.);.INSERT.INTO.t6(a,b,c, |
1a6620 | 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c | d).VALUES(1,2,3,4),(5,6,7,8),(1, |
1a6640 | 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | 100,110,120)...ON.CONFLICT(a).DO |
1a6660 | 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 56 41 43 55 55 4d 0a 82 1d 9c 34 04 00 | .UPDATE.SET.a=1000;VACUUM....4.. |
1a6680 | 84 3f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 c2 c2 c2 c2 c2 c2 c2 c2 | .?CREATE.TABLE.t6(...a.I........ |
1a66a0 | c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 c2 4e 54 20 55 4e 49 51 55 | ........................NT.UNIQU |
1a66c0 | 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 46 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 | E.ON.CONFLICT.Fail,...b.INT.UNIQ |
1a66e0 | 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 | UE.ON.CONFLICT.replace,...c.INT. |
1a6700 | 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 | UNIQUE.ON.CONFLICT.fail,...d.INT |
1a6720 | 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 | .UNIQUE.ON.CONFLICT.replace.);.I |
1a6740 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t6(a,b,c,d).VALUES(1, |
1a6760 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 43 3b 0a 49 4e 53 45 | 2,3,4),(5,6,7,8),(1,100,1C;.INSE |
1a6780 | 52 54 20 49 4e 54 4f 20 74 36 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 81 32 9c 33 04 | RT.INTO.t6DATE.SET.a=1000;..2.3. |
1a67a0 | 00 82 69 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 | ..iCREATE.TABLE.t6(...a.INT.UNIQ |
1a67c0 | 55 45 a0 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 | UE.ON.CONFLICT.fail,...b.INT.UNI |
1a67e0 | 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 | .a,bON.CONFLICT.replace,...c.INT |
1a6800 | 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e | .UNIQUE.ON.CONFLICT.fail,...d.IN |
1a6820 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 43 4f 4c | T.UNIQUE.ON.CONFLICT.replace.COL |
1a6840 | 4c 41 54 45 20 6e 6f 63 61 73 65 20 74 36 28 3b 0a 82 0a 9c 32 04 00 84 19 43 52 45 41 54 45 20 | LATE.nocase.t6(;....2....CREATE. |
1a6860 | 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 | TABLE.t6(...a.INT.UNIQUE.ON.CONF |
1a6880 | 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 2c 49 4e 54 2c 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e | LICT.fail,...b,INT,UNI.a,bON.CON |
1a68a0 | 46 4c 49 43 54 20 72 65 70 2c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e | FLICT.rep,ace,...c.INT.UNIQUE.ON |
1a68c0 | 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f | .CONFLICT.fail,...d.INT.UNIQUE.O |
1a68e0 | 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 | N.CONFLICT.replace.);REPLACE.INT |
1a6900 | 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 | O.t6(a,b,c,d).VALUES(1,2,3,4),(5 |
1a6920 | 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e | ,6,7,8),(1,100,110,120)...ON.CON |
1a6940 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 | FLICT(a).DO.UPDATE.SET.a=1000;.. |
1a6960 | 0a 9c 31 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 | ..1....CREATE.TABLE.t6(...a.INT. |
1a6980 | 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 2c 49 4e 54 | UNIQUE.ON.CONFLICT.fail,...b,INT |
1a69a0 | 2c 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 2c 61 63 65 2c 0a 20 20 63 | ,UNI.a,bON.CONFLICT.rep,ace,...c |
1a69c0 | 20 49 4e 54 20 55 4e 49 51 20 61 2c 62 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 | .INT.UNIQ.a,bN.CONFLICT.fail,... |
1a69e0 | 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 | d.INT.UNIQUE.ON.CONFLICT.replace |
1a6a00 | 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 | .);.INSERT.INTO.t6(a,b,c,d).VALU |
1a6a20 | 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 | ES(1,2,3,4),(5,6,7,8),(1,100,110 |
1a6a40 | 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | ,120)...ON.CONFLICT(a).DO.UPDATE |
1a6a60 | 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 30 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c | .SET.a=1000;....0....CREATE.TABL |
1a6a80 | 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | E.t6(...a.INT.UNIQUE.ON.CONFLICT |
1a6aa0 | 20 66 61 69 6c 2c 0a 20 20 62 2c 49 4e 54 20 55 4e 49 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 | .fail,...b,INT.UNI.a,bON.CONFLIC |
1a6ac0 | 54 20 72 65 70 2c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e | T.rep,ace,...c.INT.UNIQUE.ON.CON |
1a6ae0 | 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f | FLICT.fail,...d.INT.UNIQUE.ON.CO |
1a6b00 | 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 74 36 | NFLICT.replace.);REPLACE.INTO.t6 |
1a6b20 | 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 | (a,b,c,d).VALUES(1,2,3,4),(5,6,7 |
1a6b40 | 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | ,8),(1,100,110,120)...ON.CONFLIC |
1a6b60 | 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 10 9c 2f 04 | T(a).DO.UPDATE.SET.a=1000;..../. |
1a6b80 | 00 84 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 | ..%CREATE.TABLE.t6(...a.INT.UNIQ |
1a6ba0 | 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 2c 49 4e 54 20 55 4e 49 | UE.ON.CONFLICT.fail,...b,INT.UNI |
1a6bc0 | 20 61 2c 62 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 2c 61 63 65 2c 0a 20 20 63 20 49 4e 54 | .a,bON.CONFLICT.rep,ace,...c.INT |
1a6be0 | 20 55 4e 49 51 20 61 2c 62 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e | .UNIQ.a,bN.CONFLICT.fail,...d.IN |
1a6c00 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a | T.UNIQUE.ON.CONFLICT.replace.);. |
1a6c20 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 | INSERT.INTO.t6(a,b,c,d).VALUES(1 |
1a6c40 | 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 | ,2,3,4),(5,6,7,8),(1,100,110,120 |
1a6c60 | 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | )...ON.CONFLICT(a).DO.UPDATE.SET |
1a6c80 | 20 61 3d 31 30 30 30 3b 56 41 43 55 55 4d 0a 81 5c 9c 2e 04 00 83 3d 43 52 45 41 54 45 20 54 41 | .a=1000;VACUUM..\.....=CREATE.TA |
1a6ca0 | 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | BLE.t6(...a.INT.UNIQUE.ON.CONFLI |
1a6cc0 | 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 69 6c 2c 0a 49 51 55 45 55 50 44 41 54 45 20 4f 31 | CT.fail,...b.INil,.IQUEUPDATE.O1 |
1a6ce0 | 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | .CONFLICT.rep.UNIQUE.ON.CONFLICT |
1a6d00 | 20 66 61 69 6c 2c 0a 20 20 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 49 4e 44 4f 20 74 36 28 61 2c | .fail,...LICT.fail,...INDO.t6(a, |
1a6d20 | 62 2c 63 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 | b,cS(1,2,3,4),(5,6,7,8),(1,100,1 |
1a6d40 | 31 30 7f 00 32 30 7f ff ff ff 4f 4e 20 43 57 4e 46 4c 36 43 54 28 61 29 20 44 4f 20 55 50 44 41 | 10..20....ON.CWNFL6CT(a).DO.UPDA |
1a6d60 | 54 45 ec 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 2d 04 00 84 19 43 52 45 41 54 45 20 54 41 | TE.SET.a=1000;....-....CREATE.TA |
1a6d80 | 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | BLE.t6(...a.INT.UNIQUE.ON.CONFLI |
1a6da0 | 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 a7 4f 4e 20 43 4f 4e 46 4c | CT.fail,...b.INT.UNIQUE.ON.CONFL |
1a6dc0 | 49 43 54 20 72 65 70 6c 61 63 65 ac 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 | ICT.replace....c.INT.UNIQUE.ON.C |
1a6de0 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 | ONFLICT.fail,...d.INT.UNIQUE.ON. |
1a6e00 | 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | CONFLICT.replace.);.INSERT.INTO. |
1a6e20 | 74 36 28 61 2c 62 2c 41 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t6(a,b,A,d).VALUES(1,2,3,4),(5,6 |
1a6e40 | 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,7,8),(1,100,110,120)...ON.CONFL |
1a6e60 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c | ICT(a).DO.UPDATE.SET.a=1000;.... |
1a6e80 | 2c 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e | ,....CREATE.TABLE.t6(...a.INT.UN |
1a6ea0 | 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 | IQUE.ON.CONFLICT.fail,...b.INT.U |
1a6ec0 | 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 2c 49 | NIQUE.ON.CONFLICT.replace,...c,I |
1a6ee0 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 | NT.UNIQUE.ON.CONFLICT.fail,...d. |
1a6f00 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 52 4f 4c 4c 42 41 43 4b 29 | INT.UNIQUE.ON.CONFLICT.ROLLBACK) |
1a6f20 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t6(a,b,c,d).VALUES |
1a6f40 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 | (1,2,3,4),(5,6,7,8),(1,100,110,1 |
1a6f60 | 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 20)...ON.CONFLICT(b).DO.UPDATE.S |
1a6f80 | 45 54 20 61 3d 31 30 30 30 3b 0a 81 73 9c 2b 04 00 83 6b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | ET.a=1000;..s.+...kCREATE.TABLE. |
1a6fa0 | 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 | t6(...a.INT.UNIQUE.ON.CONFLICT.f |
1a6fc0 | 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | ail,...b.INT.UNIQUE.ON.CONFLICT. |
1a6fe0 | 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 | replace,...c.Iail,...d.INT.UNIQU |
1a7000 | 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 | E.ON.CONFLICT.replace.);.INSERT. |
1a7020 | 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 | INTO.t6(a,b,c,d).VALUES(1,2,3,4) |
1a7040 | 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 b1 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 | ,(5,6,7,8),(.,100,110,120)...ON. |
1a7060 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 4c 41 54 45 20 53 45 54 20 61 55 31 30 30 30 | CONFLICT(a).DO.UPLATE.SET.aU1000 |
1a7080 | 3b 0a 81 2c 9c 2a 04 00 82 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 | ;..,.*...]CREATE.TABLE.t6(...a.I |
1a70a0 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 | NT.UNIQUE.ON.CONFLICT.fail,...b. |
1a70c0 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a | INT.UNIQUE.ON.CONFLICT.replace,. |
1a70e0 | 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c | ..c.INT.UNIQUE.ON.CONFLICT.fail, |
1a7100 | 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | ...d.INT.UNIQUE.UNIQUE.ON.CONFLI |
1a7120 | 43 54 20 66 61 69 6c 2c 0a 53 45 52 54 20 49 4e 54 4f 82 16 9c 29 04 00 84 31 43 52 45 41 54 45 | CT.fail,.SERT.INTO...)...1CREATE |
1a7140 | 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e | .TABLE.t6(...a.INT.UNIQUE.ON.CON |
1a7160 | 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f | FLICT.fail,...b.INT.UNIQUE.ON.CO |
1a7180 | 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f | NFLICT.replace,...c.INT.UNIQUE.O |
1a71a0 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 | N.CONFLICT.fail,...d.INT.UNIQUE. |
1a71c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 55 4e 49 51 55 45 29 3b 0a 49 4e 53 | ON.CONFLICT.replace.UNIQUE);.INS |
1a71e0 | 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ERT.INTO.t6(a,b,c,d).VALUES(1,2, |
1a7200 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 | 3,4),(5,6,7,8),(1,100,110,120).. |
1a7220 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | .ON.CONFLICT(a).DO.UPDATE.SET.a= |
1a7240 | 31 30 30 30 3b 56 41 43 55 55 4d 0a 82 1e 9c 28 04 00 84 41 43 52 45 41 54 45 20 54 41 42 4c 45 | 1000;VACUUM....(...ACREATE.TABLE |
1a7260 | 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 | .t6(...a.INT.UNIQUE.ON.CONFLICT. |
1a7280 | 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | fail,...b.INT.UNIQUE.ON.CONFLICT |
1a72a0 | 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 | .replace,...c.INT.UNIQUE.ON.CONF |
1a72c0 | 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e | LICT.fail,...d.INT.UNIQUE.ON.CON |
1a72e0 | 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b 0a 49 | FLICT.replace.COLLATE.nocase);.I |
1a7300 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c | NSERT.INTO.t6(a,b,c,d).VALUES(1, |
1a7320 | 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 | 2,3,4),(5,6,7,8),(1,100,110,120) |
1a7340 | 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
1a7360 | 61 3d 31 30 30 30 3b 56 41 43 55 55 4d 0a 82 18 9c 27 04 00 84 35 43 52 45 41 54 45 20 54 41 42 | a=1000;VACUUM....'...5CREATE.TAB |
1a7380 | 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 | LE.t6(...a.INT.UNIQUE.ON.CONFLIC |
1a73a0 | 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | T.fail,...b.INT.UNIQUE.ON.CONFLI |
1a73c0 | 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f | CT.replace,...c.INT.UNIQUE.ON.CO |
1a73e0 | 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 | NFLICT.fail,...d.INT.UNIQUE.ON.C |
1a7400 | 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b | ONFLICT.replace.COLLATE.nocase); |
1a7420 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t6(a,b,c,d).VALUES( |
1a7440 | 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 | 1,2,3,4),(5,6,7,8),(1,100,110,12 |
1a7460 | 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 0)...ON.CONFLICT(a).DO.UPDATE.SE |
1a7480 | 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 26 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | T.a=1000;....&....CREATE.TABLE.t |
1a74a0 | 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | 6(...a.INT.UNIQUE.ON.CONFLICT.fa |
1a74c0 | 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 | il,...b.INT.UNIQUE.ON.CONFLICT.r |
1a74e0 | 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | eplace,...c.INT.UNIQUE.ON.CONFLI |
1a7500 | 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c | CT.fail,...d.INT.UNIQUE.ON.CONFL |
1a7520 | 49 43 54 20 72 65 70 6c 61 63 65 0a 29 57 49 54 48 4f 55 54 20 52 4f 57 49 44 20 74 36 28 61 2c | ICT.replace.)WITHOUT.ROWID.t6(a, |
1a7540 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 | b,c,d).VALUES(1,2,3,4),(5,6,7,8) |
1a7560 | 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 2c 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | ,(1,100,110,1,0)...ON.CONFLICT(a |
1a7580 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 11 9c 25 04 00 84 27 | ).DO.UPDATE.SET.a=1000;....%...' |
1a75a0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 | CREATE.TABLE.t6(...a.INT.UNIQUE. |
1a75c0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 | ON.CONFLICT.fail,...b.INT.UNIQUE |
1a75e0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e | .ON.CONFLICT.replace,...c.INT.UN |
1a7600 | 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 | IQUE.ON.CONFLICT.fail,...d.INT.U |
1a7620 | 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 52 45 50 4c | NIQUE.ON.CONFLICT.replace.);REPL |
1a7640 | 41 43 45 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c | ACE.INTO.t6(a,b,c,d).VALUES(1,2, |
1a7660 | 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 | 3,4),(5,6,7,8),(1,100,110,120).. |
1a7680 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d | .ON.CONFLICT(a).DO.UPDATE.SET.a= |
1a76a0 | 31 30 30 30 3b 52 45 49 4e 44 45 58 0a 81 50 9c 24 04 00 83 25 43 52 45 41 54 45 20 54 41 42 4c | 1000;REINDEX..P.$...%CREATE.TABL |
1a76c0 | 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | E.t6(...a.INT.UNIQUE.ON.CONFLICT |
1a76e0 | 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 | .fail,...b.INT.UNIQUE.ON.CONFLIC |
1a7700 | 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e | T.replace,...c.INT.UNIQUE.ON.CON |
1a7720 | 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f | FLICT.fail,...d.INT.UNIQUE.ON.CO |
1a7740 | 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 | NFLICT.replace.);.INSERT.INTO.t6 |
1a7760 | 28 61 2c 62 2c 63 2c 64 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 20 56 | (a,b,c,db,c,d).VALUES(1,2,3,4).V |
1a7780 | 41 82 0a 9c 23 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e | A...#....CREATE.TABLE.t6(...a.IN |
1a77a0 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 | T.UNIQUE.ON.CONFLICT.fail,...b.I |
1a77c0 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 | NT.UNIQUE.ON.CONFLICT.replace,.. |
1a77e0 | 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a | .c.INT.UNIQUE.ON.CONFLICT.fail,. |
1a7800 | 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 | ..d.INT.UNIQUE.ON.CONFLICT.repla |
1a7820 | 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 | ce.);.INSERT.INTO.t6(a,b,c,d).VA |
1a7840 | 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 3f 30 30 2c 31 | LUES(1,2,3,4),(5,6,7,8),(1,?00,1 |
1a7860 | 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | 10,120)...ON.CONFLICT(a).DO.UPDA |
1a7880 | 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 22 04 00 84 19 43 52 45 41 54 45 20 54 41 | TE.SET.a=1000;...."....CREATE.TA |
1a78a0 | 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | BLE.t6(...a.INT.UNIQUE.ON.CONFLI |
1a78c0 | 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c | CT.fail,...b.INT.UNIQUE.ON.CONFL |
1a78e0 | 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 | ICT.replace,...c.INT.UNIQUE.ON.C |
1a7900 | 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 | ONFLICT.fail,...d.INT.UNIQUE.ON. |
1a7920 | 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | CONFLICT.replace.);.INSERT.INTO. |
1a7940 | 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 | t6(a,b,c,d).VALUES(1,2,3,4),(5,6 |
1a7960 | 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 3f 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c | ,7,8),(1,100,110,?20)...ON.CONFL |
1a7980 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 11 9c | ICT(a).DO.UPDATE.SET.a=1000;.... |
1a79a0 | 21 04 00 84 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e | !...'CREATE.TABLE.t6(...a.INT.UN |
1a79c0 | 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 | IQUE.ON.CONFLICT.fail,...b.INT.U |
1a79e0 | 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 | NIQUE.ON.CONFLICT.replace,...c.I |
1a7a00 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 | NT.UNIQUE.ON.CONFLICT.fail,...d. |
1a7a20 | 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 | INT.UNIQUE.ON.CONFLICT.replace.) |
1a7a40 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 | ;.INSERT.INTO.t6(a,b,c,d).VALUES |
1a7a60 | 28 31 2c 32 2c 33 2c 34 29 2c 28 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 | (1,2,3,4),(5,6,7,8),(1,100,110,1 |
1a7a80 | 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | 20)...ON.CONFLICT(a).DO.UPDATE.S |
1a7aa0 | 45 54 20 61 3d 31 30 30 30 3b 41 4e 41 4c 59 5a 45 0a 82 0a 9c 20 04 00 84 19 43 52 45 41 54 45 | ET.a=1000;ANALYZE.........CREATE |
1a7ac0 | 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e | .TABLE.t6(...a.INT.UNIQUE.ON.CON |
1a7ae0 | 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f | FLICT.fail,...b.INT.UNIQUE.ON.CO |
1a7b00 | 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f | NFLICT.replace,...c.INT.UNIQUE.O |
1a7b20 | 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 | N.CONFLICT.fail,...d.INT.UNIQUE. |
1a7b40 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e | ON.CONFLICT.replace.);.INSERT.IN |
1a7b60 | 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 34 29 2c 28 | TO.t6(a,b,c,d).VALUES(1,2,3,4),( |
1a7b80 | 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f | 5,6,7,8),(1,100,110,120)...ON.CO |
1a7ba0 | 4e 46 4c 49 43 54 28 3f 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a | NFLICT(?).DO.UPDATE.SET.a=1000;. |
1a7bc0 | 82 0a 9c 1f 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 | ........CREATE.TABLE.t6(...a.INT |
1a7be0 | 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e | .UNIQUE.ON.CONFLICT.fail,...b.IN |
1a7c00 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 | T.UNIQUE.ON.CONFLICT.replace,... |
1a7c20 | 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 | c.INT.UNIQUE.ON.CONFLICT.fail,.. |
1a7c40 | 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 | .d.INT.UNIQUE.ON.CONFLICT.replac |
1a7c60 | 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c | e.);.INSERT.INTO.t6(a,b,c,d).VAL |
1a7c80 | 55 45 53 28 31 2c 32 2c 33 2c 20 61 2e 62 ca d3 c9 d3 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 | UES(1,2,3,.a.b....7,8),(1,100,11 |
1a7ca0 | 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 | 0,120)...ON.CONFLICT(a).DO.UPDAT |
1a7cc0 | 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 1e 04 00 84 19 43 52 45 41 54 45 20 54 41 42 | E.SET.a=1000;.........CREATE.TAB |
1a7ce0 | 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 | LE.t6(...a.INT.UNIQUE.ON.CONFLIC |
1a7d00 | 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | T.fail,...b.INT.UNIQUE.ON.CONFLI |
1a7d20 | 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f | CT.replace,...c.INT.UNIQUE.ON.CO |
1a7d40 | 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 | NFLICT.fail,...d.INT.UNIQUE.ON.C |
1a7d60 | 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ONFLICT.replace.);.INSERT.INTO.t |
1a7d80 | 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 32 2c 33 2c 20 61 2e 62 35 ac 36 2c | 6(a,b,c,d).VALUES(1,2,3,.a.b5.6, |
1a7da0 | 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 | 7,8),(1,100,110,120)...ON.CONFLI |
1a7dc0 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a 82 0a 9c 1d | CT(a).DO.UPDATE.SET.a=1000;..... |
1a7de0 | 04 00 84 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 | ....CREATE.TABLE.t6(...a.INT.UNI |
1a7e00 | 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e | QUE.ON.CONFLICT.fail,...b.INT.UN |
1a7e20 | 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e | IQUE.ON.CONFLICT.replace,...c.IN |
1a7e40 | 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 | T.UNIQUE.ON.CONFLICT.fail,...d.I |
1a7e60 | 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b | NT.UNIQUE.ON.CONFLICT.replace.); |
1a7e80 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 | .INSERT.INTO.t6(a,b,c,d).VALUES( |
1a7ea0 | 31 2c 32 2c 33 2c 20 61 2e 62 35 2c 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 | 1,2,3,.a.b5,6,7,8),(1,100,110,12 |
1a7ec0 | 30 29 0a 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 | 0)...ON.CONFLICT(a).DO.UPDATE.SE |
1a7ee0 | 54 20 61 3d 31 30 30 30 3b 0a 82 12 9c 1c 04 00 84 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | T.a=1000;........)CREATE.TABLE.t |
1a7f00 | 36 28 0a 20 20 61 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 66 61 | 6(...a.INT.UNIQUE.ON.CONFLICT.fa |
1a7f20 | 69 6c 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 20 72 | il,...b.INT.UNIQUE.ON.CONFLICT.r |
1a7f40 | 65 70 6c 61 63 65 2c 0a 20 20 63 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c 49 | eplace,...c.INT.UNIQUE.ON.CONFLI |
1a7f60 | 43 54 20 66 61 69 6c 2c 0a 20 20 64 20 49 4e 54 20 55 4e 49 51 55 45 20 4f 4e 20 43 4f 4e 46 4c | CT.fail,...d.INT.UNIQUE.ON.CONFL |
1a7f80 | 49 43 54 20 72 65 70 6c 61 63 65 0a 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 36 28 61 2c | ICT.replace.);.INSERT.INTO.t6(a, |
1a7fa0 | 62 2c 63 2c 64 29 20 56 41 4c 55 45 53 28 31 2c 20 61 2e 62 32 2c 33 2c 34 29 2c 28 35 2c 20 61 | b,c,d).VALUES(1,.a.b2,3,4),(5,.a |
1a7fc0 | 2e 62 36 2c 37 2c 38 29 2c 28 31 2c 31 30 30 2c 31 31 30 2c 31 32 30 29 0a 20 20 4f 4e 20 43 4f | .b6,7,8),(1,100,110,120)...ON.CO |
1a7fe0 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 31 30 30 30 3b 0a | NFLICT(a).DO.UPDATE.SET.a=1000;. |
1a8000 | 0d 00 00 00 36 00 d3 00 1f b0 1f 34 1e e7 1e 9a 1e 1a 1d 9e 1d 22 1c 9d 1c 00 1b 7b 1a f6 1a 6b | ....6......4.........".....{...k |
1a8020 | 19 ef 19 6b 18 ef 18 73 17 f3 17 73 16 ec 16 68 15 e4 15 68 15 19 14 ca 14 0f 13 54 12 9f 11 e4 | ...k...s...s...h...h.......T.... |
1a8040 | 11 24 10 97 10 0a 0f 7b 0e b8 0e 2b 0d 9e 0c df 0c 52 0b 9d 0a d7 0a 47 09 af 09 0f 08 7f 07 ef | .$.....{...+.....R.....G........ |
1a8060 | 07 5f 06 9e 05 d3 05 08 04 47 03 86 02 bb 01 f0 01 60 00 d3 00 00 00 00 00 00 00 00 00 00 00 00 | ._.......G.......`.............. |
1a8080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a80a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1a80c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 09 9c 73 04 00 82 17 43 52 45 41 54 | ......................s....CREAT |
1a80e0 | 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c | E.TABLE.t8(a.INT.PRIMARY.KEY,.b, |
1a8100 | 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 | .c);.CREATE.UNIQUE.INDEX.t8x.ON. |
1a8120 | 74 38 28 28 62 7c 78 27 78 ff ff 80 00 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e | t8((b|x'x....,(2,'one',3).....ON |
1a8140 | 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | .CONFLICT((b||'x')).DO.NOTHING;. |
1a8160 | 81 0c 9c 72 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 | ...r....CREATE.TABLE.t8(a.INT.PR |
1a8180 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | IMARY.KEY,.b,.c);.CREATE.UNIQUE. |
1a81a0 | 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 6a 73 6f 6e 5f 74 79 70 65 28 31 3c | INDEX.t8x.ON.t8((b|.json_type(1< |
1a81c0 | 31 29 7c 27 78 27 29 29 3b 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 74 38 46 4c 49 43 54 28 28 62 | 1)|'x'));REINDEX.INTO.t8FLICT((b |
1a81e0 | 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 81 47 9c 71 04 00 83 13 43 52 45 41 54 45 20 54 | ||'x')).DO.NOTHI.G.q....CREATE.T |
1a8200 | 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 | ABLE.t8(a.INT.PRIMARY.KEY,.b,.c) |
1a8220 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 | ;.CREATE.UNIQUE.INDEX.t8x.ON.t8( |
1a8240 | 28 62 7c 20 64 61 74 65 28 31 2c 31 32 30 30 31 2d 30 31 2d 30 31 2c 31 29 7c 27 78 27 29 29 3b | (b|.date(1,12001-01-01,1)|'x')); |
1a8260 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c | .INSERT.INTO.t8(a,b,c).VALUES(1, |
1a8280 | 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | 'one',2),(2,'one',3).....ON.CONF |
1a82a0 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 47 9c 70 04 | LICT((b||'x')).DO.NOTHING;..G.p. |
1a82c0 | 00 83 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 | ...CREATE.TABLE.t8(a.INT.PRIMARY |
1a82e0 | 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | .KEY,.b,.c);.CREATE.UNIQUE.INDEX |
1a8300 | 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 64 61 74 65 28 31 2c 31 32 30 30 31 2d 30 31 2d 30 | .t8x.ON.t8((b|.date(1,12001-01-0 |
1a8320 | 31 2c 31 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 | 1,1)|'x'));.INSERT.INTO.t8(a,b,c |
1a8340 | 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a | ).VALUES(1,'one',2),(2,'one',3). |
1a8360 | 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 | ....ON.CONFLICT((b||'x')).DO.NOT |
1a8380 | 48 49 4e 47 3b 0a 81 3d 9c 6f 04 00 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 | HING;..=.o....CREATE.TABLE.t8(a. |
1a83a0 | 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 | INT.PRIMARY.KEY,.b,.c);.CREATE.U |
1a83c0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 64 61 74 65 28 20 | NIQUE.INDEX.t8x.ON.t8((b|.date(. |
1a83e0 | 31 3d 31 31 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c | 1=11)|'x'));.INSERT.INTO.t8(a,b, |
1a8400 | 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 | c).VALUES(1,'one',2),(2,'one',3) |
1a8420 | 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f | .....ON.CONFLICT((b||'x')).DO.NO |
1a8440 | 54 48 49 4e 47 3b 0a 81 3d 9c 6e 04 00 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 | THING;..=.n....CREATE.TABLE.t8(a |
1a8460 | 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 | .INT.PRIMARY.KEY,.b,.c);.CREATE. |
1a8480 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 64 61 74 65 28 | UNIQUE.INDEX.t8x.ON.t8((b|.date( |
1a84a0 | 20 31 3d 31 31 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 | .1=11)|'x'));.INSERT.INTO.t8(a,b |
1a84c0 | 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 | ,c).VALUES(1,'one',2),(2,'one',3 |
1a84e0 | 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e | ).....ON.CONFLICT((b||'x')).DO.N |
1a8500 | 4f 54 48 49 4e 47 3b 0a 81 47 9c 6d 04 00 83 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 | OTHING;..G.m....CREATE.TABLE.t8( |
1a8520 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 | a.INT.PRIMARY.KEY,.b,.c);.CREATE |
1a8540 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 4c 49 4b 45 | .UNIQUE.INDEX.t8x.ON.t8((b|.LIKE |
1a8560 | 28 31 2c 31 2c 32 30 30 31 2d 30 31 2d 30 31 31 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 | (1,1,2001-01-011)|'x'));.INSERT. |
1a8580 | 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 | INTO.t8(a,b,c).VALUES(1,'one',2) |
1a85a0 | 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c | ,(2,'one',3).....ON.CONFLICT((b| |
1a85c0 | 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 47 9c 6c 04 00 83 13 43 52 45 41 54 | |'x')).DO.NOTHING;..G.l....CREAT |
1a85e0 | 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c | E.TABLE.t8(a.INT.PRIMARY.KEY,.b, |
1a8600 | 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 | .c);.CREATE.UNIQUE.INDEX.t8x.ON. |
1a8620 | 74 38 28 28 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 31 32 30 30 31 2d 30 31 2d 30 31 29 7c 27 78 27 | t8((b|.LIKE(1,1,12001-01-01)|'x' |
1a8640 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 | ));.INSERT.INTO.t8(a,b,c).VALUES |
1a8660 | 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 | (1,'one',2),(2,'one',3).....ON.C |
1a8680 | 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3d | ONFLICT((b||'x')).DO.NOTHING;..= |
1a86a0 | 9c 6b 04 00 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d | .k....CREATE.TABLE.t8(a.INT.PRIM |
1a86c0 | 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ARY.KEY,.b,.c);.CREATE.UNIQUE.IN |
1a86e0 | 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 31 29 7c 27 78 | DEX.t8x.ON.t8((b|.LIKE(1,1,1)|'x |
1a8700 | 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 | '));.INSERT.INTO.t8(a,b,c).VALUE |
1a8720 | 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 00 20 20 20 4f 4e 20 | S(1,'one',2),(2,'one',3).....ON. |
1a8740 | 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | CONFLICT((b||'x')).DO.NOTHING;.. |
1a8760 | 0c 9c 6a 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 | ..j....CREATE.TABLE.t8(a.INT.PRI |
1a8780 | 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | MARY.KEY,.b,.c);.CREATE.UNIQUE.I |
1a87a0 | 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 20 2d 31 31 | NDEX.t8x.ON.t8((b|.LIKE(1,1,.-11 |
1a87c0 | 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 46 4c 49 43 54 28 28 62 7c | )|'x'));.INSERT.INTO.t8FLICT((b| |
1a87e0 | 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 81 0c 9c 69 04 00 82 1d 43 52 45 41 54 45 20 54 41 | |'x')).DO.NOTHI...i....CREATE.TA |
1a8800 | 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b | BLE.t8(a.INT.PRIMARY.KEY,.b,.c); |
1a8820 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 | .CREATE.UNIQUE.INDEX.t8x.ON.t8(( |
1a8840 | 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 20 27 e1 27 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 | b|.LIKE(1,1,.'.')|'x'));.INSERT. |
1a8860 | 49 4e 54 4f 20 74 38 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 81 | INTO.t8FLICT((b||'x')).DO.NOTHI. |
1a8880 | 0c 9c 68 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 | ..h....CREATE.TABLE.t8(a.INT.PRI |
1a88a0 | 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | MARY.KEY,.b,.c);.CREATE.UNIQUE.I |
1a88c0 | 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 20 27 61 27 | NDEX.t8x.ON.t8((b|.LIKE(1,1,.'a' |
1a88e0 | 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 46 4c 49 43 54 28 28 62 7c | )|'x'));.INSERT.INTO.t8FLICT((b| |
1a8900 | 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 81 1c 9c 67 04 00 82 3d 43 52 45 41 54 45 20 54 41 | |'x')).DO.NOTHI...g...=CREATE.TA |
1a8920 | 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b | BLE.t8(a.INT.PRIMARY.KEY,.b,.c); |
1a8940 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 | .CREATE.UNIQUE.INDEX.t8x.ON.t8(( |
1a8960 | 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 20 27 20 64 61 74 65 74 69 6d 65 28 31 2c 31 2c 31 29 61 27 | b|.LIKE(1,1,.'.datetime(1,1,1)a' |
1a8980 | 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 46 4c 49 43 54 28 28 62 7c | )|'x'));.INSERT.INTO.t8FLICT((b| |
1a89a0 | 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 81 14 9c 66 04 00 82 2d 43 52 45 41 54 45 20 54 41 | |'x')).DO.NOTHI...f...-CREATE.TA |
1a89c0 | 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b | BLE.t8(a.INT.PRIMARY.KEY,.b,.c); |
1a89e0 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 | .CREATE.UNIQUE.INDEX.t8x.ON.t8(( |
1a8a00 | 62 7c 20 4c 49 4b 45 28 31 2c 31 2c 20 27 20 62 6d 32 35 28 31 29 61 27 29 7c 27 78 27 29 29 3b | b|.LIKE(1,1,.'.bm25(1)a')|'x')); |
1a8a20 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 | .INSERT.INTO.t8FLICT((b||'x')).D |
1a8a40 | 4f 20 4e 4f 54 48 49 81 0c 9c 65 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 | O.NOTHI...e....CREATE.TABLE.t8(a |
1a8a60 | 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 | .INT.PRIMARY.KEY,.b,.c);.CREATE. |
1a8a80 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 4c 49 4b 45 28 | UNIQUE.INDEX.t8x.ON.t8((b|.LIKE( |
1a8aa0 | 31 2c 31 2c 20 0d 31 31 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 46 | 1,1,..11)|'x'));.INSERT.INTO.t8F |
1a8ac0 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 81 42 9c 64 04 00 83 09 43 | LICT((b||'x')).DO.NOTHI.B.d....C |
1a8ae0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | REATE.TABLE.t8(a.INT.PRIMARY.KEY |
1a8b00 | 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 | ,.b,.c);.CREATE.UNIQUE.INDEX.t8x |
1a8b20 | 20 4f 4e 20 74 38 28 28 4e 4f 54 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b 0a | .ON.t8((NOT'x')COLLATE.nocase);. |
1a8b40 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 4e | INSERT.INTO.t8(a,b,c).VALUES(1,N |
1a8b60 | 4f 54 27 6f 6e 65 27 43 4f 4c 4c 41 54 45 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f | OT'one'COLLATE'one',3).....ON.CO |
1a8b80 | 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 9c | NFLICT((b||'x')).DO.NOTHING;..1. |
1a8ba0 | 63 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 | c...gCREATE.TABLE.t8(a.INT.PRIMA |
1a8bc0 | 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | RY.KEY,.b,.c);.CREATE.UNIQUE.IND |
1a8be0 | 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 4e 4f 54 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 | EX.t8x.ON.t8((NOT'x'));.INSERT.I |
1a8c00 | 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c | NTO.t8(a,b,c).VALUES(1,'one',2), |
1a8c20 | 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c | (2,'one',3).....ON.CONFLICT((b|| |
1a8c40 | 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9c 62 04 00 82 17 43 52 45 41 54 45 | 'x')).DO.NOTHING;....b....CREATE |
1a8c60 | 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 | .TABLE.t8(a.INT.PRIMARY.KEY,.b,. |
1a8c80 | 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 | c);.CREATE.UNIQUE.INDEX.t8x.ON.t |
1a8ca0 | 38 28 20 6a 73 6f 6e 28 31 29 29 3b 52 45 49 4e 44 45 58 20 49 4e 54 4f 20 74 20 20 20 4f 4e 20 | 8(.json(1));REINDEX.INTO.t...ON. |
1a8cc0 | 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 | CONFLICT((b||'x')).DO.NOTHING;.. |
1a8ce0 | 3b 9c 61 04 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 | ;.a...{CREATE.TABLE.t8(a.INT.PRI |
1a8d00 | 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | MARY.KEY,.b,.c);.CREATE.UNIQUE.I |
1a8d20 | 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 20 63 68 61 72 28 31 29 29 3b 0a 49 4e 53 45 52 54 | NDEX.t8x.ON.t8(.char(1));.INSERT |
1a8d40 | 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 20 67 6c 6f 62 28 31 2c | .INTO.t8(a,b,c).VALUES(1.glob(1, |
1a8d60 | 31 29 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 31 2c 31 29 2c 33 29 0a 20 20 20 20 4f 4e 20 43 | 1),.julianday(1,1,1),3).....ON.C |
1a8d80 | 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 | ONFLICT((b||'x')).DO.NOTHING;... |
1a8da0 | 9c 60 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d | .`....CREATE.TABLE.t8(a.INT.PRIM |
1a8dc0 | 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ARY.KEY,.b,.c);.CREATE.UNIQUE.IN |
1a8de0 | 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 20 27 61 27 27 78 27 43 4f 4c 4c 41 54 45 20 62 69 6e | DEX.t8x.ON.t8(.'a''x'COLLATE.bin |
1a8e00 | 61 72 79 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 | ary).....ON.CONFLICT((b||'x')).D |
1a8e20 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9c 5f 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;...._....CREATE.TABLE. |
1a8e40 | 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 | t8(a.INT.PRIMARY.KEY,.b,.c);.CRE |
1a8e60 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 20 27 61 27 27 | ATE.UNIQUE.INDEX.t8x.ON.t8(.'a'' |
1a8e80 | 78 27 29 54 20 49 4e 54 4f 20 74 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | x')T.INTO.tne',3).....ON.CONFLIC |
1a8ea0 | 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3f 9c 5e 04 00 83 03 | T((b||'x')).DO.NOTHING;..?.^.... |
1a8ec0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 | CREATE.TABLE.t8(a.INT.PRIMARY.KE |
1a8ee0 | 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 | Y,.b,.c);.CREATE.UNIQUE.INDEX.t8 |
1a8f00 | 78 20 4f 4e 20 74 38 28 20 22 61 22 2c 22 62 22 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b | x.ON.t8(."a","b"COLLATE.nocase); |
1a8f20 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c | .INSERT.INTO.t8(a,b,c).VALUES(1, |
1a8f40 | 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | 'one',2),(2,'one',3).....ON.CONF |
1a8f60 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0b 9c 5d 04 | LICT((b||'x')).DO.NOTHING;....]. |
1a8f80 | 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 | ...CREATE.TABLE.t8(a.INT.PRIMARY |
1a8fa0 | 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | .KEY,.b,.c);.CREATE.UNIQUE.INDEX |
1a8fc0 | 20 74 38 78 20 4f 4e 20 74 38 28 20 22 61 22 2c 22 62 22 43 4f 4c 4c 41 54 45 20 20 61 2c 62 73 | .t8x.ON.t8(."a","b"COLLATE..a,bs |
1a8fe0 | 65 29 3b 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f | e);.....ON.CONFLICT((b||'x')).DO |
1a9000 | 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9c 5c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | .NOTHING;....\....CREATE.TABLE.t |
1a9020 | 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 | 8(a.INT.PRIMARY.KEY,.b,.c);.CREA |
1a9040 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 20 20 6a 73 6f 6e | TE.UNIQUE.INDEX.t8x.ON.t8(..json |
1a9060 | 5f 61 72 72 61 79 28 31 2c 31 2c 31 29 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | _array(1,1,1),3).....ON.CONFLICT |
1a9080 | 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9c 5b 04 00 82 17 43 | ((b||'x')).DO.NOTHING;....[....C |
1a90a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | REATE.TABLE.t8(a.INT.PRIMARY.KEY |
1a90c0 | 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 20 | ,.b,.c);.CREATE.UNIQUE.INDEX.t8. |
1a90e0 | 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 6e 65 27 2c 33 29 0a 20 20 | .ON.t8((b||'x'));.INSERne',3)... |
1a9100 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 | ..ON.CONFLICT((b||'x')).DO.NOTHI |
1a9120 | 4e 47 3b 0a 81 3c 9c 5a 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e | NG;..<.Z...}CREATE.TABLE.t8(a.IN |
1a9140 | 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | T.PRIMARY.KEY,.b,.c);.CREATE.UNI |
1a9160 | 51 55 45 20 49 4e 44 45 58 20 41 42 4f 52 54 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 | QUE.INDEX.ABORTt8x.ON.t8((b||'x' |
1a9180 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 | ));.INSERT.INTO.t8(a,b,c).VALUES |
1a91a0 | 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 | (1,'one',2),(2,'one',3).....ON.C |
1a91c0 | 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 | ONFLICT((b||'x')).DO.NOTHING;VAC |
1a91e0 | 55 55 4d 0a 81 37 9c 59 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e | UUM..7.Y...sCREATE.TABLE.t8(a.IN |
1a9200 | 41 54 54 41 43 48 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | ATTACHARY.KEY,.b,.c);.CREATE.UNI |
1a9220 | 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 | QUE.INDEX.t8x.ON.t8((b||'x'));.I |
1a9240 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f | NSERT.INTO.t8(a,b,c).VALUES(1,'o |
1a9260 | 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | ne',2),(2,'one',3).....ON.CONFLI |
1a9280 | 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 | CT((b||'x')).DO.NOTHING;VACUUM.. |
1a92a0 | 31 9c 58 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 41 54 54 41 43 | 1.X...gCREATE.TABLE.t8(a.INATTAC |
1a92c0 | 48 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 | HARY.KEY,.b,.c);.CREATE.UNIQUE.I |
1a92e0 | 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 | NDEX.t8x.ON.t8((b||'x'));.INSERT |
1a9300 | 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 | .INTO.t8(a,b,c).VALUES(1,'one',2 |
1a9320 | 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 | ),(2,'one',3).....ON.CONFLICT((b |
1a9340 | 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 9c 57 04 00 82 73 43 52 45 41 | ||'x')).DO.NOTHING;..7.W...sCREA |
1a9360 | 54 45 20 54 41 42 4c 45 20 74 38 28 20 5b 61 5d 54 45 41 43 48 4d 41 52 59 20 4b 45 59 2c 20 62 | TE.TABLE.t8(.[a]TEACHMARY.KEY,.b |
1a9380 | 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e | ,.c);.CREATE.UNIQUE.INDEX.t8x.ON |
1a93a0 | 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c | .t8((b||'x'));.INSERT.INTO.t8(a, |
1a93c0 | 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c | b,c).VALUES(1,'one',2),(2,'one', |
1a93e0 | 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 | 3).....ON.CONFLICT((b||'x')).DO. |
1a9400 | 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 37 9c 56 04 00 82 73 43 52 45 41 54 45 20 54 41 | NOTHING;VACUUM..7.V...sCREATE.TA |
1a9420 | 42 4c 45 20 74 38 28 20 5b 61 5d 20 5b 61 5d 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b | BLE.t8(.[a].[a]IMARY.KEY,.b,.c); |
1a9440 | 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 | .CREATE.UNIQUE.INDEX.t8x.ON.t8(( |
1a9460 | 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 | b||'x'));.INSERT.INTO.t8(a,b,c). |
1a9480 | 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 | VALUES(1,'one',2),(2,'one',3)... |
1a94a0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 | ..ON.CONFLICT((b||'x')).DO.NOTHI |
1a94c0 | 4e 47 3b 56 41 43 55 55 4d 0a 4c 9c 55 04 00 81 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 | NG;VACUUM.L.U....CREATE.TABLE.t7 |
1a94e0 | 28 61 a0 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 41 4e 41 4c 59 5a 45 3b 41 4e 41 | (a.UNIQUE,.b.UNIQUE);ANALYZE;ANA |
1a9500 | 4c 59 5a 45 20 49 4e 54 4f 20 44 40 20 4e 4f 20 49 4f 54 48 49 4e 47 3b 0a 4c 9c 54 04 00 81 1d | LYZE.INTO.D@.NO.IOTHING;.L.T.... |
1a9520 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 | CREATE.TABLE.t7(a.UNIQUE,.b.UNIQ |
1a9540 | 55 45 29 3b 41 4e 41 4c 59 5a 45 3b 41 4e 41 4c 59 5a 45 00 49 4e 54 4f 20 44 40 20 4e 4f 20 49 | UE);ANALYZE;ANALYZE.INTO.D@.NO.I |
1a9560 | 4f 54 48 49 4e 47 3b 0a 79 9c 53 04 00 81 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 | OTHING;.y.S...wCREATE.TABLE.t7(a |
1a9580 | 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 20 56 41 4c 55 45 53 28 31 2c 31 29 2c | .UNIQUE,.b.UNIQUE);.VALUES(1,1), |
1a95a0 | 28 31 31 2c 31 29 2c 28 31 2c 31 29 2c 28 31 31 2c 31 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f 4e | (11,1),(1,1),(11,1),(1,2).ON.CON |
1a95c0 | 46 4c 49 43 54 28 3f 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 | FLICT(?.COLLATE.binary).DO.NOTHI |
1a95e0 | 4e 47 3b 0a 81 00 9c 52 04 00 82 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e | NG;....R....CREATE.TABLE.t7(a.UN |
1a9600 | 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 | IQUE,.b.UNIQUE);.INSERT.INTO.t7( |
1a9620 | 62 2c 62 29 20 56 41 4c 55 45 53 28 3f 2c 31 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 | b,b).VALUES(?,1),(1,2).ON.CONFLI |
1a9640 | 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | CT(b.COLLATE.binary).DO.NOTHING; |
1a9660 | 41 4e 41 4c 59 5a 45 0a 81 00 9c 51 04 00 82 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 | ANALYZE....Q....CREATE.TABLE.t7( |
1a9680 | 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | a.UNIQUE,.b.UNIQUE);.INSERT.INTO |
1a96a0 | 20 74 37 28 62 2c 62 29 20 56 41 4c 55 45 53 28 3f 2c 31 29 2c 28 31 2c 32 29 20 4f 4e 20 43 4f | .t7(b,b).VALUES(?,1),(1,2).ON.CO |
1a96c0 | 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 | NFLICT(b.COLLATE.binary).DO.NOTH |
1a96e0 | 49 4e 47 3b 3f 4e 41 4c 59 5a 45 0a 81 03 9c 50 04 00 82 0b 43 52 45 41 54 45 20 54 41 42 4c 45 | ING;?NALYZE....P....CREATE.TABLE |
1a9700 | 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 | .t7(a.UNIQUE,.b.UNIQUE);.INSERT. |
1a9720 | 49 4e 54 4f 20 74 37 28 62 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c 28 32 30 30 31 2d 30 | INTO.t7(b,b).VALUES(1,1),(2001-0 |
1a9740 | 31 2d 30 31 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 | 1-011,2).ON.CONFLICT(b.COLLATE.b |
1a9760 | 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 7d 9c 4f 04 00 81 7f 43 52 45 41 54 45 | inary).DO.NOTHING;.}.O....CREATE |
1a9780 | 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 | .TABLE.t7(a.UNIQUE,.b.UNIQUE);.I |
1a97a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 62 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c 28 | NSERT.INTO.t7(b,b).VALUES(1,1),( |
1a97c0 | 24 31 3d 31 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 | $1=11,2).ON.CONFLICT(b.COLLATE.b |
1a97e0 | 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 7d 9c 4e 04 00 81 7f 43 52 45 41 54 45 | inary).DO.NOTHING;.}.N....CREATE |
1a9800 | 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 | .TABLE.t7(a.UNIQUE,.b.UNIQUE);.I |
1a9820 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 62 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c 28 | NSERT.INTO.t7(b,b).VALUES(1,1),( |
1a9840 | 20 31 3d 31 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 | .1=11,2).ON.CONFLICT(b.COLLATE.b |
1a9860 | 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 79 9c 4d 04 00 81 77 43 52 45 41 54 45 | inary).DO.NOTHING;.y.M...wCREATE |
1a9880 | 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 | .TABLE.t7(a.UNIQUE,.b.UNIQUE);.I |
1a98a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 3f 2c 3f 29 2c 28 | NSERT.INTO.t7(a,b).VALUES(?,?),( |
1a98c0 | 3f 2c 3f 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 | ?,?).ON.CONFLICT(b.COLLATE.binar |
1a98e0 | 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 79 9c 4c 04 00 81 77 43 52 45 41 54 45 20 54 41 42 | y).DO.NOTHING;.y.L...wCREATE.TAB |
1a9900 | 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 | LE.t7(a.UNIQUE,.b.UNIQUE);.INSER |
1a9920 | 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 3f 2c 3f 29 2c 28 3f 2c 32 29 | T.INTO.t7(a,b).VALUES(?,?),(?,2) |
1a9940 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 | .ON.CONFLICT(b.COLLATE.binary).D |
1a9960 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 00 9c 4b 04 00 82 05 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;....K....CREATE.TABLE. |
1a9980 | 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 | t7(a.UNIQUE,.b.UNIQUE);.INSERT.I |
1a99a0 | 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 3f 2c 3f 29 2c 28 31 2c 32 29 20 4f 4e | NTO.t7(a,b).VALUES(?,?),(1,2).ON |
1a99c0 | 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e | .CONFLICT(b.COLLATE.binary).DO.N |
1a99e0 | 4f 54 48 49 4e 47 3b 41 4e 41 4c 59 5a 45 0a 79 9c 4a 04 00 81 77 43 52 45 41 54 45 20 54 41 42 | OTHING;ANALYZE.y.J...wCREATE.TAB |
1a9a00 | 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 | LE.t7(a.UNIQUE,.b.UNIQUE);.INSER |
1a9a20 | 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c 28 31 2c 32 29 | T.INTO.t7(a,b).VALUES(1,1),(1,2) |
1a9a40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 f2 79 29 20 44 | .ON.CONFLICT(b.COLLATE.bina.y).D |
1a9a60 | 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 07 9c 49 04 00 82 13 43 52 45 41 54 45 20 54 41 42 4c 45 20 | O.NOTHING;....I....CREATE.TABLE. |
1a9a80 | 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 | t7(a.UNIQUE,.b.UNIQUE);.INSERT.I |
1a9aa0 | 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c 28 31 2c 32 29 20 4f 4e | NTO.t7(a,b).VALUES(1,1),(1,2).ON |
1a9ac0 | 20 43 4f 4e 46 4c 49 43 54 28 3f 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 20 43 4f 4c 4c 41 54 | .CONFLICT(?COLLATE.nocase.COLLAT |
1a9ae0 | 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 01 9c 48 04 00 82 07 43 52 | E.binary).DO.NOTHING;....H....CR |
1a9b00 | 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 | EATE.TABLE.t7(a.UNIQUE,.b.UNIQUE |
1a9b20 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 53 45 4c 45 43 54 28 39 2c | );.INSERT.INTO.t7(a,b).SELECT(9, |
1a9b40 | 31 29 3c 28 31 2c 32 29 20 22 61 22 2c 22 62 22 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 | 1)<(1,2)."a","b".ON.CONFLICT(b.C |
1a9b60 | 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 01 9c 47 04 | OLLATE.binary).DO.NOTHING;....G. |
1a9b80 | 00 82 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 | ...CREATE.TABLE.t7(a.UNIQUE,.b.U |
1a9ba0 | 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 53 45 4c 45 | NIQUE);.INSERT.INTO.t7(a,b).SELE |
1a9bc0 | 43 54 28 31 2c 32 29 3d 28 31 2c 32 29 20 22 61 22 2c 22 62 22 20 4f 4e 20 43 4f 4e 46 4c 49 43 | CT(1,2)=(1,2)."a","b".ON.CONFLIC |
1a9be0 | 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | T(b.COLLATE.binary).DO.NOTHING;. |
1a9c00 | 81 19 9c 46 04 00 82 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 | ...F...7CREATE.TABLE.t7(a.UNIQUE |
1a9c20 | 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 | ,.b.UNIQUE);.INSERT.INTO.t7(a,b) |
1a9c40 | 20 53 45 4c 45 43 54 28 31 2c 31 29 3d 28 31 2c 32 29 49 53 4e 55 4c 4c 20 22 61 22 2c 20 6a 73 | .SELECT(1,1)=(1,2)ISNULL."a",.js |
1a9c60 | 6f 6e 5f 65 78 74 72 61 63 74 28 31 2c 31 29 22 62 22 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 | on_extract(1,1)"b".ON.CONFLICT(b |
1a9c80 | 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 01 9c | .COLLATE.binary).DO.NOTHING;.... |
1a9ca0 | 45 04 00 82 07 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 | E....CREATE.TABLE.t7(a.UNIQUE,.b |
1a9cc0 | 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 53 45 | .UNIQUE);.INSERT.INTO.t7(a,b).SE |
1a9ce0 | 4c 45 43 54 28 31 2c 31 29 3d 28 31 2c 32 29 3d 22 61 22 2c 22 62 22 20 4f 4e 20 43 4f 4e 46 4c | LECT(1,1)=(1,2)="a","b".ON.CONFL |
1a9d00 | 49 43 54 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 | ICT(b.COLLATE.binary).DO.NOTHING |
1a9d20 | 3b 0a 79 9c 44 04 00 81 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 | ;.y.D...wCREATE.TABLE.t7(a.UNIQU |
1a9d40 | 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 | E,.b.UNIQUE);.INSERT.INTO.t7(a,b |
1a9d60 | 29 20 53 45 4c 45 43 54 28 31 2c 31 29 3d 28 31 2c 20 74 6f 74 61 6c 5f 63 68 61 6e 67 65 73 28 | ).SELECT(1,1)=(1,.total_changes( |
1a9d80 | 29 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 79 9c | ).COLLATE.binary).DO.NOTHING;.y. |
1a9da0 | 43 04 00 81 77 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 | C...wCREATE.TABLE.t7(a.UNIQUE,.b |
1a9dc0 | 20 55 4e 49 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 53 45 | .UNIQUE);.INSERT.INTO.t7(a,b).SE |
1a9de0 | 4c 45 43 54 28 31 2c 31 29 2d 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f | LECT(1,1)-(1,2).ON.CONFLICT(b.CO |
1a9e00 | 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 7d 9c 42 04 00 81 | LLATE.binary).DO.NOTHING;.}.B... |
1a9e20 | 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 2c 20 62 20 55 4e 49 | .CREATE.TABLE.t7(a.UNIQUE,.b.UNI |
1a9e40 | 51 55 45 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 37 28 61 2c 61 29 20 56 41 4c 55 45 53 | QUE);.INSERT.INTO.t7(a,a).VALUES |
1a9e60 | 28 31 2c 31 29 2c 28 24 31 3d 31 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 62 20 43 4f | (1,1),($1=11,2).ON.CONFLICT(b.CO |
1a9e80 | 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 4a 9c 41 04 00 81 | LLATE.binary).DO.NOTHING;.J.A... |
1a9ea0 | 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 55 45 20 43 4f 4c 4c 41 54 | .CREATE.TABLE.t7(a.UNIQUE.COLLAT |
1a9ec0 | 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4c 41 54 45 20 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f | E.binary).DO.NLATE.binary).DO.NO |
1a9ee0 | 54 48 49 4e 47 3b 0a 4a 9c 40 04 00 81 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 37 28 61 20 | THING;.J.@....CREATE.TABLE.t7(a. |
1a9f00 | 55 4e 49 51 55 45 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 72 79 29 00 44 4f 20 4e 4c 41 54 45 20 | UNIQUE.COLLATE.binary).DO.NLATE. |
1a9f20 | 62 69 6e 61 72 79 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 79 9c 3f 04 00 81 77 43 52 45 41 54 | binary).DO.NOTHING;.y.?...wCREAT |
1a9f40 | 45 20 54 41 42 4c 45 20 74 37 28 61 20 55 4e 49 51 43 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 0a | E.TABLE.t7(a.UNIQCE,.b.UNIQUE);. |
1a9f60 | 49 4e 53 45 44 54 20 49 4e 54 4f 20 74 37 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 31 29 2c | INSEDT.INTO.t7(a,b).VALUES(1,1), |
1a9f80 | 28 31 2c 32 29 20 4f 4e 20 43 4f 4e 46 4c 49 ff ff 28 62 20 43 4f 4c 4c 41 54 45 20 62 69 6e 61 | (1,2).ON.CONFLI..(b.COLLATE.bina |
1a9fa0 | 72 79 27 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 4d 9c 3e 04 00 81 1f 43 52 45 41 54 45 20 54 41 | ry'.DO.NOTHING;.M.>....CREATE.TA |
1a9fc0 | 42 4c 45 20 74 37 28 61 20 55 4e 49 51 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 27 | BLE.t7(a.UNIQ''''''''''''''''''' |
1a9fe0 | 27 ff ff ff ff 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 41 4e 41 4c 59 5a 45 20 49 4e 54 4f 0a | '....UE,.b.UNIQUE);ANALYZE.INTO. |
1aa000 | 0d 00 00 00 2d 00 87 00 1f 48 1e 8d 1d d5 1d 1d 1c 68 1b b0 1a fb 1a 46 19 91 18 dc 18 24 17 6c | ....-....H.......h.....F.....$.l |
1aa020 | 16 a9 15 f4 15 38 14 83 13 f6 13 69 12 ae 11 f6 11 67 10 9b 0f d3 0e fc 0e 39 0d 76 0c ad 0b e3 | .....8.....i.....g.......9.v.... |
1aa040 | 0b 2a 0a 6b 09 b2 08 f1 08 36 07 75 06 b9 06 01 05 75 04 c0 04 32 03 a4 03 16 02 88 01 cc 01 17 | .*.k.....6.u.....u...2.......... |
1aa060 | 00 87 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1aa080 | 00 00 00 00 00 00 00 81 0c 9d 20 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 | ...............CREATE.TABLE.t8(a |
1aa0a0 | 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 | .INT.PRIMARY.KEY,.b,.c);.CREATE. |
1aa0c0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7e 4e 4f 54 27 2b | UNIQUE.INDEX.t8x.ON.t8((b|~NOT'+ |
1aa0e0 | 32 20 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 64 61 79 73 78 27 20 2d 31 29 29 | 2....................daysx'.-1)) |
1aa100 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 0a 81 31 9d 1f 04 00 82 67 43 | ;.INSERT.INTO.t8'one'H..1.....gC |
1aa120 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | REATE.TABLE.t8(a.INT.PRIMARY.KEY |
1aa140 | 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 | ,.b,.c);.CREATE.UNIQUE.INDEX.t8x |
1aa160 | 20 4f 4e 20 74 38 28 28 62 7c 7e 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 | .ON.t8((b|~'x'));.INSERT.INTO.t8 |
1aa180 | 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e | (a,b,c).VALUES(1,'one',2),(2,'on |
1aa1a0 | 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7e 27 78 27 29 29 20 | e',3).....ON.CONFLICT((b|~'x')). |
1aa1c0 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 38 9d 1e 04 00 82 75 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..8.....uCREATE.TABLE |
1aa1e0 | 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 | .t8(a.INT.PRIMARY.KEY,.b,.c);.CR |
1aa200 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7e | EATE.UNIQUE.INDEX.t8x.ON.t8((b|~ |
1aa220 | 27 2b 32 20 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 | '+2.daysx'));.INSERT.INTO.t8(a,b |
1aa240 | 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 | ,c).VALUES(1,'one',2),(2,'one',3 |
1aa260 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e | ).....ON.CONFLICT((b||'x')).DO.N |
1aa280 | 4f 54 48 49 4e 47 3b 0a 81 0a 9d 1d 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 | OTHING;.........CREATE.TABLE.t8( |
1aa2a0 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 | a.INT.PRIMARY.KEY,.b,.c);.CREATE |
1aa2c0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7e 27 2b 32 20 | .UNIQUE.INDEX.t8x.ON.t8((b|~'+2. |
1aa2e0 | 0b 0b 8b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 | ...................daysx'));.INS |
1aa300 | 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 49 4e 47 3b 0a 81 0a 9d 1c 04 00 82 19 43 52 | ERT.INTO.t8'one'HING;.........CR |
1aa320 | 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t8(a.INT.PRIMARY.KEY, |
1aa340 | 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 | .b,.c);.CREATE.UNIQUE.INDEX.t8x. |
1aa360 | 4f 4e 20 74 38 28 28 62 7c 7e 27 2b 32 20 0b 0b 0b 8b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b | ON.t8((b|~'+2................... |
1aa380 | 0b 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 49 | .daysx'));.INSERT.INTO.t8'one'HI |
1aa3a0 | 4e 47 3b 0a 81 0a 9d 1b 04 00 82 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e | NG;.........CREATE.TABLE.t8(a.IN |
1aa3c0 | 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | T.PRIMARY.KEY,.b,.c);.CREATE.UNI |
1aa3e0 | 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7e 27 2b 32 20 0b 0b 0b 0b | QUE.INDEX.t8x.ON.t8((b|~'+2..... |
1aa400 | 0b 0b 0b 8b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 | ...............daysx'));.INSERT. |
1aa420 | 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 49 4e 47 3b 0a 81 0a 9d 1a 04 00 82 19 43 52 45 41 54 45 | INTO.t8'one'HING;.........CREATE |
1aa440 | 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 | .TABLE.t8(a.INT.PRIMARY.KEY,.b,. |
1aa460 | 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 | c);.CREATE.UNIQUE.INDEX.t8x.ON.t |
1aa480 | 38 28 28 62 7c 7e 27 2b 32 20 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 64 61 79 | 8((b|~'+2....................day |
1aa4a0 | 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 49 4e 47 3b 0a | sx'));.INSERT.INTO.t8'one'HING;. |
1aa4c0 | 81 31 9d 19 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 | .1.....gCREATE.TABLE.t8(a.INT.PR |
1aa4e0 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 | IMARY.KEY,.b,.c);.CREATE.UNIQUE. |
1aa500 | 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7e 27 20 27 29 29 3b 0a 49 4e 53 45 52 | INDEX.t8x.ON.t8((b|~'.'));.INSER |
1aa520 | 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c | T.INTO.t8(a,b,c).VALUES(1,'one', |
1aa540 | 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 | 2),(2,'one',3).....ON.CONFLICT(( |
1aa560 | 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 08 9d 18 04 00 82 15 43 52 45 | b||'x')).DO.NOTHING;.........CRE |
1aa580 | 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | ATE.TABLE.t8(a.INT.PRIMARY.KEY,. |
1aa5a0 | 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f | b,.c);.CREATE.UNIQUE.INDEX.t8x.O |
1aa5c0 | 4e 20 74 38 28 28 62 7c 7e 27 20 0b 0b 0b 0b 0b 0b 0b 8b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 64 61 | N.t8((b|~'....................da |
1aa5e0 | 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 7f 4e 47 3b | ysx'));.INSERT.INTO.t8'one'H.NG; |
1aa600 | 0a 81 34 9d 17 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 | ..4.....mCREATE.TABLE.t8(a.INT.P |
1aa620 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | RIMARY.KEY,.b,.c);.CREATE.UNIQUE |
1aa640 | 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 4e 4f 54 27 78 27 29 29 3b 0a 49 | .INDEX.t8x.ON.t8((b||NOT'x'));.I |
1aa660 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f | NSERT.INTO.t8(a,b,c).VALUES(1,'o |
1aa680 | 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 00 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | ne',2),(2,'one',3).....ON.CONFLI |
1aa6a0 | 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 38 9d 16 04 00 82 | CT((b||'x')).DO.NOTHING;..8..... |
1aa6c0 | 75 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b | uCREATE.TABLE.t8(a.INT.PRIMARY.K |
1aa6e0 | 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | EY,.b,.c);.CREATE.UNIQUE.INDEX.t |
1aa700 | 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 4f 52 20 74 72 75 65 29 29 3b 0a 49 4e 53 45 52 | 8x.ON.t8((b||'x'OR.true));.INSER |
1aa720 | 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c | T.INTO.t8(a,b,c).VALUES(1,'one', |
1aa740 | 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 | 2),(2,'one',3).....ON.CONFLICT(( |
1aa760 | 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3d 9d 15 04 00 82 7f 43 52 45 | b||'x')).DO.NOTHING;..=......CRE |
1aa780 | 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | ATE.TABLE.t8(a.INT.PRIMARY.KEY,. |
1aa7a0 | 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f | b,.c);.CREATE.UNIQUE.INDEX.t8x.O |
1aa7c0 | 4e 20 74 38 28 28 62 7c 7c 27 78 27 49 53 4e 55 4c 4c 29 49 53 4e 55 4c 4c 29 3b 0a 49 4e 53 45 | N.t8((b||'x'ISNULL)ISNULL);.INSE |
1aa7e0 | 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 | RT.INTO.t8(a,b,c).VALUES(1,'one' |
1aa800 | 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,2),(2,'one',3).....ON.CONFLICT( |
1aa820 | 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 9d 14 04 00 82 73 43 52 | (b||'x')).DO.NOTHING;..7.....sCR |
1aa840 | 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t8(a.INT.PRIMARY.KEY, |
1aa860 | 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 | .b,.c);.CREATE.UNIQUE.INDEX.t8x. |
1aa880 | 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 49 53 20 5b 61 5d 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e | ON.t8((b||'x'IS.[a]));.INSERT.IN |
1aa8a0 | 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 | TO.t8(a,b,c).VALUES(1,'one',2),( |
1aa8c0 | 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 | 2,'one',3).....ON.CONFLICT((b||' |
1aa8e0 | 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3d 9d 13 04 00 82 7f 43 52 45 41 54 45 20 | x')).DO.NOTHING;..=......CREATE. |
1aa900 | 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 | TABLE.t8(a.INT.PRIMARY.KEY,.b,.c |
1aa920 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 | );.CREATE.UNIQUE.INDEX.t8x.ON.t8 |
1aa940 | 28 28 62 7c 7c 27 78 27 49 53 20 2f 2a 20 2a 2f 4e 55 4c 4c 29 29 3b 0a 49 4e 53 45 52 54 20 49 | ((b||'x'IS./*.*/NULL));.INSERT.I |
1aa960 | 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c | NTO.t8(a,b,c).VALUES(1,'one',2), |
1aa980 | 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c | (2,'one',3).....ON.CONFLICT((b|| |
1aa9a0 | 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 35 9d 12 04 00 82 6f 43 52 45 41 54 45 | 'x')).DO.NOTHING;..5.....oCREATE |
1aa9c0 | 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 | .TABLE.t8(a.INT.PRIMARY.KEY,.b,. |
1aa9e0 | 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 | c);.CREATE.UNIQUE.INDEX.t8x.ON.t |
1aaa00 | 38 28 28 62 7c 7c 27 78 27 29 44 45 53 43 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 | 8((b||'x')DESC);.INSERT.INTO.t8( |
1aaa20 | 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 | a,b,c).VALUES(1,'one',2),(2,'one |
1aaa40 | 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 44 45 53 | ',3).....ON.CONFLICT((b||'x')DES |
1aaa60 | 43 20 4e 4f 54 48 49 4e 47 3b 0a 81 3b 9d 11 04 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 | C.NOTHING;..;.....{CREATE.TABLE. |
1aaa80 | 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 | t8(a.INT.PRIMARY.KEY,.b,.c);.CRE |
1aaaa0 | 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 | ATE.UNIQUE.INDEX.t8x.ON.t8((b||' |
1aaac0 | 78 27 29 44 45 53 43 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 | x')DESC);.INSERT.INTO.t8(a,b,c). |
1aaae0 | 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 | VALUES(1,'one',2),(2,'one',3)... |
1aab00 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 | ..ON.CONFLICT((b||'x')).DO.NOTHI |
1aab20 | 4e 47 3b 56 41 43 55 55 4d 0a 81 35 9d 10 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | NG;VACUUM..5.....oCREATE.TABLE.t |
1aab40 | 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 | 8(a.INT.PRIMARY.KEY,.b,.c);.CREA |
1aab60 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 | TE.UNIQUE.INDEX.t8x.ON.t8((b||'x |
1aab80 | 27 29 44 45 53 43 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 | ')DESC);.INSERT.INTO.t8(a,b,c).V |
1aaba0 | 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 | ALUES(1,'one',2),(2,'one',3).... |
1aabc0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e | .ON.CONFLICT((b||'x')).DO.NOTHIN |
1aabe0 | 47 3b 0a 81 46 9d 0f 04 00 83 11 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 | G;..F......CREATE.TABLE.t8(a.INT |
1aac00 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .PRIMARY.KEY,.b,.c);.CREATE.UNIQ |
1aac20 | 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 | UE.INDEX.t8x.ON.t8((b||'x')COLLA |
1aac40 | 54 45 20 6e 6f 63 61 73 65 29 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | TE.nocase);EXPLAIN.INSERT.INTO.t |
1aac60 | 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 43 4f 4c 4c 41 54 45 27 6f | 8(a,b,c).VALUES(1,'one'COLLATE'o |
1aac80 | 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 | ne',3).....ON.CONFLICT((b||'x')) |
1aaca0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 45 9d 0e 04 00 83 0f 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..E......CREATE.TABL |
1aacc0 | 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 | E.t8(a.INT.PRIMARY.KEY,.b,.c);.C |
1aace0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c | REATE.UNIQUE.INDEX.t8x.ON.t8((b| |
1aad00 | 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | |'x')COLLATE.nocase);.INSERT.INT |
1aad20 | 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e e5 27 2c 32 29 2c 28 32 | O.t8(a,b,c).VALUES(1,'on.',2),(2 |
1aad40 | 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 | ,'one',3).....ON.CONFLICT((b||'x |
1aad60 | 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 3f 9d 0d 04 00 83 03 43 52 | ')).DO.NOTHING;VACUUM..?......CR |
1aad80 | 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t8(a.INT.PRIMARY.KEY, |
1aada0 | 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 | .b,.c);.CREATE.UNIQUE.INDEX.t8x. |
1aadc0 | 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b 0a 49 | ON.t8((b||'x')COLLATE.nocase);.I |
1aade0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f | NSERT.INTO.t8(a,b,c).VALUES(1,'o |
1aae00 | 6e e5 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | n.',2),(2,'one',3).....ON.CONFLI |
1aae20 | 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3f 9d 0c 04 00 83 | CT((b||'x')).DO.NOTHING;..?..... |
1aae40 | 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b | .CREATE.TABLE.t8(a.INT.PRIMARY.K |
1aae60 | 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 | EY,.b,.c);.CREATE.UNIQUE.INDEX.t |
1aae80 | 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 | 8x.ON.t8((b||'x')COLLATE.nocase) |
1aaea0 | 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 | ;.INSERT.INTO.t8(a,b,c).VALUES(1 |
1aaec0 | 2c 27 6f 6e 65 27 43 4f 4c 4c 41 54 45 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | ,'one'COLLATE'one',3).....ON.CON |
1aaee0 | 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 53 9d 0b | FLICT((b||'x')).DO.NOTHING;..S.. |
1aaf00 | 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 | ...+CREATE.TABLE.t8(a.INT.PRIMAR |
1aaf20 | 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | Y.KEY,.b,.c);.CREATE.UNIQUE.INDE |
1aaf40 | 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 | X.t8x.ON.t8((b||'x')COLLATE.noca |
1aaf60 | 73 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 | se);.INSERT.INTO.t8(a,b,c).VALUE |
1aaf80 | 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 | S(1,'one',2),(2,'one',3).....ON. |
1aafa0 | 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 | CONFLICT((b||'x')COLLATE.nocase) |
1aafc0 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 44 9d 0a 04 00 83 0d 43 52 45 41 54 | .DO.NOTHING;VACUUM..D......CREAT |
1aafe0 | 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c | E.TABLE.t8(a.INT.PRIMARY.KEY,.b, |
1ab000 | 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 | .c);.CREATE.UNIQUE.INDEX.t8x.ON. |
1ab020 | 74 38 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 3b 0a 49 4e 53 45 | t8((b||'x')COLLATE.nocase);.INSE |
1ab040 | 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 45 4e | RT.INTO.t8(a,b,c).VALUES(1,'onEN |
1ab060 | 44 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 4e 4f 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | De',2),(2,'oneNO',3).....ON.CONF |
1ab080 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 48 9d 09 04 | LICT((b||'x')).DO.NOTHING;..H... |
1ab0a0 | 00 83 15 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 | ...CREATE.TABLE.t8(a.INT.PRIMARY |
1ab0c0 | 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | .KEY,.b,.c);.CREATE.UNIQUE.INDEX |
1ab0e0 | 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 | .t8x.ON.t8((b||'x')COLLATE.nocas |
1ab100 | 65 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 | e);.INSERT.INTO.t8(a,b,c).VALUES |
1ab120 | 28 31 2c 27 6f 6e 45 4e 44 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f | (1,'onENDe',2),(2,'one',3).....O |
1ab140 | 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | N.CONFLICT((b||'x')).DO.NOTHING; |
1ab160 | 56 41 43 55 55 4d 0a 81 0b 9d 08 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 | VACUUM.........CREATE.TABLE.t8(a |
1ab180 | 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 | .INT.PRIMARY.KEY,.b,.c);.CREATE. |
1ab1a0 | 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 43 | UNIQUE.INDEX.t8x.ON.t8((b||'x')C |
1ab1c0 | 4f 4c 4c 41 54 45 20 20 61 2c 62 73 65 29 3b 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | OLLATE..a,bse);.....ON.CONFLICT( |
1ab1e0 | 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 9d 07 04 00 82 6d 43 52 | (b||'x')).DO.NOTHING;..4.....mCR |
1ab200 | 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t8(a.INT.PRIMARY.KEY, |
1ab220 | 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 | .b,.c);.CREATE.UNIQUE.INDEX.t8x. |
1ab240 | 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 41 53 43 29 3b 52 45 50 4c 41 43 45 20 49 4e 54 4f 20 | ON.t8((b||'x')ASC);REPLACE.INTO. |
1ab260 | 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 | t8(a,b,c).VALUES(1,'one',2),(2,' |
1ab280 | 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 | one',3).....ON.CONFLICT((b||'x') |
1ab2a0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 9d 06 04 00 82 73 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;..7.....sCREATE.TAB |
1ab2c0 | 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a | LE.t8(a.INT.PRIMARY.KEY,.b,.c);. |
1ab2e0 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 | CREATE.UNIQUE.INDEX.t8x.ON.t8((b |
1ab300 | 7c 7c 27 78 27 29 41 53 43 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 | ||'x')ASC);.INSERT.INTO.t8(a,b,c |
1ab320 | 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a | ).VALUES(1,'one',2),(2,'one',3). |
1ab340 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 41 53 43 29 20 44 4f 20 | ....ON.CONFLICT((b||'x')ASC).DO. |
1ab360 | 4e 4f 54 48 49 4e 47 3b 0a 81 09 9d 05 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 | NOTHING;.........CREATE.TABLE.t8 |
1ab380 | 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 | (a.INT.PRIMARY.KEY,.b,.c);.CREAT |
1ab3a0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 | E.UNIQUE.INDEX.t8x.ON.t8((b||'x' |
1ab3c0 | 29 29 3b 52 45 49 4e 44 45 58 20 72 74 72 69 6d 28 31 2c 31 29 4e 20 43 4f 4e 46 4c 49 43 54 28 | ));REINDEX.rtrim(1,1)N.CONFLICT( |
1ab3e0 | 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9d 04 04 00 82 17 43 52 | (b||'x')).DO.NOTHING;.........CR |
1ab400 | 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | EATE.TABLE.t8(a.INT.PRIMARY.KEY, |
1ab420 | 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 | .b,.c);.CREATE.UNIQUE.INDEX.t8x. |
1ab440 | 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 52 45 49 4e 44 45 58 00 49 4e 54 4f 20 74 20 20 | ON.t8((b||'x'));REINDEX.INTO.t.. |
1ab460 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e | .ON.CONFLICT((b||'x')).DO.NOTHIN |
1ab480 | 47 3b 0a 81 31 9d 03 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 | G;..1.....gCREATE.TABLE.t8(a.INT |
1ab4a0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .PRIMARY.KEY,.b,.c);.CREATE.UNIQ |
1ab4c0 | 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e | UE.INDEX.t8x.ON.t8((b||'x'));.IN |
1ab4e0 | 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 63 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e | SERT.INTO.t8(a,c,c).VALUES(1,'on |
1ab500 | 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | e',2),(2,'one',3).....ON.CONFLIC |
1ab520 | 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 38 9d 02 04 00 82 75 | T((b||'x')).DO.NOTHING;..8.....u |
1ab540 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 | CREATE.TABLE.t8(a.INT.PRIMARY.KE |
1ab560 | 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 | Y,.b,.c);.CREATE.UNIQUE.INDEX.t8 |
1ab580 | 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | x.ON.t8((b||'x'));.INSERT.INTO.t |
1ab5a0 | 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 49 53 20 74 72 75 65 2c 32 | 8(a,b,c).VALUES(1,'one'IS.true,2 |
1ab5c0 | 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 | ),(2,'one',3).....ON.CONFLICT((b |
1ab5e0 | 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 9d 01 04 00 82 67 43 52 45 41 | ||'x')).DO.NOTHING;..1.....gCREA |
1ab600 | 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | TE.TABLE.t8(a.INT.PRIMARY.KEY,.b |
1ab620 | 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e | ,.c);.CREATE.UNIQUE.INDEX.t8x.ON |
1ab640 | 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c | .t8((b||'x'));.INSERT.INTO.t8(a, |
1ab660 | 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 a7 2c | b,c).VALUES(1,'one',2),(2,'one., |
1ab680 | 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 | 3).....ON.CONFLICT((b||'x')).DO. |
1ab6a0 | 4e 4f 54 48 49 4e 47 3b 0a 81 3f 9d 00 04 00 83 03 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 | NOTHING;..?......CREATE.TABLE.t8 |
1ab6c0 | 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 | (a.INT.PRIMARY.KEY,.b,.c);.CREAT |
1ab6e0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 | E.UNIQUE.INDEX.t8x.ON.t8((b||'x' |
1ab700 | 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 | ));.INSERT.INTO.t8(a,b,c).VALUES |
1ab720 | 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 | (1,'one',2),(2,'one',3).....ON.C |
1ab740 | 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 29 29 20 | ONFLICT((b||'x'COLLATE.nocase)). |
1ab760 | 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 9c 7f 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 | DO.NOTHING;..4.....mCREATE.TABLE |
1ab780 | 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 | .t8(a.INT.PRIMARY.KEY,.b,.c);.CR |
1ab7a0 | 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c | EATE.UNIQUE.INDEX.t8x.ON.t8((b|| |
1ab7c0 | 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c | 'x'));.INSERT.INTO.t8(a,b,c).VAL |
1ab7e0 | 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f | UES(1,'one',2),(2,'one',3).....O |
1ab800 | 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 41 53 43 29 20 44 4f 20 4e 4f 54 48 49 | N.CONFLICT((b||'x')ASC).DO.NOTHI |
1ab820 | 4e 47 3b 0a 81 34 9c 7e 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e | NG;..4.~...mCREATE.TABLE.t8(a.IN |
1ab840 | 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 | T.PRIMARY.KEY,.b,.c);.CREATE.UNI |
1ab860 | 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 | QUE.INDEX.t8x.ON.t8((b||'x'));.I |
1ab880 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f | NSERT.INTO.t8(a,b,c).VALUES(1,'o |
1ab8a0 | 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | ne',2),(2,'one',3).....ON.CONFLI |
1ab8c0 | 43 54 28 20 40 31 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 9c 7d | CT(.@1(b||'x')).DO.NOTHING;..1.} |
1ab8e0 | 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 | ...gCREATE.TABLE.t8(a.INT.PRIMAR |
1ab900 | 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 | Y.KEY,.b,.c);.CREATE.UNIQUE.INDE |
1ab920 | 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e | X.t8x.ON.t8((b||'x'));.INSERT.IN |
1ab940 | 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 20 6a 75 6c 69 61 6e 64 61 79 | TO.t8(a,b,c).VALUES(1,.julianday |
1ab960 | 28 3f 2c 31 2c 31 29 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 | (?,1,1),3).....ON.CONFLICT((b||' |
1ab980 | 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 9c 7c 04 00 82 67 43 52 45 41 54 45 20 | x')).DO.NOTHING;..1.|...gCREATE. |
1ab9a0 | 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 | TABLE.t8(a.INT.PRIMARY.KEY,.b,.c |
1ab9c0 | 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 | );.CREATE.UNIQUE.INDEX.t8x.ON.t8 |
1ab9e0 | 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 | ((b||'x'));.INSERT.INTO.t8(a,b,c |
1aba00 | 29 20 56 41 4c 55 45 53 28 31 2c 20 6a 75 6c 69 61 6e 64 61 79 28 31 2c 3f 2c 31 29 2c 33 29 0a | ).VALUES(1,.julianday(1,?,1),3). |
1aba20 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 | ....ON.CONFLICT((b||'x')).DO.NOT |
1aba40 | 48 49 4e 47 3b 0a 81 31 9c 7b 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 | HING;..1.{...gCREATE.TABLE.t8(a. |
1aba60 | 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 | INT.PRIMARY.KEY,.b,.c);.CREATE.U |
1aba80 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b | NIQUE.INDEX.t8x.ON.t8((b||'x')); |
1abaa0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c | .INSERT.INTO.t8(a,b,c).VALUES(1, |
1abac0 | 20 6a 75 6c 69 61 6e 64 61 79 28 20 31 3d 31 31 29 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | .julianday(.1=11),3).....ON.CONF |
1abae0 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 31 9c 7a 04 | LICT((b||'x')).DO.NOTHING;..1.z. |
1abb00 | 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 | ..gCREATE.TABLE.t8(a.INT.PRIMARY |
1abb20 | 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 | .KEY,.b,.c);.CREATE.UNIQUE.INDEX |
1abb40 | 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | .t8x.ON.t8((b||'x'));.INSERT.INT |
1abb60 | 4f 20 74 38 28 60 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 | O.t8(`,b,c).VALUES(1,'one',2),(2 |
1abb80 | 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 | ,'one',3).....ON.CONFLICT((b||'x |
1abba0 | 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 9c 79 04 00 82 6d 43 52 45 41 54 45 20 54 | ')).DO.NOTHING;..4.y...mCREATE.T |
1abbc0 | 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 | ABLE.t8(a.INT.PRIMARY.KEY,.b,.c) |
1abbe0 | 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 | ;.CREATE.UNIQUE.INDEX.t8x.ON.t8( |
1abc00 | 28 62 7c 7c 20 2d 4e 55 4c 4c 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 | (b||.-NULL));.INSERT.INTO.t8(a,b |
1abc20 | 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 | ,c).VALUES(1,'one',2),(2,'one',3 |
1abc40 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 20 40 31 29 29 20 44 4f 20 4e | ).....ON.CONFLICT((b||.@1)).DO.N |
1abc60 | 4f 54 48 49 4e 47 3b 0a 81 31 9c 78 04 00 82 67 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 | OTHING;..1.x...gCREATE.TABLE.t8( |
1abc80 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 | a.INT.PRIMARY.KEY,.b,.c);.CREATE |
1abca0 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 20 2d 41 29 | .UNIQUE.INDEX.t8x.ON.t8((b||.-A) |
1abcc0 | 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 | );.INSERT.INTO.t8(a,b,c).VALUES( |
1abce0 | 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f | 1,'one',2),(2,'one',3).....ON.CO |
1abd00 | 4e 46 4c 49 43 54 28 28 62 7c 7c 20 40 31 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 9c | NFLICT((b||.@1)).DO.NOTHING;..4. |
1abd20 | 77 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 | w...mCREATE.TABLE.t8(a.INT.PRIMA |
1abd40 | 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 | RY.KEY,.b,.c);.CREATE.UNIQUE.IND |
1abd60 | 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 20 2d 20 2d 2e 31 29 29 3b 0a 49 4e 53 45 52 | EX.t8x.ON.t8((b||.-.-.1));.INSER |
1abd80 | 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c | T.INTO.t8(a,b,c).VALUES(1,'one', |
1abda0 | 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 | 2),(2,'one',3).....ON.CONFLICT(( |
1abdc0 | 62 7c 7c 20 40 31 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 34 9c 76 04 00 82 6d 43 52 45 | b||.@1)).DO.NOTHING;..4.v...mCRE |
1abde0 | 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | ATE.TABLE.t8(a.INT.PRIMARY.KEY,. |
1abe00 | 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f | b,.c);.CREATE.UNIQUE.INDEX.t8x.O |
1abe20 | 4e 20 74 38 28 28 62 7c 7c 20 2d 20 2d 2b 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | N.t8((b||.-.-+1));.INSERT.INTO.t |
1abe40 | 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f | 8(a,b,c).VALUES(1,'one',2),(2,'o |
1abe60 | 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 20 40 31 29 29 | ne',3).....ON.CONFLICT((b||.@1)) |
1abe80 | 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 37 9c 75 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c | .DO.NOTHING;..7.u...sCREATE.TABL |
1abea0 | 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 | E.t8(a.INT.PRIMARY.KEY,.b,.c);.C |
1abec0 | 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c | REATE.UNIQUE.INDEX.t8x.ON.t8((b| |
1abee0 | 7c 20 2d 20 2d 20 2d 31 2e 31 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 | |.-.-.-1.1));.INSERT.INTO.t8(a,b |
1abf00 | 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 | ,c).VALUES(1,'one',2),(2,'one',3 |
1abf20 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 20 40 31 29 29 20 44 4f 20 4e | ).....ON.CONFLICT((b||.@1)).DO.N |
1abf40 | 4f 54 48 49 4e 47 3b 0a 81 34 9c 74 04 00 82 6d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 | OTHING;..4.t...mCREATE.TABLE.t8( |
1abf60 | 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 | a.INT.PRIMARY.KEY,.b,.c);.CREATE |
1abf80 | 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 20 2d 20 27 | .UNIQUE.INDEX.t8x.ON.t8((b||.-.' |
1abfa0 | 61 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 | a'));.INSERT.INTO.t8(a,b,c).VALU |
1abfc0 | 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e | ES(1,'one',2),(2,'one',3).....ON |
1abfe0 | 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 20 40 31 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | .CONFLICT((b||.@1)).DO.NOTHING;. |
1ac000 | 0d 00 00 00 2b 00 a5 00 1f 73 1e e2 1e 55 1d 94 1c d9 1c 1e 1b 63 1a a3 19 e3 19 1b 18 5c 17 9b | ....+....s...U.......c.......\.. |
1ac020 | 17 0e 16 75 15 e8 15 0f 14 7f 13 f2 13 24 12 3b 11 ab 10 c2 10 35 0f 81 0e ab 0d c2 0d 35 0c a8 | ...u.........$.;.....5.......5.. |
1ac040 | 0c 1b 0b 8e 0a a5 09 ec 09 5b 08 84 07 a7 06 d6 05 e6 04 f6 04 5d 03 71 02 88 01 95 00 a5 00 00 | .........[...........].q........ |
1ac060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ac080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ac0a0 | 00 00 00 00 00 81 6c 9d 4b 04 00 83 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 | ......l.K...]CREATE.TABLE.t9(a.T |
1ac0c0 | 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 | EXT.PRIMARY.KEY,.b.INT.DEFAULT.1 |
1ac0e0 | 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 | );.PRAGMA.count_changes=ON;.INSE |
1ac100 | 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d | RT.INTO.t9(a).VALUES(.sqlite_com |
1ac120 | 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 3f 29 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 | pileoption_used(?)),('jkl'),('ab |
1ac140 | 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | c'),('ghi').....ON.CONFLICT(a).D |
1ac160 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | O.UPDATE.SET.b=b+1;.PRAGMA.count |
1ac180 | 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 52 45 49 4e 44 45 58 0a 81 6f 9d 4a 04 00 83 63 43 52 45 | _changes=OFF;REINDEX..o.J...cCRE |
1ac1a0 | 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | ATE.TABLE.t9(a.TEXT.PRIMARY.KEY, |
1ac1c0 | 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .b.INT.DEFAULT.1);.PRAGMA.count_ |
1ac1e0 | 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 | changes=ON;.INSERT.INTO.t9(a).VA |
1ac200 | 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 | LUES(.sqlite_compileoption_used( |
1ac220 | 31 29 29 2c 28 27 6a 6b 6c 27 41 4e 44 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 | 1)),('jkl'AND'abc'),('ghi')..... |
1ac240 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 | ON.CONFLICT(a).DO.UPDATE.SET.b=b |
1ac260 | 2b 32 30 30 31 2d 30 31 2d 30 31 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | +2001-01-011;.PRAGMA.count_chang |
1ac280 | 65 73 3d 4f 46 46 3b 0a 81 65 9d 49 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 | es=OFF;..e.I...OCREATE.TABLE.t9( |
1ac2a0 | 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c | a.TEXT.PRIMARY.KEY,.b.INT.DEFAUL |
1ac2c0 | 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 | T.1);.PRAGMA.count_changes=ON;.I |
1ac2e0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f | NSERT.INTO.t9(a).VALUES(.sqlite_ |
1ac300 | 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 2c 28 27 6a 6b 6c 27 41 4e 44 | compileoption_used(1)),('jkl'AND |
1ac320 | 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 'abc'),('ghi').....ON.CONFLICT(a |
1ac340 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f | ).DO.UPDATE.SET.b=b+1;.PRAGMA.co |
1ac360 | 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 68 9d 48 04 00 83 55 43 52 45 41 54 45 20 | unt_changes=OFF;..h.H...UCREATE. |
1ac380 | 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 | TABLE.t9(a.TEXT.PRIMARY.KEY,.b.I |
1ac3a0 | 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e | NT.DEFAULT.1);.PRAGMA.count_chan |
1ac3c0 | 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 | ges=ON;.INSERT.INTO.t9(a).VALUES |
1ac3e0 | 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 2c | (.sqlite_compileoption_used(1)), |
1ac400 | 28 27 6a 6b 6c 27 41 4e 44 27 61 62 63 27 29 2c 28 27 67 68 69 27 20 2d 31 29 0a 20 20 20 20 4f | ('jkl'AND'abc'),('ghi'.-1).....O |
1ac420 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b | N.CONFLICT(a).DO.UPDATE.SET.b=b+ |
1ac440 | 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 15 9d | 1;.PRAGMA.count_changes=OFF;.... |
1ac460 | 47 04 00 82 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d | G.../CREATE.TABLE.t9(a.TEXT.PRIM |
1ac480 | 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d | ARY.KEY,.b.INT.DEFAULT.1);.PRAGM |
1ac4a0 | 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | A.count_changes=ON;.INSERT.INTO. |
1ac4c0 | 74 39 28 61 29 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 | t9(a).VALUES(.sqlite_compileopti |
1ac4e0 | 6f 6e 5f 75 73 65 64 28 31 29 29 2c 28 27 6a 6b 6c 27 29 3b 28 0a 81 6c 9d 46 04 00 83 5d 43 52 | on_used(1)),('jkl');(..l.F...]CR |
1ac500 | 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | EATE.TABLE.t9(a.TEXT.PRIMARY.KEY |
1ac520 | 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | ,.b.INT.DEFAULT.1);.PRAGMA.count |
1ac540 | 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 | _changes=ON;.INSERT.INTO.t9(a).V |
1ac560 | 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 | ALUES(.sqlite_compileoption_used |
1ac580 | 28 31 29 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 69 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 | (1)),('jkl'),('ibc'),('ghi').... |
1ac5a0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
1ac5c0 | 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 52 45 | b+1;.PRAGMA.count_changes=OFF;RE |
1ac5e0 | 49 4e 44 45 58 0a 81 6c 9d 45 04 00 83 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 | INDEX..l.E...]CREATE.TABLE.t9(a. |
1ac600 | 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | TEXT.PRIMARY.KEY,.b.INT.DEFAULT. |
1ac620 | 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 | 1);.PRAGMA.count_changes=ON;.INS |
1ac640 | 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f | ERT.INTO.t9(a).VALUES(.sqlite_co |
1ac660 | 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 29 2c 28 27 20 62 6d 32 35 28 31 29 61 | mpileoption_used(1)),('.bm25(1)a |
1ac680 | 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | bc'),('ghi').....ON.CONFLICT(a). |
1ac6a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e | DO.UPDATE.SET.b=b+1;.PRAGMA.coun |
1ac6c0 | 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 52 45 49 4e 44 45 58 0a 81 4d 9d 44 04 00 83 1f 43 52 | t_changes=OFF;REINDEX..M.D....CR |
1ac6e0 | 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | EATE.TABLE.t9(a.TEXT.PRIMARY.KEY |
1ac700 | 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | ,.b.INT.DEFAULT.1);.PRAGMA.count |
1ac720 | 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 | _changes=ON;.INSERT.INTO.t9(a).V |
1ac740 | 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 | ALUES(.sqlite_compileoption_used |
1ac760 | 28 31 29 29 2c 28 20 6a 73 6f 6e 5f 6f 62 6a 65 63 74 28 31 2c 31 2c 31 2c 31 29 29 0a 20 20 20 | (1)),(.json_object(1,1,1,1)).... |
1ac780 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d | .ON.CONFLICT(a).DO.UPDATE.SET.b= |
1ac7a0 | 62 2b 31 3b 0a 50 0a 81 59 9d 43 04 00 83 37 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 | b+1;.P..Y.C...7CREATE.TABLE.t9(a |
1ac7c0 | 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 | .TEXT.PRIMARY.KEY,.b.INT.DEFAULT |
1ac7e0 | 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e | .1);.PRAGMA.count_changes=ON;.IN |
1ac800 | 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 53 45 4c 45 43 54 28 53 45 4c 45 43 54 27 61 62 | SERT.INTO.t9(a).SELECT(SELECT'ab |
1ac820 | 63 27 29 2c 20 61 76 67 28 31 29 2c 28 53 45 4c 45 43 54 27 67 68 69 27 29 2c 28 27 61 62 63 27 | c'),.avg(1),(SELECT'ghi'),('abc' |
1ac840 | 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e | ),('jkl'),('abc'),('ghi').....ON |
1ac860 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 | .CONFLICT(a).DO.UPDATE.SET.b=b+1 |
1ac880 | 3b 0a 50 0a 81 53 9d 42 04 00 83 2b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 | ;.P..S.B...+CREATE.TABLE.t9(a.TE |
1ac8a0 | 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 | XT.PRIMARY.KEY,.b.INT.DEFAULT.1) |
1ac8c0 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 | ;.PRAGMA.count_changes=ON;.INSER |
1ac8e0 | 54 20 49 4e 54 4f 20 74 39 28 61 29 20 53 45 4c 45 43 54 28 53 45 4c 45 43 54 27 61 62 63 27 29 | T.INTO.t9(a).SELECT(SELECT'abc') |
1ac900 | 2c 20 61 76 67 28 31 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 | ,.avg(1),('ghi'),('abc'),('jkl') |
1ac920 | 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ,('abc'),('ghi').....ON.CONFLICT |
1ac940 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 0a 81 0d 9d 41 04 | (a).DO.UPDATE.SET.b=b+1;.P....A. |
1ac960 | 00 82 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 | ...CREATE.TABLE.t9(a.TEXT.PRIMAR |
1ac980 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 | Y.KEY,.b.INT.DEFAULT.1);.PRAGMA. |
1ac9a0 | 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 | count_changes=ON;.INSERT.INTO.t9 |
1ac9c0 | 28 61 29 20 53 45 4c 45 43 54 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 | (a).SELECT('abc'),('def'),('ghi' |
1ac9e0 | 29 2c 2a 27 67 68 69 27 29 0a 20 0a 81 35 9d 40 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c 45 | ),*'ghi')....5.@...oCREATE.TABLE |
1aca00 | 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 | .t9(a.TEXT.PRIMARY.KEY,.b.INT.DE |
1aca20 | 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f | FAULT.1);.PRAGMA.count_changes=O |
1aca40 | 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 53 45 4c 45 43 54 28 27 61 62 63 | N;.INSERT.INTO.t9(a).SELECT('abc |
1aca60 | 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c | '),('def'),('ghi'),('abc'),('jkl |
1aca80 | 27 29 2c 28 27 61 62 63 27 29 2c 20 67 72 6f 75 70 5f 63 6f 6e 63 61 74 28 31 2c 31 29 20 22 61 | '),('abc'),.group_concat(1,1)."a |
1acaa0 | 22 2c 22 62 22 81 65 9d 3f 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 | ","b".e.?...OCREATE.TABLE.t9(a.T |
1acac0 | 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 | EXT.PRIMARY.KEY,.b.INT.DEFAULT.1 |
1acae0 | 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4e 4f 3b 0a 49 4e 53 45 | );.PRAGMA.count_changes=NO;.INSE |
1acb00 | 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 | RT.INTO.t9(a).VALUES('abc'),('de |
1acb20 | 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 | f'),('ghi'),('abc'),('jkl'),('ab |
1acb40 | 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | c'),('ghi').....ON.CONFLICT(a).D |
1acb60 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | O.UPDATE.SET.b=b+1;.PRAGMA.count |
1acb80 | 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 09 9d 3e 04 00 82 17 43 52 45 41 54 45 20 54 41 42 | _changes=OFF;....>....CREATE.TAB |
1acba0 | 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 | LE.t9(a.TEXT.PRIMARY.KEY,.b.INT. |
1acbc0 | 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 | DEFAULT.1);.PRAGMA.count_changes |
1acbe0 | 3d 20 74 72 69 6d 27 67 68 69 27 29 0a 20 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b | =.trim'ghi')...UPDATE.SET.b=b+1; |
1acc00 | 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 09 9d 3d 04 | .PRAGMA.count_changes=OFF;....=. |
1acc20 | 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 | ...CREATE.TABLE.t9(a.TEXT.PRIMAR |
1acc40 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 | Y.KEY,.b.INT.DEFAULT.1);.PRAGMA. |
1acc60 | 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 20 2d 31 0a 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | count_changes=.-1.ICT(a).DO.UPDA |
1acc80 | 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | TE.SET.b=b+1;.PRAGMA.count_chang |
1acca0 | 65 73 3d 4f 46 46 3b 0a 81 09 9d 3c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 | es=OFF;....<....CREATE.TABLE.t9( |
1accc0 | 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c | a.TEXT.PRIMARY.KEY,.b.INT.DEFAUL |
1acce0 | 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 2d 4f 4e 46 4c 49 | T.1);.PRAGMA.count_changes-ONFLI |
1acd00 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d | CT(a).DO.UPDATE.SET.b=b+1;.PRAGM |
1acd20 | 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 09 9d 3b 04 00 82 17 43 52 45 | A.count_changes=OFF;....;....CRE |
1acd40 | 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | ATE.TABLE.t9(a.TEXT.PRIMARY.KEY, |
1acd60 | 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .b.INT.DEFAULT.1);.PRAGMA.count_ |
1acd80 | 63 68 61 6e 67 65 73 20 28 31 29 0a 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | changes.(1).ICT(a).DO.UPDATE.SET |
1acda0 | 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 | .b=b+1;.PRAGMA.count_changes=OFF |
1acdc0 | 3b 0a 81 65 9d 3a 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 | ;..e.:...OCREATE.TABLE.t9(a.TEXT |
1acde0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a | .PRIMARY.KEY,.b.INT.DEFAULT.1);. |
1ace00 | 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 6e 74 5f 63 3b 0a 49 4e 53 45 52 54 20 | PRAGMA.count_changent_c;.INSERT. |
1ace20 | 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 | INTO.t9(a).VALUES('abc'),('def') |
1ace40 | 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 | ,('ghi'),('abc'),('jkl'),('abc') |
1ace60 | 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | ,('ghi').....ON.CONFLICT(a).DO.U |
1ace80 | 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 | PDATE.SET.b=b+1;.PRAGMA.count_ch |
1acea0 | 61 6e 67 42 73 3d 4f 46 46 3b 0a 81 52 9d 39 04 00 83 29 43 52 45 41 54 45 20 54 41 42 4c 45 20 | angBs=OFF;..R.9...)CREATE.TABLE. |
1acec0 | 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 | t9(a.TEXT.PRIMARY.KEY,.b.INT.DEF |
1acee0 | 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 52 65 73 3d 4f 4e | AULT.1);.PRAGMA.count_chanRes=ON |
1acf00 | 3b 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 | ;VALUES('abc'),('def'),('ghi'),( |
1acf20 | 27 61 62 63 27 29 eb eb eb eb eb eb eb eb eb eb eb eb 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 | 'abc')............bc'),('ghi').. |
1acf40 | 20 20 20 4f 4e 20 40 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.@ONFLICT(a).DO.UPDATE.SET. |
1acf60 | 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b | b=b+1;.PRAGMA.count_changes=OFF; |
1acf80 | 0a 81 30 9d 38 04 00 82 65 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 | ..0.8...eCREATE.TABLE.t9(a.TEXT. |
1acfa0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 | PRIMARY.KEY,.b.INT.DEFAULT.1);.P |
1acfc0 | 52 41 47 4d 41 20 63 6f 75 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | RAGMA.couhanges=ON;.INSERT.INTO. |
1acfe0 | 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 29 2c 28 27 6a 6b 6c 27 29 2c 28 | t9(a).VALUES('abc'),(),('jkl'),( |
1ad000 | 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 'abc'),('ghi').....ON.CONFLICT(a |
1ad020 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 62 2b 31 81 09 9d 37 04 00 82 17 43 52 45 | ).DO.UPDATE.SET.a=b+1...7....CRE |
1ad040 | 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | ATE.TABLE.t9(a.TEXT.PRIMARY.KEY, |
1ad060 | 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 2e 74 5f | .b.INT.DEFAULT.1);.PRAGMA.cou.t_ |
1ad080 | 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 | changes=ON;.I'),('ghi').....ON.C |
1ad0a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 62 2b 31 3b 0a | ONFLICT(a).DO.UPDATE.SET.a=b+1;. |
1ad0c0 | 50 0a 81 65 9d 36 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 | P..e.6...OCREATE.TABLE.t9(a.TEXT |
1ad0e0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a | .PRIMARY.KEY,.b.INT.DEFAULT.1);. |
1ad100 | 50 52 41 47 4d 41 20 63 6f 0d 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 | PRAGMA.co.nt_changes=ON;.INSERT. |
1ad120 | 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 | INTO.t9(a).VALUES('abc'),('def') |
1ad140 | 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 | ,('ghi'),('abc'),('jkl'),('abc') |
1ad160 | 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | ,('ghi').....ON.CONFLICT(a).DO.U |
1ad180 | 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 | PDATE.SET.b=b+1;.PRAGMA.count_ch |
1ad1a0 | 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 0c 9d 35 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 | anges=OFF;....5....CREATE.TABLE. |
1ad1c0 | 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 | t9(a.TEXT.PRIMARY.KEY,.b.INT.DEF |
1ad1e0 | 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 62 6d 32 35 28 20 2d 31 31 29 68 61 6e 67 20 20 | AULT.1);.PRAGMA.bm25(.-11)hang.. |
1ad200 | 20 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b | .ONFLICT(a).DO.UPDATE.SET.b=b+1; |
1ad220 | 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 34 04 | .PRAGMA.count_changes=OFF;..e.4. |
1ad240 | 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 | ..OCREATE.TABLE.t9(a.TEXT.PRIMAR |
1ad260 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 | Y.KEY,.b.INT.DEFAULT.1);.PRAGMA. |
1ad280 | 61 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 | aount_changes=ON;.INSERT.INTO.t9 |
1ad2a0 | 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 | (a).VALUES('abc'),('def'),('ghi' |
1ad2c0 | 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 | ),('abc'),('jkl'),('abc'),('ghi' |
1ad2e0 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
1ad300 | 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f | ET.b=b+1;.PRAGMA.count_changes=O |
1ad320 | 46 46 3b 0a 81 4a 9d 33 04 00 83 19 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 | FF;..J.3....CREATE.TABLE.t9(a.TE |
1ad340 | 58 54 20 50 52 49 4d 41 52 54 20 44 45 46 41 55 4c 54 20 4e 54 20 44 45 46 41 55 4c 54 20 31 29 | XT.PRIMART.DEFAULT.NT.DEFAULT.1) |
1ad360 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 0a 49 4e 53 45 52 54 20 49 | ;.PRAGMA.count_changes=.INSERT.I |
1ad380 | 4e 54 4f 20 74 39 28 60 29 20 53 45 4c 45 00 40 20 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c | NTO.t9(`).SELE.@.'abc'),('def'), |
1ad3a0 | 28 27 67 68 69 27 29 2c 28 27 61 62 50 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c | ('ghi'),('abP'),('jkl'),('abc'), |
1ad3c0 | 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ('ghi').....ON.CONFLICT(a).DO.UP |
1ad3e0 | 44 41 46 45 0c 53 45 54 20 62 3d 62 2b 31 3b 0a 50 0a 81 09 9d 32 04 00 82 17 43 52 45 41 54 45 | DAFE.SET.b=b+1;.P....2....CREATE |
1ad400 | 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 62 20 | .TABLE.t9(a.TEXT.PR,MARY.KEY,.b. |
1ad420 | 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 | INT.DEFAULT.1);.PRAGMA.count_cha |
1ad440 | 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 | nges=ON;.INSERT.INTO.t9(a).VALUE |
1ad460 | 53 28 27 61 62 63 27 29 3b 28 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 | S('abc');(A.count_changes=OFF;.. |
1ad480 | 0c 9d 31 04 00 82 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 | ..1....CREATE.TABLE.t9(a.TEXT.PR |
1ad4a0 | 2c 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 | ,MARY.KEY,.b.INT.DEFAULT.1);.PRA |
1ad4c0 | 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | GMA.count_changes=ON;.INSERT.INT |
1ad4e0 | 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 20 2d 31 29 3b 28 41 20 63 6f 75 6e | O.t9(a).VALUES('abc'.-1);(A.coun |
1ad500 | 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 55 9d 30 04 00 83 2f 43 52 45 41 54 45 20 54 41 | t_changes=OFF;..U.0.../CREATE.TA |
1ad520 | 42 4c 45 20 74 39 28 61 20 54 45 58 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 | BLE.t9(a.TEX.INT.DEFAULT.1);.PRA |
1ad540 | 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | GMA.count_changes=ON;.INSERT.INT |
1ad560 | 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 | O.t9(a).VALUES('abc'),('def'),(' |
1ad580 | 67 68 69 27 29 00 20 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 | ghi')..'abc'),('jkl'),('abc'),(' |
1ad5a0 | 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | ghi').....ON.CONFLICT(a).DO.UPDA |
1ad5c0 | 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | TE.SET.b=b+1;.PRAGMA.count_chang |
1ad5e0 | 65 73 3d 4f 46 46 3b 0a 81 09 9d 2f 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 | es=OFF;..../....CREATE.TABLE.t9( |
1ad600 | 61 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 20 62 20 49 4e 54 20 44 45 46 41 55 4c | a.CURRENT_TIMESTAMP.b.INT.DEFAUL |
1ad620 | 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 | T.1);.PRAGMA.count_changes=ON;.I |
1ad640 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 3b 28 | NSERT.INTO.t9(a).VALUES('abc');( |
1ad660 | 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 15 9d 2e 04 00 82 2f 43 52 45 | A.count_changes=OFF;......../CRE |
1ad680 | 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 | ATE.TABLE.t9(a.CURRENT_TIMESTAMP |
1ad6a0 | 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .b.INT.DEFAULT.1);.PRAGMA.count_ |
1ad6c0 | 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 | changes=ON;.INSERT.INTO.t9(a).VA |
1ad6e0 | 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 | LUES(.sqlite_compileoption_used( |
1ad700 | 31 29 29 2c 28 27 6a 6b 6c 27 29 3b 28 0a 81 09 9d 2d 04 00 82 17 43 52 45 41 54 45 20 54 41 42 | 1)),('jkl');(....-....CREATE.TAB |
1ad720 | 4c 45 20 74 38 28 61 20 49 4e 54 a0 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a | LE.t8(a.INT.PRIMARY.KEY,.b,.c);. |
1ad740 | 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 | CREATE.UNIQUE.INDEX.t8x.ON.t8((b |
1ad760 | 7c 7c 27 78 27 29 29 3b 52 45 49 4e 44 45 58 20 72 74 72 69 6d 28 31 2c 31 29 4e 20 43 4f 4e 46 | ||'x'));REINDEX.rtrim(1,1)N.CONF |
1ad780 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 3d 9d 2c 04 | LICT((b||'x')).DO.NOTHING;..=.,. |
1ad7a0 | 00 82 7f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 43 4f 4d 4d 49 54 20 50 | ...CREATE.TABLE.t8(a.INTCOMMIT.P |
1ad7c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 | RIMARY.KEY,.b,.c);.CREATE.UNIQUE |
1ad7e0 | 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 | .INDEX.t8x.ON.t8((b||'x'));.INSE |
1ad800 | 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 | RT.INTO.t8(a,b,c).VALUES(1,'one' |
1ad820 | 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ,2),(2,'one',3).....ON.CONFLICT( |
1ad840 | 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 3b 9d 2b | (b||'x')).DO.NOTHING;VACUUM..;.+ |
1ad860 | 04 00 82 7b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 | ...{CREATE.TABLE.t8(a.INT.PRIMAR |
1ad880 | 59 20 4b 45 59 2c 20 62 2c 43 4f 4e 53 54 52 41 49 4e 54 20 63 29 3b 0a 43 52 45 41 54 45 20 55 | Y.KEY,.b,CONSTRAINT.c);.CREATE.U |
1ad8a0 | 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b | NIQUE.INDEX.t8x.ON.t8((b||'x')); |
1ad8c0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c | .INSERT.INTO.t8(a,b,c).VALUES(1, |
1ad8e0 | 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | 'one',2),(2,'one',3).....ON.CONF |
1ad900 | 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 44 9d 2a 04 | LICT((b||'x')).DO.NOTHING;..D.*. |
1ad920 | 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 | ...CREATE.TABLE.t8(a.INT.PRIMARY |
1ad940 | 20 4b 45 59 2c 20 62 2c 20 63 29 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | .KEY,.b,.c);EXPLAIN.CREATE.UNIQU |
1ad960 | 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 64 61 74 65 28 31 2c 31 2c 31 | E.INDEX.t8x.ON.t8((b|.date(1,1,1 |
1ad980 | 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 | )|'x'));.INSERT.INTO.t8(a,b,c).V |
1ad9a0 | 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 | ALUES(1,'one',2),(2,'one',3).... |
1ad9c0 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e | .ON.CONFLICT((b||'x')).DO.NOTHIN |
1ad9e0 | 47 3b 0a 81 3c 9d 29 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 | G;..<.)...}CREATE.TABLE.t8(a.INT |
1ada00 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 | .PRIMARY.KEY,.b,.c);EXPLAIN.CREA |
1ada20 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 31 3d | TE.UNIQUE.INDEX.t8x.ON.t8((b|.1= |
1ada40 | 31 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 | 1|'x'));.INSERT.INTO.t8(a,b,c).V |
1ada60 | 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 | ALUES(1,'one',2),(2,'one',3).... |
1ada80 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e | .ON.CONFLICT((b||'x')).DO.NOTHIN |
1adaa0 | 47 3b 0a 81 3c 9d 28 04 00 82 7d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 | G;..<.(...}CREATE.TABLE.t8(a.INT |
1adac0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 45 58 50 4c 41 49 4e 0a 43 52 45 41 | .PRIMARY.KEY,.b,.c);EXPLAIN.CREA |
1adae0 | 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 20 31 3c | TE.UNIQUE.INDEX.t8x.ON.t8((b|.1< |
1adb00 | 31 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 | 1|'x'));.INSERT.INTO.t8(a,b,c).V |
1adb20 | 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 | ALUES(1,'one',2),(2,'one',3).... |
1adb40 | 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e | .ON.CONFLICT((b||'x')).DO.NOTHIN |
1adb60 | 47 3b 0a 81 37 9d 27 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 | G;..7.'...sCREATE.TABLE.t8(a.INT |
1adb80 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 | .PRIMARY.KEY,.b,.c);.CREATE.UNIQ |
1adba0 | 55 45 20 49 4e 44 45 58 20 ff ff 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e | UE.INDEX...x.ON.t8((b||'x'));.IN |
1adbc0 | 53 45 52 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e | SERT.INTO.t8(a,b,c).VALUES(1,'on |
1adbe0 | 65 27 2c 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 | e',2),(2,'one',3).....ON.CONFLIC |
1adc00 | 54 28 28 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 37 | T((b||'x')).DO.NOTHING;VACUUM..7 |
1adc20 | 9d 26 04 00 82 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d | .&...sCREATE.TABLE.t8(a.INT.PRIM |
1adc40 | 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | ARY.KEY,.b,.c);.CREATE.UNIQUE.IN |
1adc60 | 44 45 58 20 f4 ff ff 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 | DEX.....ON.t8((b||'x'));.INSERT. |
1adc80 | 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 | INTO.t8(a,b,c).VALUES(1,'one',2) |
1adca0 | 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c | ,(2,'one',3).....ON.CONFLICT((b| |
1adcc0 | 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 37 9d 25 04 00 82 | |'x')).DO.NOTHING;VACUUM..7.%... |
1adce0 | 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b | sCREATE.TABLE.t8(a.INT.PRIMARY.K |
1add00 | 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 f4 | EY,.b,.c);.CREATE.UNIQUE.INDEX.. |
1add20 | 38 78 20 4f 4e 20 74 38 28 28 62 7c 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | 8x.ON.t8((b||'x'));.INSERT.INTO. |
1add40 | 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c 32 29 2c 28 32 2c 27 | t8(a,b,c).VALUES(1,'one',2),(2,' |
1add60 | 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 62 7c 7c 27 78 27 29 | one',3).....ON.CONFLICT((b||'x') |
1add80 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 56 41 43 55 55 4d 0a 81 3d 9d 24 04 00 82 7f 43 52 45 41 | ).DO.NOTHING;VACUUM..=.$....CREA |
1adda0 | 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | TE.TABLE.t8(a.INT.PRIMARY.KEY,.b |
1addc0 | 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e | ,.c);.CREATE.UNIQUE.INDEX.t8x.ON |
1adde0 | 20 74 38 28 32 30 30 31 2d 30 31 2d 30 31 2c 31 2c 31 29 7c 27 78 27 29 29 3b 0a 49 4e 53 45 52 | .t8(2001-01-01,1,1)|'x'));.INSER |
1ade00 | 54 20 49 4e 54 4f 20 74 38 28 61 2c 62 2c 63 29 20 56 41 4c 55 45 53 28 31 2c 27 6f 6e 65 27 2c | T.INTO.t8(a,b,c).VALUES(1,'one', |
1ade20 | 32 29 2c 28 32 2c 27 6f 6e 65 27 2c 33 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 28 | 2),(2,'one',3).....ON.CONFLICT(( |
1ade40 | 62 7c 7c 27 78 27 29 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9d 23 04 00 82 17 43 52 45 | b||'x')).DO.NOTHING;....#....CRE |
1ade60 | 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | ATE.TABLE.t8(a.INT.PRIMARY.KEY,. |
1ade80 | 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f | b,.c);.CREATE.UNIQUE.INDEX.t8x.O |
1adea0 | 4e 20 74 38 28 28 62 7c 7e 4e 4f 54 27 2b 32 20 0b 0b 0b 8b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b | N.t8((b|~NOT'+2................. |
1adec0 | 0b 0b 0b 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 | ...daysx'));.INSERT.INTO.t8'one' |
1adee0 | 48 0a 81 0d 9d 22 04 00 82 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 | H...."....CREATE.TABLE.t8(a.INT. |
1adf00 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 | PRIMARY.KEY,.b,.c);.CREATE.UNIQU |
1adf20 | 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 74 38 28 28 62 7c 7e 4e 4f 54 27 2b 32 20 0b 0b 0b | E.INDEX.t8x.ON.t8((b|~NOT'+2.... |
1adf40 | 0b 0b 0b 0b 8b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 | ................daysx'));.INSERT |
1adf60 | 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 49 4e 47 3b 0a 81 09 9d 21 04 00 82 17 43 52 45 41 54 | .INTO.t8'one'HING;....!....CREAT |
1adf80 | 45 20 54 41 42 4c 45 20 74 38 28 61 20 49 4e 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 2c | E.TABLE.t8(a.INT.PRIMARY.KEY,.b, |
1adfa0 | 20 63 29 3b 0a 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 38 78 20 4f 4e 20 | .c);.CREATE.UNIQUE.INDEX.t8x.ON. |
1adfc0 | 74 38 28 28 62 7c 7e 4e 4f 54 27 2b 32 20 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b 0b | t8((b|~NOT'+2................... |
1adfe0 | 0b 64 61 79 73 78 27 29 29 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 38 27 6f 6e 65 27 48 0a | .daysx'));.INSERT.INTO.t8'one'H. |
1ae000 | 0d 00 00 00 24 00 b0 00 1f 17 1e 1c 1d 33 1c 4a 1b 61 1a 72 19 8d 18 a4 17 b8 16 cf 15 e6 14 fd | ....$........3.J.a.r............ |
1ae020 | 14 14 13 25 12 39 11 50 10 67 0f ba 0f 2d 0e 99 0e 06 0d 4d 0c 68 0b 83 0a 97 09 b2 08 c2 07 f1 | ...%.9.P.g...-.....M.h.......... |
1ae040 | 07 05 06 1c 05 33 04 4a 03 61 02 71 01 81 00 b0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | .....3.J.a.q.................... |
1ae060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ae080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1ae0a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 4d 9d 6f 04 00 83 1f 43 52 45 41 54 45 20 54 | .................M.o....CREATE.T |
1ae0c0 | 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e | ABLE.t9(a.TEXT.PRIMARY.KEY,.b.IN |
1ae0e0 | 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | T.DEFAULT.1);.PRAGMA.count_chang |
1ae100 | 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 28 | es=ON;.INSERT.INTO.t9(b).VALUES( |
1ae120 | 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 | 'abc'),('def'),('ghi'),('abc'),( |
1ae140 | 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f | 'jkl'),('abc'),('ghi').....ON.CO |
1ae160 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 62 2b 31 3b 0a 50 | NFLICT(a).DO.UPDATE.SET.a=b+1;.P |
1ae180 | 0a 81 6c 9d 6e 04 00 83 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 | ..l.n...]CREATE.TABLE.t9(a.TEXT. |
1ae1a0 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 | PRIMARY.KEY,.b.INT.DEFAULT.1);.P |
1ae1c0 | 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 | RAGMA.count_changes=ON;.INSERT.I |
1ae1e0 | 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c | NTO.t9(b).VALUES('abc'),('def'), |
1ae200 | 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c | ('ghi'.>='abc'),('jkl'),('abc'), |
1ae220 | 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ('ghi').....ON.CONFLICT(a).DO.UP |
1ae240 | 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 | DATE.SET.b=b+1;.PRAGMA.count_cha |
1ae260 | 6e 67 65 73 3d 4f 46 46 3b 52 45 49 4e 44 45 58 0a 81 6c 9d 6d 04 00 83 5d 43 52 45 41 54 45 20 | nges=OFF;REINDEX..l.m...]CREATE. |
1ae280 | 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 | TABLE.t9(a.TEXT.PRIMARY.KEY,.b.I |
1ae2a0 | 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e | NT.DEFAULT.1);.PRAGMA.count_chan |
1ae2c0 | 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 | ges=ON;.INSERT.INTO.t9(b).VALUES |
1ae2e0 | 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 29 2c | ('abc'),('def'),('ghi'.>='abc'), |
1ae300 | 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 | ('jkl'),('abc'),('ghi').....ON.C |
1ae320 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a | ONFLICT(a).DO.UPDATE.SET.b=b+1;. |
1ae340 | 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 41 4e 41 4c 59 5a 45 | PRAGMA.count_changes=OFF;ANALYZE |
1ae360 | 0a 81 65 9d 6c 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 | ..e.l...OCREATE.TABLE.t9(a.TEXT. |
1ae380 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 | PRIMARY.KEY,.b.INT.DEFAULT.1);.P |
1ae3a0 | 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 | RAGMA.count_changes=ON;.INSERT.I |
1ae3c0 | 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c | NTO.t9(b).VALUES('abc'),('def'), |
1ae3e0 | 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 20 3e | ('ghi'.>='abc'),('jkl'),('abc'.> |
1ae400 | 3d 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ='ghi').....ON.CONFLICT(a).DO.UP |
1ae420 | 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 | DATE.SET.b=b+1;.PRAGMA.count_cha |
1ae440 | 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 6b 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | nges=OFF;..e.k...OCREATE.TABLE.t |
1ae460 | 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 | 9(a.TEXT.PRIMARY.KEY,.b.INT.DEFA |
1ae480 | 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b | ULT.1);.PRAGMA.count_changes=ON; |
1ae4a0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 | .INSERT.INTO.t9(b).VALUES('abc') |
1ae4c0 | 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 20 | ,('def'),('ghi'.>='abc'),('jkl'. |
1ae4e0 | 3e 3d 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | >='abc'),('ghi').....ON.CONFLICT |
1ae500 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 3b 31 3b 0a 50 52 41 47 4d 41 20 | (a).DO.UPDATE.SET.b=b;1;.PRAGMA. |
1ae520 | 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 6a 04 00 83 4f 43 52 45 41 54 | count_changes=OFF;..e.j...OCREAT |
1ae540 | 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | E.TABLE.t9(a.TEXT.PRIMARY.KEY,.b |
1ae560 | 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 | .INT.DEFAULT.1);.PRAGMA.count_ch |
1ae580 | 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 | anges=ON;.INSERT.INTO.t9(b).VALU |
1ae5a0 | 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 | ES('abc'),('def'),('ghi'.>='abc' |
1ae5c0 | 29 2c 28 27 6a 6b 6c 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e | ),('jkl'.>='abc'),('ghi').....ON |
1ae5e0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 | .CONFLICT(a).DO.UPDATE.SET.b=b+1 |
1ae600 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 69 | ;.PRAGMA.count_changes=OFF;..e.i |
1ae620 | 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 | ...OCREATE.TABLE.t9(a.TEXT.PRIMA |
1ae640 | 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 | RY.KEY,.b.INT.DEFAULT.1);.PRAGMA |
1ae660 | 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | .count_changes=ON;.INSERT.INTO.t |
1ae680 | 39 28 62 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 | 9(b).VALUES('abc'),('def'),('ghi |
1ae6a0 | 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 67 68 69 | '.>='abc'),('jkl'.>='abc'),('ghi |
1ae6c0 | 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | ').....ON.CONFLICT(a).DO.UPDATE. |
1ae6e0 | 53 45 54 20 61 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d | SET.a=b+1;.PRAGMA.count_changes= |
1ae700 | 4f 46 46 3b 0a 81 68 9d 68 04 00 83 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 | OFF;..h.h...UCREATE.TABLE.t9(a.T |
1ae720 | 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 | EXT.PRIMARY.KEY,.b.INT.DEFAULT.1 |
1ae740 | 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 | );.PRAGMA.count_changes=ON;.INSE |
1ae760 | 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 | RT.INTO.t9(b).VALUES('abc'),('de |
1ae780 | 66 27 29 2c 28 27 67 68 69 27 20 3e 20 40 31 3d 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 | f'),('ghi'.>.@1='abc'),('jkl'),( |
1ae7a0 | 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 'abc'),('ghi').....ON.CONFLICT(a |
1ae7c0 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f | ).DO.UPDATE.SET.b=b+1;.PRAGMA.co |
1ae7e0 | 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 4d 9d 67 04 00 83 1f 43 52 45 41 54 45 20 | unt_changes=OFF;..M.g....CREATE. |
1ae800 | 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 | TABLE.t9(a.TEXT.PRIMARY.KEY,.b.I |
1ae820 | 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e | NT.DEFAULT.1);.PRAGMA.count_chan |
1ae840 | 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 62 29 20 56 41 4c 55 45 53 | ges=ON;.INSERT.INTO.t9(b).VALUES |
1ae860 | 28 27 61 62 63 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 | ('abc.sqlite_compileoption_used( |
1ae880 | 31 29 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 | 1)jkl'),('abc'),('ghi').....ON.C |
1ae8a0 | 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 62 2b 31 3b 0a | ONFLICT(a).DO.UPDATE.SET.a=b+1;. |
1ae8c0 | 50 0a 81 6c 9d 66 04 00 83 5d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 | P..l.f...]CREATE.TABLE.t9(a.TEXT |
1ae8e0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a | .PRIMARY.KEY,.b.INT.DEFAULT.1);. |
1ae900 | 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 | PRAGMA.count_changes=ON;.INSERT. |
1ae920 | 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 e1 62 63 27 29 2c 28 27 64 65 66 27 29 | INTO.t9(a).VALUES('.bc'),('def') |
1ae940 | 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 | ,('ghi'),('abc'),('jkl'),('abc') |
1ae960 | 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 | ,('ghi').....ON.CONFLICT(a).DO.U |
1ae980 | 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 | PDATE.SET.b=b+1;.PRAGMA.count_ch |
1ae9a0 | 61 6e 67 65 73 3d 4f 46 46 3b 52 45 49 4e 44 45 58 0a 81 61 9d 65 04 00 83 47 43 52 45 41 54 45 | anges=OFF;REINDEX..a.e...GCREATE |
1ae9c0 | 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | .TABLE.t9(a.TEXT.PRIMARY.KEY,.b. |
1ae9e0 | 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 | INT.DEFAULT.1);.PRAGMA.count_cha |
1aea00 | 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 | nges=ON;.INSERT.INTO.t9(a).VALUE |
1aea20 | 53 28 27 61 62 63 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 6a | S('abcite_compileoption_used(1)j |
1aea40 | 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | kl'),('abc'),('ghi').....ON.CONF |
1aea60 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 3b 31 3b 0a 50 52 41 | LICT(a).DO.UPDATE.SET.b=b;1;.PRA |
1aea80 | 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 68 9d 64 04 00 83 55 43 | GMA.count_changes=OFF;..h.d...UC |
1aeaa0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 | REATE.TABLE.t9(a.TEXT.PRIMARY.KE |
1aeac0 | 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e | Y,.b.INT.DEFAULT.1);.PRAGMA.coun |
1aeae0 | 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 | t_changes=ON;.INSERT.INTO.t9(a). |
1aeb00 | 56 41 4c 55 45 53 28 27 61 62 63 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 | VALUES('abcite_compileoption_use |
1aeb20 | 64 28 31 29 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e | d(1)jkl'),('abc'),('ghi').....ON |
1aeb40 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 | .CONFLICT(a).DO.UPDATE.SET.b=b+1 |
1aeb60 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 52 45 49 4e 44 | ;.PRAGMA.count_changes=OFF;REIND |
1aeb80 | 45 58 0a 81 61 9d 63 04 00 83 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 | EX..a.c...GCREATE.TABLE.t9(a.TEX |
1aeba0 | 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b | T.PRIMARY.KEY,.b.INT.DEFAULT.1); |
1aebc0 | 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 | .PRAGMA.count_changes=ON;.INSERT |
1aebe0 | 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 69 74 65 5f 63 6f 6d 70 69 | .INTO.t9(a).VALUES('abcite_compi |
1aec00 | 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 | leoption_used(1)jkl'),('abc'),(' |
1aec20 | 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | ghi').....ON.CONFLICT(a).DO.UPDA |
1aec40 | 54 45 20 53 45 54 20 61 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | TE.SET.a=b+1;.PRAGMA.count_chang |
1aec60 | 65 73 3d 4f 46 46 3b 0a 81 61 9d 62 04 00 83 47 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 | es=OFF;..a.b...GCREATE.TABLE.t9( |
1aec80 | 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c | a.TEXT.PRIMARY.KEY,.b.INT.DEFAUL |
1aeca0 | 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 | T.1);.PRAGMA.count_changes=ON;.I |
1aecc0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 54 64 65 66 | NSERT.INTO.t9(a).VALUES('abcTdef |
1aece0 | 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 | '),('ghi'),('abc'),('jkl'),('abc |
1aed00 | 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | '),('ghi').....ON.CONFLICT(a).DO |
1aed20 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .UPDATE.SET.b=b+1;.PRAGMA.count_ |
1aed40 | 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 35 9d 61 04 00 82 6f 43 52 45 41 54 45 20 54 41 42 4c | changes=OFF;..5.a...oCREATE.TABL |
1aed60 | 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 | E.t9(a.TEXT.PRIMARY.KEY,.b.INT.D |
1aed80 | 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d | EFAULT.1);.PRAGMA.count_changes= |
1aeda0 | 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 | ON;.INSERT.INTO.t9(a).VALUES('ab |
1aedc0 | 63 27 49 4e 28 53 45 4c 45 43 54 27 64 65 66 27 29 2c 28 53 45 4c 45 43 54 27 67 68 69 27 29 2c | c'IN(SELECT'def'),(SELECT'ghi'), |
1aede0 | 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 49 4e 27 67 68 69 27 29 0a | ('abc'),('jkl'),('abc')IN'ghi'). |
1aee00 | 20 43 54 28 61 0a 81 0f 9d 60 04 00 82 23 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 | .CT(a....`...#CREATE.TABLE.t9(a. |
1aee20 | 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | TEXT.PRIMARY.KEY,.b.INT.DEFAULT. |
1aee40 | 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 | 1);.PRAGMA.count_changes=ON;.INS |
1aee60 | 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 49 4e 28 53 45 | ERT.INTO.t9(a).VALUES('abc'IN(SE |
1aee80 | 4c 45 43 54 20 61 76 67 28 31 29 57 48 45 52 45 27 64 65 66 27 29 29 61 0a 81 10 9d 5f 04 00 82 | LECT.avg(1)WHERE'def'))a...._... |
1aeea0 | 25 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 | %CREATE.TABLE.t9(a.TEXT.PRIMARY. |
1aeec0 | 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f | KEY,.b.INT.DEFAULT.1);.PRAGMA.co |
1aeee0 | 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 | unt_changes=ON;.INSERT.INTO.t9(a |
1aef00 | 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 49 4e 28 53 45 4c 45 43 54 20 61 76 67 28 31 29 48 41 | ).VALUES('abc'IN(SELECT.avg(1)HA |
1aef20 | 56 49 4e 47 27 64 65 66 27 29 29 61 0a 81 09 9d 5e 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c | VING'def'))a....^....CREATE.TABL |
1aef40 | 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 | E.t9(a.TEXT.PRIMARY.KEY,.b.INT.D |
1aef60 | 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d | EFAULT.1);.PRAGMA.count_changes= |
1aef80 | 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 | ON;.INSERT.INTO.t9(a).VALUES('ab |
1aefa0 | 63 27 49 4e 28 29 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 43 54 28 61 0a 81 29 9d 5d 04 00 | c'IN()def'),('ghi'),(CT(a..).].. |
1aefc0 | 82 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 | .WCREATE.TABLE.t9(a.TEXT.PRIMARY |
1aefe0 | 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 | .KEY,.b.INT.DEFAULT.1);.PRAGMA.c |
1af000 | 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 | ount_changes=ON;.INSERT.INTO.t9( |
1af020 | 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 49 4e 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 49 | a).VALUES('abc'IN('def'),('ghi'I |
1af040 | 4e 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 | N('abc'),('jkl'),('abc'),('ghi') |
1af060 | 0a 20 43 54 28 61 0a 81 65 9d 5c 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 | ..CT(a..e.\...OCREATE.TABLE.t9(a |
1af080 | 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 | .TEXT.PRIMARY.KEY,.b.INT.DEFAULT |
1af0a0 | 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e | .1);.PRAGMA.count_changes=ON;.IN |
1af0c0 | 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 | SERT.INTO.t9(a).VALUES('abc'),(' |
1af0e0 | 64 65 66 27 29 3b 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 | def');('ghi'),('abc'),('jkl'),(' |
1af100 | 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | abc'),('ghi').....ON.CONFLICT(a) |
1af120 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 | .DO.UPDATE.SET.b=b+1;.PRAGMA.cou |
1af140 | 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 5b 04 00 83 4f 43 52 45 41 54 45 20 54 | nt_changes=OFF;..e.[...OCREATE.T |
1af160 | 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e | ABLE.t9(a.TEXT.PRIMARY.KEY,.b.IN |
1af180 | 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | T.DEFAULT.1);.PRAGMA.count_chang |
1af1a0 | 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 | es=ON;.INSERT.INTO.t9(a).VALUES( |
1af1c0 | 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 3b 28 27 61 62 63 27 29 2c 28 | 'abc'),('def'),('ghi');('abc'),( |
1af1e0 | 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f | 'jkl'),('abc'),('ghi').....ON.CO |
1af200 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 | NFLICT(a).DO.UPDATE.SET.b=b+1;.P |
1af220 | 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 68 9d 5a 04 00 83 | RAGMA.count_changes=OFF;..h.Z... |
1af240 | 55 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 | UCREATE.TABLE.t9(a.TEXT.PRIMARY. |
1af260 | 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f | KEY,.b.INT.DEFAULT.1);.PRAGMA.co |
1af280 | 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 | unt_changes=ON;.INSERT.INTO.t9(a |
1af2a0 | 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c | ).VALUES('abc'),('def'),('ghi'), |
1af2c0 | 28 27 61 62 63 54 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 | ('abcTjkl'),('abc'),('ghi')..... |
1af2e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 | ON.CONFLICT(a).DO.UPDATE.SET.b=b |
1af300 | 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 52 45 49 | +1;.PRAGMA.count_changes=OFF;REI |
1af320 | 4e 44 45 58 0a 81 6b 9d 59 04 00 83 5b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 | NDEX..k.Y...[CREATE.TABLE.t9(a.T |
1af340 | 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 | EXT.PRIMARY.KEY,.b.INT.DEFAULT.1 |
1af360 | 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 | );.PRAGMA.count_changes=ON;.INSE |
1af380 | 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 | RT.INTO.t9(a).VALUES('abc'),('de |
1af3a0 | 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 | f'),('ghi'),('abc'),('jkl'),('ab |
1af3c0 | 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 | c'),('ghi').....ON.CONFLICT(a).D |
1af3e0 | 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | O.UPDATE.SET.b=b+1;.PRAGMA.count |
1af400 | 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 56 41 43 55 55 4d 0a 81 65 9d 58 04 00 83 4f 43 52 45 41 | _changes=OFF;VACUUM..e.X...OCREA |
1af420 | 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TE.TABLE.t9(a.TEXT.PRIMARY.KEY,. |
1af440 | 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 | b.INT.DEFAULT.1);.PRAGMA.count_c |
1af460 | 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c | hanges=ON;.INSERT.INTO.t9(a).VAL |
1af480 | 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 | UES('abc'),('def'),('ghi'),('abc |
1af4a0 | 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f | '),('jkl'),('abc'),('ghi').....O |
1af4c0 | 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b | N.CONFLICT(a).DO.UPDATE.SET.b=b+ |
1af4e0 | 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 20 31 3d 31 0a 81 65 9d | 1;.PRAGMA.count_changes=.1=1..e. |
1af500 | 57 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d | W...OCREATE.TABLE.t9(a.TEXT.PRIM |
1af520 | 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d | ARY.KEY,.b.INT.DEFAULT.1);.PRAGM |
1af540 | 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 | A.count_changes=ON;.INSERT.INTO. |
1af560 | 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 | t9(a).VALUES('abc'),('def'),('gh |
1af580 | 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 | i'),('abc'),('jkl'),('abc'),('gh |
1af5a0 | 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 | i').....ON.CONFLICT(a).DO.UPDATE |
1af5c0 | 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 | .SET.b=b+1;.PRAGMA.count_changes |
1af5e0 | 2d 4f 46 46 3b 0a 81 65 9d 56 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 | -OFF;..e.V...OCREATE.TABLE.t9(a. |
1af600 | 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 | TEXT.PRIMARY.KEY,.b.INT.DEFAULT. |
1af620 | 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 | 1);.PRAGMA.count_changes=ON;.INS |
1af640 | 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 | ERT.INTO.t9(a).VALUES('abc'),('d |
1af660 | 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 | ef'),('ghi'),('abc'),('jkl'),('a |
1af680 | 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 | bc'),('ghi').....ON.CONFLICT(a). |
1af6a0 | 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c | DO.UPDATE.SET.b=b+.sqlite_compil |
1af6c0 | 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 81 65 9d 55 04 00 83 4f 43 52 45 41 54 45 20 54 41 | eoption_used(1).e.U...OCREATE.TA |
1af6e0 | 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 | BLE.t9(a.TEXT.PRIMARY.KEY,.b.INT |
1af700 | 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 | .DEFAULT.1);.PRAGMA.count_change |
1af720 | 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 | s=ON;.INSERT.INTO.t9(a).VALUES(' |
1af740 | 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 | abc'),('def'),('ghi'),('abc'),(' |
1af760 | 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | jkl'),('abc'),('ghi').....ON.CON |
1af780 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 20 40 31 3b 0a 50 52 | FLICT(a).DO.UPDATE.SET.b=.@1;.PR |
1af7a0 | 41 47 4d 41 20 63 6f 75 6e 7c 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 68 9d 54 04 00 83 55 | AGMA.coun|_changes=OFF;..h.T...U |
1af7c0 | 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b | CREATE.TABLE.t9(a.TEXT.PRIMARY.K |
1af7e0 | 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 | EY,.b.INT.DEFAULT.1);.PRAGMA.cou |
1af800 | 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 | nt_changes=ON;.INSERT.INTO.t9(a) |
1af820 | 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 | .VALUES('abc'),('def'),('ghi'),( |
1af840 | 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 | 'abc'),('jkl'),('abc'),('ghi').. |
1af860 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
1af880 | 62 3d 20 40 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b | b=.@1;.PRAGMA.count_changes=OFF; |
1af8a0 | 45 4e 44 0a 81 65 9d 53 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 | END..e.S...OCREATE.TABLE.t9(a.TE |
1af8c0 | 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 | XT.PRIMARY.KEY,.b.INT.DEFAULT.1) |
1af8e0 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 | ;.PRAGMA.count_changes=ON;.INSER |
1af900 | 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 | T.INTO.t9(a).VALUES('abc'),('def |
1af920 | 27 29 2c 28 27 67 68 69 27 20 3e 3e 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 | '),('ghi'.>>'abc'),('jkl'),('abc |
1af940 | 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | '),('ghi').....ON.CONFLICT(a).DO |
1af960 | 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .UPDATE.SET.b=b+1;.PRAGMA.count_ |
1af980 | 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 61 9d 52 04 00 83 47 43 52 45 41 54 45 20 54 41 42 4c | changes=OFF;..a.R...GCREATE.TABL |
1af9a0 | 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 | E.t9(a.TEXT.PRIMARY.KEY,.b.INT.D |
1af9c0 | 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d | EFAULT.1);.PRAGMA.count_changes= |
1af9e0 | 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 | ON;.INSERT.INTO.t9(a).VALUES('ab |
1afa00 | 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3e 27 32 30 30 31 2d 30 31 27 29 2c | c'),('def'),('ghi'.>>'2001-01'), |
1afa20 | 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ('abc'),('ghi').....ON.CONFLICT( |
1afa40 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 | a).DO.UPDATE.SET.b=b+1;.PRAGMA.c |
1afa60 | 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 6b 9d 51 04 00 83 5b 43 52 45 41 54 45 | ount_changes=OFF;..k.Q...[CREATE |
1afa80 | 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | .TABLE.t9(a.TEXT.PRIMARY.KEY,.b. |
1afaa0 | 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 | INT.DEFAULT.1);.PRAGMA.count_cha |
1afac0 | 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 | nges=ON;.INSERT.INTO.t9(a).VALUE |
1afae0 | 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3e 27 20 2d 32 30 30 | S('abc'),('def'),('ghi'.>>'.-200 |
1afb00 | 31 2d 31 31 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 | 1-11'),('jkl'),('abc'),('ghi').. |
1afb20 | 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 | ...ON.CONFLICT(a).DO.UPDATE.SET. |
1afb40 | 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b | b=b+1;.PRAGMA.count_changes=OFF; |
1afb60 | 0a 81 65 9d 50 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 | ..e.P...OCREATE.TABLE.t9(a.TEXT. |
1afb80 | 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 | PRIMARY.KEY,.b.INT.DEFAULT.1);.P |
1afba0 | 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 | RAGMA.count_changes=ON;.INSERT.I |
1afbc0 | 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c | NTO.t9(a).VALUES('abc'),('def'), |
1afbe0 | 28 27 67 68 69 27 20 3e 3e 27 20 2d 31 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c | ('ghi'.>>'.-1'),('jkl'),('abc'), |
1afc00 | 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 | ('ghi').....ON.CONFLICT(a).DO.UP |
1afc20 | 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 | DATE.SET.b=b+1;.PRAGMA.count_cha |
1afc40 | 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 4f 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 | nges=OFF;..e.O...OCREATE.TABLE.t |
1afc60 | 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 | 9(a.TEXT.PRIMARY.KEY,.b.INT.DEFA |
1afc80 | 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b | ULT.1);.PRAGMA.count_changes=ON; |
1afca0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 | .INSERT.INTO.t9(a).VALUES('abc') |
1afcc0 | 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 41 | ,('def'),('ghi'.>='abc'),('jkl'A |
1afce0 | 4e 44 20 74 72 75 65 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 | ND.true),('ghi').....ON.CONFLICT |
1afd00 | 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 | (a).DO.UPDATE.SET.b=b+1;.PRAGMA. |
1afd20 | 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 4e 04 00 83 4f 43 52 45 41 54 | count_changes=OFF;..e.N...OCREAT |
1afd40 | 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | E.TABLE.t9(a.TEXT.PRIMARY.KEY,.b |
1afd60 | 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 | .INT.DEFAULT.1);.PRAGMA.count_ch |
1afd80 | 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 | anges=ON;.INSERT.INTO.t9(a).VALU |
1afda0 | 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 20 3e 3d 27 61 62 63 27 | ES('abc'),('def'),('ghi'.>='abc' |
1afdc0 | 29 2c 28 27 6a 6b 6c 27 20 3e 3d 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e | ),('jkl'.>='abc'),('ghi').....ON |
1afde0 | 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 | .CONFLICT(a).DO.UPDATE.SET.b=b+1 |
1afe00 | 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 77 9d 4d | ;.PRAGMA.count_changes=OFF;..w.M |
1afe20 | 04 00 83 73 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 | ...sCREATE.TABLE.t9(a.TEXT.PRIMA |
1afe40 | 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 | RY.KEY,.b.INT.DEFAULT.1);.PRAGMA |
1afe60 | 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | .count_changes=ON;.INSERT.INTO.t |
1afe80 | 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 | 9(a).VALUES('abc'),('def'),('ghi |
1afea0 | 27 20 3e 20 73 74 72 66 74 69 6d 65 28 31 2c 31 2c 31 2c 31 29 3d 27 61 62 63 27 29 2c 28 27 6a | '.>.strftime(1,1,1,1)='abc'),('j |
1afec0 | 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 | kl'),('abc'),('ghi').....ON.CONF |
1afee0 | 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 | LICT(a).DO.UPDATE.SET.b=b+1;.PRA |
1aff00 | 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 4c 04 00 83 4f 43 | GMA.count_changes=OFF;..e.L...OC |
1aff20 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 | REATE.TABLE.t9(a.TEXT.PRIMARY.KE |
1aff40 | 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e | Y,.b.INT.DEFAULT.1);.PRAGMA.coun |
1aff60 | 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 | t_changes=ON;.INSERT.INTO.t9(a). |
1aff80 | 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 20 6a 73 6f 6e 5f 76 61 6c 69 64 28 3f 29 3e 3d 27 | VALUES('abc'),(.json_valid(?)>=' |
1affa0 | 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 | abc'),('jkl'),('abc'),('ghi')... |
1affc0 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 | ..ON.CONFLICT(a).DO.UPDATE.SET.b |
1affe0 | 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a | =b+1;.PRAGMA.count_changes=OFF;. |
1b0000 | 0d 00 00 00 2e 00 fa 00 1f 28 1e 94 1d fb 1d 16 1c 35 1b 4c 1a 7b 19 92 18 97 17 82 16 99 15 ad | .........(.......5.L.{.......... |
1b0020 | 15 1e 14 35 13 48 12 5f 11 84 10 86 10 11 0f 84 0e bc 0e 2f 0d a2 0c b9 0b d0 0b 43 0a b6 09 ae | ...5.H._.........../.......C.... |
1b0040 | 09 21 08 94 08 45 07 b7 07 29 06 78 06 27 05 da 05 8d 05 3f 04 f1 04 a3 04 56 03 37 02 a7 02 18 | .!...E...).x.'.....?.....V.7.... |
1b0060 | 01 89 00 fa 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b0080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b00a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b00c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b00e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 81 0b 9e 1d 04 00 | ................................ |
1b0100 | 82 1b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 20 41 54 54 41 43 48 28 78 29 20 41 | ..EXPLAIN.QUERY.PLAN.ATTACH(x).A |
1b0120 | 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 62 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | S.(values(1))...b.WITHOUT.ROWID; |
1b0140 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
1b0160 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ,(3,4),(1,2)ON.CONFLICT(a,b).DO. |
1b0180 | 4e 4f 54 48 49 4e 47 3b 0a 81 0b 9e 1c 04 00 82 1b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 | NOTHING;.........EXPLAIN.QUERY.P |
1b01a0 | 4c 41 4e 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 | LAN..CREATE.TABLE.t1(a.INTEGER.P |
1b01c0 | 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b | RIMARY.KEY,.b.INT,.c.DEFAULT.0); |
1b01e0 | 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 | ...CREATE.UNIQUE.INDEX.t1x1.ON.t |
1b0200 | 31 28 61 2b 62 29 3b 0a 20 45 43 54 20 2a 20 46 52 4f 4d 20 74 31 3b 0a 81 0b 9e 1b 04 00 82 1b | 1(a+b);..ECT.*.FROM.t1;......... |
1b0220 | 45 58 50 4c 41 49 4e 20 45 4e 44 20 43 52 45 41 54 45 20 52 4f 4c 4c 42 41 43 4b 28 54 45 47 45 | EXPLAIN.END.CREATE.ROLLBACK(TEGE |
1b0240 | 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 | R.PRIMARY.KEY,.b.INT,.c.DEFAULT. |
1b0260 | 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f | 0);...CREATE.UNIQUE.INDEX.t1x1.O |
1b0280 | 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 4f 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 | N.t1(a+b);...INOTHING;...SELECT. |
1b02a0 | 2a 20 46 52 4f 4d 20 81 0c 9e 1a 04 00 82 1d 45 58 50 4c 41 49 4e 20 20 43 52 45 41 54 45 20 54 | *.FROM.........EXPLAIN..CREATE.T |
1b02c0 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
1b02e0 | 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 41 4e 41 4c 59 5a 45 20 55 4e 49 | .INT,.c.DEFAULT.0);..ANALYZE.UNI |
1b0300 | 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 4f | QUE.INDEX.t1x1.ON.t1(a+b);...INO |
1b0320 | 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 82 1b 9e 19 04 00 84 3b 45 | THING;...SELECT.*.FROM........;E |
1b0340 | 58 50 4c 41 49 4e 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 61 20 49 4e 54 20 50 52 | XPLAIN..CREATE.TABLE.t1(a.INT.PR |
1b0360 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 20 57 | IMARY.KEY,.b.int,.c.DEFAULT.0).W |
1b0380 | 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 | ITHOUT.ROWID;...INSERT.INTO.t1(a |
1b03a0 | 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 3b 0a 20 20 49 4e 53 45 52 54 20 | ,b).VALUES(1,2),(3,4);...INSERT. |
1b03c0 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 38 29 2c 28 32 2c 31 31 29 2c | INTO.t1(a,b).VALUES(1,8),(2,11), |
1b03e0 | 28 33 2c 31 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | (3,1).....ON.CONFLICT(a).DO.UPDA |
1b0400 | 54 45 20 53 45 54 20 62 3d 65 78 63 6c 75 64 65 64 2e 62 2c 20 63 3d 63 2b 31 20 57 48 45 52 45 | TE.SET.b=excluded.b,.c=c+1.WHERE |
1b0420 | 20 74 31 2e 62 3c 65 78 63 6c 75 64 65 64 2e 62 3b 0a 20 20 53 45 4c 45 43 54 20 2a 2c 20 27 78 | .t1.b<excluded.b;...SELECT.*,.'x |
1b0440 | 27 20 46 52 4f 4d 20 74 31 20 4f 52 44 45 52 20 42 59 20 61 3b 0a 4a 9e 18 04 00 81 19 44 45 54 | '.FROM.t1.ORDER.BY.a;.J......DET |
1b0460 | 41 43 48 23 61 45 54 00 00 7e 51 34 1a 34 ff 80 14 31 29 74 31 28 0a 20 80 ff 7f 4f d3 64 49 50 | ACH#aET..~Q4.4...1)t1(.....O.dIP |
1b0480 | 4f 49 ff 7f d0 f1 49 4e 54 41 00 02 6f a4 28 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e | OI....INTA..o.(1INTEO.NI.co.(1IN |
1b04a0 | 54 3b 0a 4b 9e 17 04 00 81 1b 44 45 54 41 43 48 20 4d 41 54 43 48 61 45 54 00 1a 34 ff 80 14 31 | T;.K......DETACH.MATCHaET..4...1 |
1b04c0 | 29 74 31 28 0a 20 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 41 00 02 6f a4 28 31 49 4e | )t1(.....O.dIPOI....INTA..o.(1IN |
1b04e0 | 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 4b 9e 16 04 00 81 1b 44 45 54 41 43 48 20 4d | TEO.NI.co.(1INT;.K......DETACH.M |
1b0500 | 41 49 4e 54 4f 45 54 00 1a 34 ff 80 14 31 29 74 31 28 0a 20 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f | AINTOET..4...1)t1(.....O.dIPOI.. |
1b0520 | d0 f1 49 4e 54 41 00 02 6f a4 28 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 4b | ..INTA..o.(1INTEO.NI.co.(1INT;.K |
1b0540 | 9e 15 04 00 81 1b 44 45 54 41 43 48 20 4d 41 49 43 48 61 45 54 00 1a 34 ff 80 14 31 29 74 31 28 | ......DETACH.MAICHaET..4...1)t1( |
1b0560 | 0a 20 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 41 00 02 6f a4 28 31 49 4e 54 45 4f 20 | .....O.dIPOI....INTA..o.(1INTEO. |
1b0580 | 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 4a 9e 14 04 00 81 19 44 45 54 41 43 48 20 31 3d 31 00 00 | NI.co.(1INT;.J......DETACH.1=1.. |
1b05a0 | 7e 51 34 1a 34 ff 80 14 31 29 74 31 28 0a 20 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 | ~Q4.4...1)t1(.....O.dIPOI....INT |
1b05c0 | 41 00 02 6f a4 28 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 4a 9e 13 04 00 81 | A..o.(1INTEO.NI.co.(1INT;.J..... |
1b05e0 | 19 44 45 54 41 43 48 20 31 3d 20 61 66 66 69 6e 69 74 79 28 31 29 29 74 31 28 0a 20 80 ff 7f 4f | .DETACH.1=.affinity(1))t1(.....O |
1b0600 | d3 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 41 00 02 6f a4 28 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 | .dIPOI....INTA..o.(1INTEO.NI.co. |
1b0620 | 28 31 49 4e 54 3b 0a 4e 9e 12 04 00 81 21 44 45 54 41 43 48 20 20 31 3d 31 31 3d 31 00 00 7e 51 | (1INT;.N.....!DETACH..1=11=1..~Q |
1b0640 | 34 1a 34 ff 80 14 31 29 74 31 28 0a 20 80 ff 7f 4f d3 64 49 50 4f 49 ff 7f d0 f1 49 4e 54 41 00 | 4.4...1)t1(.....O.dIPOI....INTA. |
1b0660 | 02 6f a4 28 31 49 4e 54 45 4f 20 4e 49 20 63 6f a4 28 31 49 4e 54 3b 0a 81 2d 9e 11 04 00 82 5f | .o.(1INTEO.NI.co.(1INT;..-....._ |
1b0680 | 43 52 45 57 49 54 48 4f 55 54 20 52 4f 57 49 44 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e | CREWITHOUT.ROWID...a.INT,...b.IN |
1b06a0 | 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 | T.UNIQUE,...c.INT.DEFAULT.0,...P |
1b06c0 | 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b | RIMARY.KEY(a,b).).WITHOUT.ROWID; |
1b06e0 | 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 | .INSERT.INTO.t1(a,b).VALUES(1,2) |
1b0700 | 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 | ,(3,4),(1,2)ON.CONFLICT(a,b).DO. |
1b0720 | 4e 4f 54 48 49 4e 47 3b 0a 81 0a 9e 10 04 00 82 19 43 52 45 41 54 45 20 54 45 4d 50 4f 52 41 52 | NOTHING;.........CREATE.TEMPORAR |
1b0740 | 59 0a 54 41 42 4c 45 20 41 55 54 4f 49 4e 43 52 45 4d 45 4e 54 4b 45 59 28 61 2c 62 29 0a 29 20 | Y.TABLE.AUTOINCREMENTKEY(a,b).). |
1b0760 | 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c | WITHOUT.ROWID;.INSERT.INTO.t1(a, |
1b0780 | 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e | b).VALUES(1,2),(3,4),(1,2)ON.CON |
1b07a0 | 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 0a 9e 0f 04 00 82 19 43 | FLICT(a,b).DO.NOTHING;.........C |
1b07c0 | 52 45 41 54 45 20 54 45 4d 50 4f 52 41 52 59 0a 54 41 42 4c 45 20 20 20 62 20 49 4e 52 49 4d 41 | REATE.TEMPORARY.TABLE...b.INRIMA |
1b07e0 | 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 | RY.KEY(a,b).).WITHOUT.ROWID;.INS |
1b0800 | 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c | ERT.INTO.t1(a,b).VALUES(1,2),(3, |
1b0820 | 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 | 4),(1,2)ON.CONFLICT(a,b).DO.NOTH |
1b0840 | 49 4e 47 3b 0a 4c 9e 0e 04 00 81 1d 43 52 45 41 54 45 20 54 41 42 4c 45 20 ff 80 28 61 20 55 4e | ING;.L......CREATE.TABLE...(a.UN |
1b0860 | 49 51 55 45 2c 20 62 20 55 4e 49 51 55 45 29 3b 41 4e 41 4c 59 5a 45 3b 41 4e 41 4c 59 5a 45 20 | IQUE,.b.UNIQUE);ANALYZE;ANALYZE. |
1b0880 | 49 4e 54 4f 20 44 40 20 4e 4f 20 49 4f 54 48 49 4e 47 3b 0a 81 09 9e 0d 04 00 82 17 43 52 45 41 | INTO.D@.NO.IOTHING;.........CREA |
1b08a0 | 54 45 20 54 41 42 4c 45 20 ff 80 28 61 20 49 4e 54 2c 20 62 20 49 4e 54 29 3b 41 4e 41 4c 59 5a | TE.TABLE...(a.INT,.b.INT);ANALYZ |
1b08c0 | 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 20 4f 4e 20 74 34 28 61 29 20 57 48 45 | E.UNIQUE.INDEX.t4a1.ON.t4(a).WHE |
1b08e0 | 52 45 20 62 3c 31 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 61 2c 62 29 20 56 41 4c 55 45 53 28 35 | RE.b<1000;.CNTO.t4(a,b).VALUES(5 |
1b0900 | 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 0,60).ON.CONFLICT(a).DO.NOTHING; |
1b0920 | 0a 81 09 9e 0c 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 f4 b4 28 61 20 49 4e 54 2c df | .........CREATE.TABLE...(a.INT,. |
1b0940 | 9d df b6 4e 54 29 3b 41 4e 41 4c 59 5a 45 20 55 4e 49 51 55 45 20 49 4e 44 45 58 20 74 34 61 31 | ...NT);ANALYZE.UNIQUE.INDEX.t4a1 |
1b0960 | 20 4f 4e 20 74 34 28 61 29 20 57 48 45 52 45 20 62 3c 31 30 30 30 3b 0a 43 4e 54 4f 20 74 34 28 | .ON.t4(a).WHERE.b<1000;.CNTO.t4( |
1b0980 | 61 2c 62 29 20 56 41 4c 55 45 53 28 35 30 2c 36 30 29 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | a,b).VALUES(50,60).ON.CONFLICT(a |
1b09a0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 82 04 9e 0b 04 00 84 0d 43 52 45 41 54 45 20 54 41 42 | ).DO.NOTHING;.........CREATE.TAB |
1b09c0 | 4c 45 20 74 39 28 61 66 27 29 2c 28 27 dc 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c | LE.t9(af'),('.hi'),('abc'),('jkl |
1b09e0 | 27 29 2c 28 27 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 | '),('a.TEXT.PRIMARY.KEY,.b.INT.D |
1b0a00 | 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d | EFAULT.1);.PRAGMA.count_changes= |
1b0a20 | 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 | ON;.INSERT.INTO.t9(a).VALUES('ab |
1b0a40 | 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 dc 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b | c'),('def'),('.hi'),('abc'),('jk |
1b0a60 | 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | l'),('abc'),('ghi').....ON.CONFL |
1b0a80 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 | ICT(a).DO.UPDATE.SET.b=b+1;.PRAG |
1b0aa0 | 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 09 9e 0a 04 00 82 17 43 52 | MA.count_changes=OFF;.........CR |
1b0ac0 | 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 2c 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | EATE.TABLE.t9(a,TEXT.PRIMARY.KEY |
1b0ae0 | 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | ,.b.INT.DEFAULT.1);.PRAGMA.count |
1b0b00 | 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 | _changes=ON;.INSERT.INTO.t9(a).V |
1b0b20 | 41 4c 55 45 53 28 27 61 62 63 27 29 3b 28 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 | ALUES('abc');(A.count_changes=OF |
1b0b40 | 46 3b 0a 81 09 9e 09 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 2c 54 45 58 | F;.........CREATE.TABLE.t9(a,TEX |
1b0b60 | 54 20 50 52 2c 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b | T.PR,MARY.KEY,.b.INT.DEFAULT.1); |
1b0b80 | 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 | .PRAGMA.count_changes=ON;.INSERT |
1b0ba0 | 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 3b 28 41 20 63 6f 75 | .INTO.t9(a).VALUES('abc');(A.cou |
1b0bc0 | 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9e 08 04 00 83 4f 43 52 45 41 54 45 20 54 | nt_changes=OFF;..e.....OCREATE.T |
1b0be0 | 41 42 4c 45 20 74 39 28 61 20 d4 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e | ABLE.t9(a..EXT.PRIMARY.KEY,.b.IN |
1b0c00 | 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | T.DEFAULT.1);.PRAGMA.count_chang |
1b0c20 | 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 | es=ON;.INSERT.INTO.t9(a).VALUES( |
1b0c40 | 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 | 'abc'),('def'),('ghi'),('abc'),( |
1b0c60 | 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f | 'jkl'),('abc'),('ghi').....ON.CO |
1b0c80 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 | NFLICT(a).DO.UPDATE.SET.b=b+1;.P |
1b0ca0 | 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9e 07 04 00 83 | RAGMA.count_changes=OFF;..e..... |
1b0cc0 | 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 80 58 54 20 50 52 49 65 66 27 29 2c | OCREATE.TABLE.t9(a.T.XT.PRIef'), |
1b0ce0 | 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f | ('ghi'),('abc'),(T.1);.PRAGMA.co |
1b0d00 | 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 | unt_changes=ON;.INSERT.INTO.t9(a |
1b0d20 | 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c | ).VALUES('abc'),('def'),('ghi'), |
1b0d40 | 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 25 67 68 69 27 29 0a | ('abc'),('jkl'),('abc'),(%ghi'). |
1b0d60 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
1b0d80 | 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 72 67 65 73 3d 4f 46 46 | .b=b+1;.PRAGMA.count_charges=OFF |
1b0da0 | 3b 0a 81 09 9e 06 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 55 | ;.........CREATE.TABLE.t9(a.TEXU |
1b0dc0 | a0 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a | .PRIMARY.KEY,.b.INT.DEFAULT.1);. |
1b0de0 | 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 45 58 50 4c 41 49 4e 20 | PRAGMA.count_changes=ON;EXPLAIN. |
1b0e00 | 51 55 45 52 59 20 50 4c 41 4e 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 3b 28 41 20 63 6f 75 6e | QUERY.PLAN.VALUES('abc');(A.coun |
1b0e20 | 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 09 9e 05 04 00 82 17 43 52 45 41 54 45 20 54 41 | t_changes=OFF;.........CREATE.TA |
1b0e40 | 42 4c 45 20 74 39 28 61 20 54 45 58 55 a0 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 | BLE.t9(a.TEXU.PRIMARY.KEY,.b.INT |
1b0e60 | 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 | .DEFAULT.1);.PRAGMA.count_change |
1b0e80 | 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 | s=ON;.INSERT.INTO.t9(a).VALUES(' |
1b0ea0 | 61 62 63 27 29 3b 28 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 44 9e 04 | abc');(A.count_changes=OFF;..D.. |
1b0ec0 | 04 00 83 0d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 39 50 52 49 4d 41 | ....CREATE.TABLE.t9(a.TEXT9PRIMA |
1b0ee0 | 63 27 29 2c 28 27 6a 6b 6c 27 54 45 58 54 29 2c 28 27 61 62 63 27 29 49 4e 27 67 68 69 27 50 52 | c'),('jkl'TEXT),('abc')IN'ghi'PR |
1b0f00 | 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e | AGMA.count_changes=ON;.INSERT.IN |
1b0f20 | 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 09 4e 28 28 27 67 68 69 27 29 2c | TO.t9(a).VALUES('abc'.N(('ghi'), |
1b0f40 | 28 27 61 62 63 27 29 49 4e 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 49 4e 27 4d 41 63 27 29 2c | ('abc')IN'jkl'),('abc')IN'MAc'), |
1b0f60 | 28 27 6a 6b 6c 27 29 2c 28 27 e1 62 63 27 29 49 4e 27 67 68 69 27 50 52 67 68 69 27 29 0a 20 43 | ('jkl'),('.bc')IN'ghi'PRghi')..C |
1b0f80 | 54 28 61 0a 81 09 9e 03 04 00 82 17 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 | T(a.........CREATE.TABLE.t9(a.TE |
1b0fa0 | 58 54 20 72 6d 62 6c 6f 62 28 31 29 62 20 49 4e 54 20 44 45 46 41 55 4c 27 64 65 66 27 29 2c 28 | XT.rmblob(1)b.INT.DEFAUL'def'),( |
1b0fc0 | 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 | 'ghi'),('abc'),('jkl'),('abc'),( |
1b0fe0 | 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | 'ghi').....ON.CONFLICT(a).DO.UPD |
1b1000 | 41 54 45 20 53 45 54 20 61 3d 62 2b 31 3b 0a 50 0a 72 9e 02 04 00 81 69 43 52 45 41 54 45 20 54 | ATE.SET.a=b+1;.P.r.....iCREATE.T |
1b1020 | 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 4b 52 59 20 2d 2d 54 20 31 2d 3b 0a 50 | ABLE.t9(a.TEXT.PRIMKRY.--T.1-;.P |
1b1040 | 52 41 47 4d 41 20 63 6f 54 20 50 52 49 4d 41 52 59 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | RAGMA.coT.PRIMARY.-------------- |
1b1060 | 2d 2d 20 49 4e 54 4f 3b 2d 2d 2d 2d 2d 4c 54 20 31 22 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c | --.INTO;-----LT.1"def'),('ghi'), |
1b1080 | 28 43 56 28 61 0a 81 7a 9e 01 04 00 83 79 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 | (CV(a..z.....yCREATE.TABLE.t9(a. |
1b10a0 | 54 45 58 54 20 50 52 49 4d 41 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 77 52 | TEXT.PRIMAwwwwwwwwwwwwwwwwwwwwwR |
1b10c0 | 59 20 4b 45 67 65 73 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 | Y.KEgesY,.b.INT.DEFAULT.1);.PRAG |
1b10e0 | 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 20 20 20 20 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 | MA.count_changes....=ON;.INSERT. |
1b1100 | 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 | INTO.t9(a).VALUES('abc'),('def') |
1b1120 | 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 00 00 00 10 62 63 27 29 | ,('ghi'),('abc'),('jkl')....bc') |
1b1140 | 2c 28 27 67 68 69 27 29 0a 3c 20 20 20 4f 4e 20 43 4f 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ,('ghi').<...ON.COa).DO.UPDATE.S |
1b1160 | 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4f 41 20 63 6f 6f 6e 74 5f 63 68 61 6e 67 65 73 3d 4f | ET.b=b+1;.PRAGOA.coont_changes=O |
1b1180 | 46 46 3b 0a 81 57 9e 00 04 00 83 33 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 | FF;..W.....3CREATE.TABLE.t9(a.TE |
1b11a0 | 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 62 63 27 29 2c 28 27 | XT.PRIMARY.KEY,.b.INT.DEFbc'),(' |
1b11c0 | 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 73 3d 4f 4e 3b 0a 49 4e 53 45 52 | jkl'),('abc'),('ghi')s=ON;.INSER |
1b11e0 | 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 | T.INTO.t9(a).VALUES('abc'),('def |
1b1200 | 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 | '),('ghi'),('abc'),('jkl'),('abc |
1b1220 | 27 29 2c 28 b5 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f | '),(.ghi').....ON.CONFLICT(a).DO |
1b1240 | 20 55 50 44 41 50 52 6c 75 64 65 64 63 6f 75 6e 74 5f 63 68 61 6e 01 65 73 3d 4f 46 46 3b 0a 81 | .UPDAPRludedcount_chan.es=OFF;.. |
1b1260 | 65 9d 7f 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 | e.....OCREATE.TABLE.t9(a.TEXT.PR |
1b1280 | 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 2e 31 29 3b 0a 50 52 41 | IMARY.KEY,.b.INT.DEFAULT.1);.PRA |
1b12a0 | 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 | GMA.count_changes=ON;.INSERT.INT |
1b12c0 | 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 e1 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 | O.t9(a).VALUES('.bc'),('def'),(' |
1b12e0 | 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 | ghi'),('abc'),('jkl'),('abc'),(' |
1b1300 | 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 | ghi').....ON.CONFLICT(a).DO.UPDA |
1b1320 | 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | TE.SET.b=b+1;.PRAGMA.count_chang |
1b1340 | 65 73 3d 4f 46 46 3b 0a 81 69 9d 7e 04 00 83 57 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 | es=OFF;..i.~...WCREATE.TABLE.t9( |
1b1360 | 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c | a.TEXT.PRIMARY.KEY,.b.INT.DEFAUL |
1b1380 | 54 2e 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 | T.1);.PRAGMA.count_changes=ON;.I |
1b13a0 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 e1 62 63 27 29 2c 28 | NSERT.INTO.t9(a).VALUES('.bc'),( |
1b13c0 | 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 | 'def'),('ghi'),('abc'),('jkl'),( |
1b13e0 | 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 | 'abc'),('ghi').....ON.CONFLICT(a |
1b1400 | 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 20 7c 7c 20 2b 31 3b 0a 50 52 41 47 4d | ).DO.UPDATE.SET.b=b.||.+1;.PRAGM |
1b1420 | 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 7d 04 00 83 4f 43 52 45 | A.count_changes=OFF;..e.}...OCRE |
1b1440 | 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | ATE.TABLE.t9(a.TEXT.PRIMARY.KEY, |
1b1460 | 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 2e 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .b.INT.DEFAULT.1);.PRAGMA.count_ |
1b1480 | 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 | changes=ON;.INSERT.INTO.t9(a).VA |
1b14a0 | 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 | LUES('abc'),('def'),('ghi'),('ab |
1b14c0 | 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 | c'),('jkl'),('abc'),('ghi')..... |
1b14e0 | 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 | ON.CONFLICT(a).DO.UPDATE.SET.b=b |
1b1500 | 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 0b | +1;.PRAGMA.count_changes=OFF;... |
1b1520 | 9d 7c 04 00 82 1b 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 | .|....CREATE.TABLE.t9(a.TEXT.PRI |
1b1540 | 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 54 29 3b 0a 50 52 41 47 | MARY.KEY,.b.INT.DEFAULT.T);.PRAG |
1b1560 | 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f | MA.count_changes=ON;.INSERT.INTO |
1b1580 | 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 49 4e 28 53 45 4c 45 43 54 20 31 3d 31 | .t9(a).VALUES('abc'IN(SELECT.1=1 |
1b15a0 | 27 64 65 66 27 29 29 28 27 67 28 61 0a 81 68 9d 7b 04 00 83 55 43 52 45 41 54 45 20 54 41 42 4c | 'def'))('g(a..h.{...UCREATE.TABL |
1b15c0 | 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 | E.t9(a.TEXT.PRIMARY.KEY,.b.INT.D |
1b15e0 | 45 46 41 55 4c 54 20 45 4e 44 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | EFAULT.END1);.PRAGMA.count_chang |
1b1600 | 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 | es=ON;.INSERT.INTO.t9(a).VALUES( |
1b1620 | 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 | 'abc'),('def'),('ghi'),('abc'),( |
1b1640 | 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f | 'jkl'),('abc'),('ghi').....ON.CO |
1b1660 | 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 | NFLICT(a).DO.UPDATE.SET.b=b+1;.P |
1b1680 | 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 7a 04 00 83 | RAGMA.count_changes=OFF;..e.z... |
1b16a0 | 4f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 | OCREATE.TABLE.t9(a.TEXT.PRIMARY. |
1b16c0 | 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 45 29 3b 0a 50 52 41 47 4d 41 20 63 6f | KEY,.b.INT.DEFAULT.E);.PRAGMA.co |
1b16e0 | 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 | unt_changes=ON;.INSERT.INTO.t9(a |
1b1700 | 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c | ).VALUES('abc'),('def'),('ghi'), |
1b1720 | 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a | ('abc'),('jkl'),('abc'),('ghi'). |
1b1740 | 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 | ....ON.CONFLICT(a).DO.UPDATE.SET |
1b1760 | 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 | .b=b+1;.PRAGMA.count_changes=OFF |
1b1780 | 3b 0a 82 11 9d 79 04 00 84 27 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 | ;....y...'CREATE.TABLE.t9(a.TEXT |
1b17a0 | 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 57 49 | .PRIMARY.KEY,.b.INT.DEFAULT.1)WI |
1b17c0 | 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 | THOUT.ROWID;.PRAGMA.count_change |
1b17e0 | 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 | s=ON;.INSERT.INTO.t9(a).VALUES(' |
1b1800 | 61 62 63 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 67 65 74 28 31 29 69 | abc.sqlite_compileoption_get(1)i |
1b1820 | 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e 5f 75 73 65 64 28 31 29 6a 6b 6c 27 29 2c 28 27 | te_compileoption_used(1)jkl'),(' |
1b1840 | 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 | abc'),('ghi').....ON.CONFLICT(a) |
1b1860 | 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 6f 75 | .DO.UPDATE.SET.b=b+1;.PRAGMA.cou |
1b1880 | 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 52 45 49 4e 44 45 58 0a 81 77 9d 78 04 00 83 73 43 | nt_changes=OFF;REINDEX..w.x...sC |
1b18a0 | 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 | REATE.TABLE.t9(a.TEXT.PRIMARY.KE |
1b18c0 | 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 | Y,.b.INT.DEFAULT.1);EXPLAIN.QUER |
1b18e0 | 59 20 50 4c 41 4e 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a | Y.PLAN.PRAGMA.count_changes=ON;. |
1b1900 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c | INSERT.INTO.t9(a).VALUES('abc'), |
1b1920 | 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c | ('def'),('ghi'),('abc'),('jkl'), |
1b1940 | 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 | ('abc'),('ghi').....ON.CONFLICT( |
1b1960 | 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d 41 20 63 | a).DO.UPDATE.SET.b=b+1;.PRAGMA.c |
1b1980 | 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 65 9d 77 04 00 83 4f 43 52 45 41 54 45 | ount_changes=OFF;..e.w...OCREATE |
1b19a0 | 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 | .TABLE.t9(a.TEXT.PRIMARY.KEY,.b. |
1b19c0 | 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 e3 6f 75 6e 74 5f 63 68 61 | INT.DEFAULT.1);.PRAGMA..ount_cha |
1b19e0 | 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 | nges=ON;.INSERT.INTO.t9(a).VALUE |
1b1a00 | 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 | S('abc'),('def'),('ghi'),('abc') |
1b1a20 | 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 | ,('jkl'),('abc'),('ghi').....ON. |
1b1a40 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b | CONFLICT(a).DO.UPDATE.SET.b=b+1; |
1b1a60 | 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 4d 9d 76 04 | .PRAGMA.count_changes=OFF;..M.v. |
1b1a80 | 00 83 1f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 | ...CREATE.TABLE.t9(a.TEXT.PRIMAR |
1b1aa0 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 | Y.KEY,.b.INT.DEFAULT.1);.PRAGMA. |
1b1ac0 | 73 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 | sount_changes=ON;.INSERT.INTO.t9 |
1b1ae0 | 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 | (a).VALUES('abc'),('def'),('ghi' |
1b1b00 | 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 | ),('abc'),('jkl'),('abc'),('ghi' |
1b1b20 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.UPDATE.S |
1b1b40 | 45 54 20 61 3d 62 2b 31 3b 0a 50 0a 81 65 9d 75 04 00 83 4f 43 52 45 41 54 45 20 54 41 42 4c 45 | ET.a=b+1;.P..e.u...OCREATE.TABLE |
1b1b60 | 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 | .t9(a.TEXT.PRIMARY.KEY,.b.INT.DE |
1b1b80 | 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d cf | FAULT.1);.PRAGMA.count_changes=. |
1b1ba0 | 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 e1 62 63 | N;.INSERT.INTO.t9(a).VALUES('.bc |
1b1bc0 | 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 6a 6b 6c | '),('def'),('ghi'),('abc'),('jkl |
1b1be0 | 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 | '),('abc'),('ghi').....ON.CONFLI |
1b1c00 | 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 4d | CT(a).DO.UPDATE.SET.b=b+1;.PRAGM |
1b1c20 | 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 46 55 4c 4c 0a 81 5d 9d 74 04 00 83 3f 43 52 45 | A.count_changes=FULL..].t...?CRE |
1b1c40 | 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c | ATE.TABLE.t9(a.TEXT.PRIMARY.KEY, |
1b1c60 | 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f | .b.INT.DEFAULT.1);.PRAGMA.count_ |
1b1c80 | 63 68 61 6e 67 65 73 3d 51 4e 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 | changes=QN;.INSERT.INTO.t9(a).VA |
1b1ca0 | 4c 55 45 53 28 27 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 | LUES('abc'),('def'),('ghi'),('ab |
1b1cc0 | 63 54 6a 6b 6c 27 29 2c 28 27 61 62 63 54 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c | cTjkl'),('abcTghi').....ON.CONFL |
1b1ce0 | 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b 0a 50 52 41 47 | ICT(a).DO.UPDATE.SET.b=b+1;.PRAG |
1b1d00 | 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4c 46 3b 0a 81 61 9d 73 04 00 83 47 43 52 | MA.count_changes=OLF;..a.s...GCR |
1b1d20 | 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 | EATE.TABLE.t9(a.TEXT.PRIMARY.KEY |
1b1d40 | 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 | ,.b.INT.DEFAULT.1);.PRAGMA.count |
1b1d60 | 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 20 56 | _changes=ON;EXPLAIN.QUERY.PLAN.V |
1b1d80 | 41 4c 55 45 53 28 27 61 62 63 54 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 | ALUES('abcTdef'),('ghi'),('abc') |
1b1da0 | 2c 28 27 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 | ,('jkl'),('abc'),('ghi').....ON. |
1b1dc0 | 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 62 3d 62 2b 31 3b | CONFLICT(a).DO.UPDATE.SET.b=b+1; |
1b1de0 | 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 46 46 3b 0a 81 15 9d 72 04 | .PRAGMA.count_changes=OFF;....r. |
1b1e00 | 00 82 2f 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 | ../CREATE.TABLE.t9(a.TEXT.PRIMAR |
1b1e20 | 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 | Y.KEY,.b.INT.DEFAULT.1);.PRAGMA. |
1b1e40 | 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 | count_changes=ON;EXPLAIN.QUERY.P |
1b1e60 | 4c 41 4e 20 56 41 4c 55 45 53 28 20 73 71 6c 69 74 65 5f 63 6f 6d 70 69 6c 65 6f 70 74 69 6f 6e | LAN.VALUES(.sqlite_compileoption |
1b1e80 | 5f 75 73 65 64 28 31 29 29 2c 28 27 6a 6b 6c 27 29 3b 28 0a 81 10 9d 71 04 00 82 25 43 52 45 41 | _used(1)),('jkl');(....q...%CREA |
1b1ea0 | 54 45 20 54 41 42 4c 45 20 74 39 28 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 | TE.TABLE.t9(a.TEXT.PRIMARY.KEY,. |
1b1ec0 | 62 20 49 4e 54 20 44 45 46 41 55 4c 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 | b.INT.DEFAULT.1);.PRAGMA.count_c |
1b1ee0 | 68 61 6e 67 65 73 3d 4f 4e 3b 45 58 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 | hanges=ON;EXPLAIN.INSERT.INTO.t9 |
1b1f00 | 28 61 29 20 56 41 4c 55 45 53 28 27 61 62 63 27 29 3b 28 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 | (a).VALUES('abc');(A.count_chang |
1b1f20 | 65 73 3d 4f 46 46 3b 0a 81 54 9d 70 04 00 83 2d 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 39 28 | es=OFF;..T.p...-CREATE.TABLE.t9( |
1b1f40 | 61 20 54 45 58 54 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 20 44 45 46 41 55 4c | a.TEXT.PRIMARY.KEY,.b.INT.DEFAUL |
1b1f60 | 54 20 31 29 3b 0a 50 52 41 47 4d 41 20 63 6f 75 6e 74 5f 63 68 61 6e 67 65 73 3d 4f 4e 3b 45 58 | T.1);.PRAGMA.count_changes=ON;EX |
1b1f80 | 50 4c 41 49 4e 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 39 28 61 29 20 56 41 4c 55 45 53 28 27 | PLAIN.INSERT.INTO.t9(a).VALUES(' |
1b1fa0 | 61 62 63 27 29 2c 28 27 64 65 66 27 29 2c 28 27 67 68 69 27 29 2c 28 27 61 62 63 27 29 2c 28 27 | abc'),('def'),('ghi'),('abc'),(' |
1b1fc0 | 6a 6b 6c 27 29 2c 28 27 61 62 63 27 29 2c 28 27 67 68 69 27 29 0a 20 20 20 20 4f 4e 20 43 4f 4e | jkl'),('abc'),('ghi').....ON.CON |
1b1fe0 | 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 61 3d 62 2b 31 3b 0a 50 0a | FLICT(a).DO.UPDATE.SET.a=b+1;.P. |
1b2000 | 0d 00 00 00 1b 0c 24 00 1f 65 1e d7 1e 40 1d ac 1a 1d 1a 08 19 7b 18 ee 18 61 17 d4 17 47 16 ba | ......$..e...@.......{...a...G.. |
1b2020 | 16 0d 15 fe 15 b2 15 1e 14 5f 13 cf 13 3f 12 af 12 1f 11 8f 11 64 11 39 10 88 0c 2b 0c 24 00 00 | ........._...?.......d.9...+.$.. |
1b2040 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2060 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2080 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b20a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b20c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b20e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2100 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2120 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2140 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2160 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2180 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b21a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b21c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b21e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2200 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2220 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2240 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2260 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2280 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b22a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b22c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b22e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2300 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2320 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2340 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2360 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2380 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b23a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b23c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b23e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2400 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2420 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2440 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2460 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2480 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b24a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b24c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b24e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2500 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2520 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2540 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2560 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2580 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b25a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b25c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b25e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2600 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2620 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2640 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2660 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2680 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b26a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b26c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b26e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2700 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2720 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2740 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2760 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2780 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b27a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b27c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b27e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2800 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2820 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2840 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2860 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2880 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b28a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b28c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b28e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2900 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2920 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2940 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2960 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2980 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b29a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b29c0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b29e0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2a00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2a20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2a40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2a60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2a80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2aa0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2ac0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2ae0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2b00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2b20 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2b40 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2b60 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2b80 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2ba0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2bc0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2be0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2c00 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................ |
1b2c20 | 00 00 00 00 04 9e 38 03 00 0f f6 88 59 9e 37 04 00 91 37 60 20 43 52 45 41 54 45 20 54 41 42 4c | ......8.....Y.7...7`.CREATE.TABL |
1b2c40 | 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 69 6e | E.t1(a.INTEGER.PRIMARY.KEY,.b.in |
1b2c60 | 74 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 54 41 42 4c 45 20 | t,.c.DEFAULT.0);...CREATE.TABLE. |
1b2c80 | 72 65 63 6f 72 64 28 78 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 | record(x.TEXT,.y.TEXT);...CREATE |
1b2ca0 | 20 54 52 49 47 47 45 52 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 | .TRIGGER.r1.BEFORE.INSERT.ON.t1. |
1b2cc0 | 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 | BEGIN.....INSERT.INTO.record(x,y |
1b2ce0 | 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 2d 69 6e 73 65 72 74 27 | ).........VALUES('before-insert' |
1b2d00 | 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e | ,printf('%d,%d,%d',new.a,new.b,n |
1b2d20 | 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 | ew.c));...END;...CREATE.TRIGGER. |
1b2d40 | 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 | r2.AFTER.INSERT.ON.t1.BEGIN..... |
1b2d60 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 20 20 20 20 20 56 41 4c 55 | INSERT.INTO.record(x,y).....VALU |
1b2d80 | 45 53 28 27 61 66 74 65 72 2d 69 6e 73 65 72 74 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c | ES('after-insert',printf('%d,%d, |
1b2da0 | 25 64 27 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a | %d',new.a,new.b,new.c));...END;. |
1b2dc0 | 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 20 72 33 20 42 45 46 4f 52 45 20 55 50 44 41 54 | ..CREATE.TRIGGER.r3.BEFORE.UPDAT |
1b2de0 | 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 | E.ON.t1.BEGIN.....INSERT.INTO.re |
1b2e00 | 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 | cord(x,y).........VALUES('before |
1b2e20 | 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c | -update',printf('%d,%d,%d/%d,%d, |
1b2e40 | 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | %d',............................ |
1b2e60 | 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 | ...old.a,old.b,old.c,new.a,new.b |
1b2e80 | 2c 6e 65 77 2e 63 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 | ,new.c));...END;...CREATE.TRIGGE |
1b2ea0 | 52 20 72 34 20 41 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | R.r4.AFTER.UPDATE.ON.t1.BEGIN... |
1b2ec0 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | ..INSERT.INTO.record(x,y)....... |
1b2ee0 | 20 20 56 41 4c 55 45 53 28 27 61 66 74 65 72 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 27 | ..VALUES('after-update',printf(' |
1b2f00 | 25 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 | %d,%d,%d/%d,%d,%d',............. |
1b2f20 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c | ..........................old.a, |
1b2f40 | 6f 6c 64 2e 62 2c 6f 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b | old.b,old.c,new.a,new.b,new.c)); |
1b2f60 | 0a 20 20 45 4e 44 3b 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 | ...END;...INSERT.INTO.t1(a,b).VA |
1b2f80 | 4c 55 45 53 28 31 2c 32 29 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b | LUES(1,2);...DELETE.FROM.record; |
1b2fa0 | 0a 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c | ...INSERT.INTO.t1(a,b).VALUES(1, |
1b2fc0 | 32 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 | 2).....ON.CONFLICT(a).DO.UPDATE. |
1b2fe0 | 53 45 54 20 63 3d 74 31 2e 63 2b 31 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 72 65 | SET.c=t1.c+1;...SELECT.*.FROM.re |
1b3000 | 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 45 20 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a 20 20 49 4e | cord;...DELETE.FROM.record;...IN |
1b3020 | 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 0a 20 20 | SERT.INTO.t1(a,b).VALUES(1,2)... |
1b3040 | 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 41 54 45 20 53 45 54 20 63 | ..ON.CONFLICT(a).DO.UPDATE.SET.c |
1b3060 | 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 | =c+1.WHERE.c<0;...SELECT.*.FROM. |
1b3080 | 72 65 63 6f 72 64 3b 0a 81 2d 9e 36 04 00 82 5f 5b 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 | record;..-.6..._[REATE.TABLE.t1( |
1b30a0 | 0a 20 20 61 20 49 4e 54 2c 0a 20 20 62 20 49 4e 54 20 55 4e 49 51 55 45 2c 0a 20 20 63 20 49 4e | ...a.INT,...b.INT.UNIQUE,...c.IN |
1b30c0 | 54 20 44 45 46 41 55 4c 54 20 30 2c 0a 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a | T.DEFAULT.0,...PRIMARY.KEY(a,b). |
1b30e0 | 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 | ).WITHOUT.ROWID;.INSERT.INTO.t1( |
1b3100 | 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 | a,b).VALUES(1,2),(3,4),(1,2)ON.C |
1b3120 | 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 28 9e 35 03 00 57 58 | ONFLICT(a,b).DO.NOTHING;.(.5..WX |
1b3140 | 27 37 2d 4c 41 00 80 92 92 92 92 43 27 27 2d ff ff ff 7f 53 28 00 80 31 28 ff 7a 4c 41 00 80 92 | '7-LA......C''-....S(..1(.zLA... |
1b3160 | 92 92 92 79 28 9e 34 03 00 57 58 27 27 2d 4c 41 00 80 92 92 92 92 43 27 27 2d ff ff ff 7f 53 28 | ...y(.4..WX''-LA......C''-....S( |
1b3180 | 00 80 31 28 ff 7a 4c 41 00 80 92 92 92 92 79 81 0c 9e 33 04 00 82 1d 56 41 4c 55 45 53 28 31 45 | ..1(.zLA......y...3....VALUES(1E |
1b31a0 | 36 29 42 59 04 04 04 04 1a 49 4e 54 43 52 45 20 54 45 29 54 41 42 4c 45 10 00 31 28 1a 51 67 45 | 6)BY.....INTCRE.TE)TABLE..1(.QgE |
1b31c0 | 2c f3 01 00 00 20 49 4e 45 4d 50 46 50 4f 52 59 4e 7f 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 04 | ,.....INEMPFPORYN.VALUES(1,2),(. |
1b31e0 | 04 04 04 1a 33 2c 2b 29 2c 28 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 44 dd dd dd dd dd dd dd dd dd | ....3,+),(2)ON.CONFLICD......... |
1b3200 | dd dd 20 50 52 49 45 48 4f 55 59 20 52 4f 57 96 44 36 0a 54 28 72 72 00 01 80 00 72 72 00 7f 81 | ...PRIEHOUY.ROW.D6.T(rr....rr... |
1b3220 | 0c 9e 32 04 00 82 1d 56 41 4c 55 45 53 28 31 45 32 29 3b 59 04 04 04 04 1a 49 4e 54 43 52 45 20 | ..2....VALUES(1E2);Y.....INTCRE. |
1b3240 | 54 45 29 54 41 42 4c 45 10 00 31 28 1a 51 67 45 2c f3 01 00 00 20 49 4e 45 4d 50 46 50 4f 52 59 | TE)TABLE..1(.QgE,.....INEMPFPORY |
1b3260 | 4e 7f 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 04 04 04 04 1a 33 2c 2b 29 2c 28 32 29 4f 4e 20 43 | N.VALUES(1,2),(.....3,+),(2)ON.C |
1b3280 | 4f 4e 46 4c 49 43 44 dd dd dd dd dd dd dd dd dd dd dd 20 50 52 49 45 48 4f 55 59 20 52 4f 57 96 | ONFLICD............PRIEHOUY.ROW. |
1b32a0 | 44 36 0a 54 28 72 72 00 01 80 00 72 72 00 7f 81 0c 9e 31 04 00 82 1d 56 41 4c 55 45 53 28 31 45 | D6.T(rr....rr.....1....VALUES(1E |
1b32c0 | 2d 29 42 59 04 04 04 04 1a 49 4e 54 43 52 45 20 54 45 29 54 41 42 4c 45 10 00 31 28 1a 51 67 45 | -)BY.....INTCRE.TE)TABLE..1(.QgE |
1b32e0 | 2c f3 01 00 00 20 49 4e 45 4d 50 46 50 4f 52 59 4e 7f 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 04 | ,.....INEMPFPORYN.VALUES(1,2),(. |
1b3300 | 04 04 04 1a 33 2c 2b 29 2c 28 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 44 dd dd dd dd dd dd dd dd dd | ....3,+),(2)ON.CONFLICD......... |
1b3320 | dd dd 20 50 52 49 45 48 4f 55 59 20 52 4f 57 96 44 36 0a 54 28 72 72 00 01 80 00 72 72 00 7f 81 | ...PRIEHOUY.ROW.D6.T(rr....rr... |
1b3340 | 0c 9e 30 04 00 82 1d 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 04 04 04 04 1a 49 4e 54 43 52 45 20 | ..0....VALUES(1,2),(.....INTCRE. |
1b3360 | 54 45 29 54 41 42 4c 45 10 00 31 28 1a 51 67 45 2c f3 01 00 00 20 49 4e 45 4d 50 46 50 4f 52 59 | TE)TABLE..1(.QgE,.....INEMPFPORY |
1b3380 | 4e 7f 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 04 04 04 04 1a 33 2c 2b 29 2c 28 32 29 4f 4e 20 43 | N.VALUES(1,2),(.....3,+),(2)ON.C |
1b33a0 | 4f 4e 46 4c 49 43 44 dd dd dd dd dd dd dd dd dd dd dd 20 50 52 49 45 48 4f 55 59 20 52 4f 57 96 | ONFLICD............PRIEHOUY.ROW. |
1b33c0 | 44 36 0a 54 28 72 72 00 01 80 00 72 72 00 7f 81 0c 9e 2f 04 00 82 1d 56 41 4c 55 45 53 28 31 2c | D6.T(rr....rr...../....VALUES(1, |
1b33e0 | 32 29 2c 20 28 31 29 28 04 04 04 04 1a 49 4e 54 43 52 45 20 54 45 29 54 41 42 4c 45 10 00 31 28 | 2),.(1)(.....INTCRE.TE)TABLE..1( |
1b3400 | 1a 51 67 45 2c f3 01 00 00 20 49 4e 45 4d 50 46 50 4f 52 59 4e 7f 56 41 4c 55 45 53 28 31 2c 32 | .QgE,.....INEMPFPORYN.VALUES(1,2 |
1b3420 | 29 2c 28 04 04 04 04 1a 33 2c 2b 29 2c 28 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 44 dd dd dd dd dd | ),(.....3,+),(2)ON.CONFLICD..... |
1b3440 | dd dd dd dd dd dd 20 50 52 49 45 48 4f 55 59 20 52 4f 57 96 44 36 0a 54 28 72 72 00 01 80 00 81 | .......PRIEHOUY.ROW.D6.T(rr..... |
1b3460 | 3b 9e 2e 04 00 82 7b 56 41 4c 55 45 53 28 31 2c 20 27 61 27 27 62 27 29 2c 28 31 2c 32 29 4f 4e | ;.....{VALUES(1,.'a''b'),(1,2)ON |
1b3480 | 20 43 4f 4e 40 4c 43 52 45 41 54 45 20 54 41 42 4c 45 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 0a | .CON@LCREATE.TABLE.t1(...a.INT,. |
1b34a0 | 20 20 62 20 49 4e 54 20 55 4e 49 51 45 45 2c 0a 20 20 63 20 49 4e 54 91 91 91 91 91 91 91 49 4d | ..b.INT.UNIQEE,...c.INT.......IM |
1b34c0 | 41 52 59 20 74 31 28 0a 20 20 61 20 49 4e 54 2c 20 4b 45 59 28 0a 5a 4e 53 45 52 54 20 49 4e 54 | ARY.t1(...a.INT,.KEY(.ZNSERT.INT |
1b34e0 | 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 20 27 61 27 27 62 27 29 2c 28 31 2c 32 | O.t1(a,b).VALUES(1,.'a''b'),(1,2 |
1b3500 | 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 10 | )ON.CONFLICT(a,b).DO.NOTHING;... |
1b3520 | 9e 2d 04 00 82 25 56 41 43 55 55 4d 3b 41 4e 41 4c 59 5a 45 20 54 45 45 20 74 31 28 54 20 69 67 | .-...%VACUUM;ANALYZE.TEE.t1(T.ig |
1b3540 | 6e 6f 72 65 2c 0a 20 20 20 20 50 52 49 4d 41 52 59 20 4b 45 59 28 62 29 2c 0a 20 20 20 20 55 4e | nore,.....PRIMARY.KEY(b),.....UN |
1b3560 | 49 51 55 45 28 63 29 20 4f 4e 20 43 00 10 00 00 49 43 54 20 66 61 69 6c 0a 29 20 57 49 54 48 4f | IQUE(c).ON.C....ICT.fail.).WITHO |
1b3580 | 55 54 20 52 4f 57 49 44 3b 0a 43 52 45 41 54 45 20 49 4e 44 45 58 20 74 31 64 20 4f 4e 20 74 31 | UT.ROWID;.CREATE.INDEX.t1d.ON.t1 |
1b35a0 | 28 64 29 3b 41 4e 41 4c 59 5a 45 20 54 45 4d 50 3b 0a 49 9e 2c 04 00 81 17 56 41 43 55 55 4d 00 | (d);ANALYZE.TEMP;.I.,....VACUUM. |
1b35c0 | 53 45 20 6e 53 4c 45 20 6e 61 78 10 54 28 54 61 ff d5 04 49 53 4c 73 65 64 28 31 10 ff ff 05 2e | SE.nSLE.nax.T(Ta...ISLsed(1..... |
1b35e0 | 3f 30 53 41 56 45 50 23 6f 00 1d 6f 6e 6f 75 6e 74 73 61 63 74 28 05 31 2c 2b 29 2e 22 2c 0c 9e | ?0SAVEP#o..onountsact(.1,+).",.. |
1b3600 | 2b 03 00 1f 54 45 4d 4e 4f 52 41 52 59 81 29 9e 2a 04 00 82 57 53 45 4c 45 43 54 20 67 65 73 54 | +...TEMNORARY.).*...WSELECT.gesT |
1b3620 | 41 42 3e 45 fa 00 00 cf 61 4d 62 28 62 2c 64 29 29 61 2c 62 ff ff ff ff 61 54 45 58 54 60 96 32 | AB>E....aMb(b,d))a,b....aTEXT`.2 |
1b3640 | 7f ff 51 41 54 5b 10 00 6f 43 52 45 41 54 45 20 54 41 42 45 fa 00 64 29 1b 53 6f 43 52 45 41 54 | ..QAT[..oCREATE.TABE..d).SoCREAT |
1b3660 | 45 20 54 41 42 45 fa 00 64 29 1b 53 cf 72 20 00 01 00 00 4c 49 43 54 5b 4f 4c 51 41 54 5d 39 6e | E.TABE..d).S.r.....LICT[OLQAT]9n |
1b3680 | 6f 43 41 53 54 43 52 45 41 54 45 31 00 01 00 00 2c 65 32 43 4f 4c 51 41 54 5b 10 00 6f 43 52 45 | oCASTCREATE1....,e2COLQAT[..oCRE |
1b36a0 | 41 54 45 20 54 41 42 45 fa 00 64 29 1b 53 cf 72 20 00 01 00 00 4c 49 03 54 0a 81 09 9e 29 04 00 | ATE.TABE..d).S.r.....LI.T....).. |
1b36c0 | 82 17 53 45 4c 45 43 54 20 54 45 4d 50 4f 52 41 52 59 0a 4f 52 44 45 52 20 42 59 20 49 4e 52 49 | ..SELECT.TEMPORARY.ORDER.BY.INRI |
1b36e0 | 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 | MARY.KEY(a,b).).WITHOUT.ROWID;.I |
1b3700 | 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 | NSERT.INTO.t1(a,b).VALUES(1,2),( |
1b3720 | 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f | 3,4),(1,2)ON.CONFLICT(a,b).DO.NO |
1b3740 | 54 48 49 4e 47 3b 0a 81 09 9e 28 04 00 82 17 53 45 4c 45 43 54 20 54 45 4d 50 4f 52 41 52 59 0a | THING;....(....SELECT.TEMPORARY. |
1b3760 | 20 20 61 2c 0a 20 20 62 20 49 4e 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 | ..a,...b.INRIMARY.KEY(a,b).).WIT |
1b3780 | 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 | HOUT.ROWID;.INSERT.INTO.t1(a,b). |
1b37a0 | 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 | VALUES(1,2),(3,4),(1,2)ON.CONFLI |
1b37c0 | 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9e 27 04 00 82 17 53 45 4c 45 | CT(a,b).DO.NOTHING;....'....SELE |
1b37e0 | 43 54 20 54 45 4d 50 4f 52 41 52 59 0a 20 20 61 2c 0a 20 20 62 20 49 2c 52 49 4d 41 52 59 20 4b | CT.TEMPORARY...a,...b.I,RIMARY.K |
1b3800 | 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 | EY(a,b).).WITHOUT.ROWID;.INSERT. |
1b3820 | 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 | INTO.t1(a,b).VALUES(1,2),(3,4),( |
1b3840 | 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b | 1,2)ON.CONFLICT(a,b).DO.NOTHING; |
1b3860 | 0a 81 09 9e 26 04 00 82 17 52 45 4c 45 41 53 45 20 51 55 45 52 59 00 50 4c 41 4e 20 61 2c 0a 20 | ....&....RELEASE.QUERY.PLAN.a,.. |
1b3880 | 20 62 20 49 4e 52 49 4d 41 52 59 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 | .b.INRIMARY.KEY(a,b).).WITHOUT.R |
1b38a0 | 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 | OWID;.INSERT.INTO.t1(a,b).VALUES |
1b38c0 | 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 | (1,2),(3,4),(1,2)ON.CONFLICT(a,b |
1b38e0 | 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9e 25 04 00 82 17 50 52 41 47 4d 41 20 54 45 4d | ).DO.NOTHING;....%....PRAGMA.TEM |
1b3900 | 50 4f 52 41 52 59 0a 43 55 52 52 45 4e 54 5f 54 49 4d 45 53 54 41 4d 50 20 4b 45 59 28 61 2c 62 | PORARY.CURRENT_TIMESTAMP.KEY(a,b |
1b3920 | 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 | ).).WITHOUT.ROWID;.INSERT.INTO.t |
1b3940 | 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e | 1(a,b).VALUES(1,2),(3,4),(1,2)ON |
1b3960 | 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a 81 09 9e 24 04 | .CONFLICT(a,b).DO.NOTHING;....$. |
1b3980 | 00 82 17 50 52 41 47 4d 41 20 54 45 4d 50 2e 52 41 52 59 0a 43 55 52 52 45 4e 54 5f 54 49 4d 45 | ...PRAGMA.TEMP.RARY.CURRENT_TIME |
1b39a0 | 53 54 41 4d 50 20 4b 45 59 28 61 2c 62 29 0a 29 20 57 49 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a | STAMP.KEY(a,b).).WITHOUT.ROWID;. |
1b39c0 | 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c | INSERT.INTO.t1(a,b).VALUES(1,2), |
1b39e0 | 28 33 2c 34 29 2c 28 31 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e | (3,4),(1,2)ON.CONFLICT(a,b).DO.N |
1b3a00 | 4f 54 48 49 4e 47 3b 0a 12 9e 23 03 00 2b 49 3b 49 4e 54 4e 54 45 52 54 1f ff 9d 45 52 87 0b 9e | OTHING;...#..+I;INTNTERT...ER... |
1b3a20 | 22 04 00 8e 1b 47 45 52 20 54 20 30 29 3b 0a 20 20 43 52 45 41 4c 45 20 72 65 63 6f 72 64 28 78 | "....GER.T.0);...CREALE.record(x |
1b3a40 | 20 54 45 58 54 2c 20 79 20 54 45 58 54 29 3b 0a 20 20 43 52 45 41 54 45 20 54 52 49 47 47 45 52 | .TEXT,.y.TEXT);...CREATE.TRIGGER |
1b3a60 | 20 72 31 20 42 45 46 4f 52 45 20 49 4e 53 45 52 54 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 20 | .r1.BEFORE.INSERT.ON.t1.BEGIN... |
1b3a80 | 58 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 20 20 20 20 20 | X.INSERT.INTO.record(x,y)....... |
1b3aa0 | 20 20 56 41 4c 55 45 53 28 27 62 65 66 6f 72 65 52 20 72 31 20 42 45 46 4f 52 45 6e c0 c0 c0 c0 | ..VALUES('beforeR.r1.BEFOREn.... |
1b3ac0 | c0 c0 c0 c0 c0 c0 c0 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 20 20 20 20 20 20 20 20 | .......ew.a,new.b,new.c)........ |
1b3ae0 | 20 20 20 20 20 20 6c 69 6b 65 28 31 2c 31 29 29 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 45 41 4d | ......like(1,1));...END;...CREAM |
1b3b00 | 45 20 54 52 49 47 4e 45 52 20 72 32 20 41 46 54 45 52 20 49 4e 53 45 52 54 20 4f 20 60 61 60 20 | E.TRIGNER.r2.AFTER.INSERT.O.`a`. |
1b3b20 | 64 00 47 49 4e 3f 20 20 20 20 49 4e 53 45 52 54 20 00 00 02 00 20 72 65 63 6f 72 64 28 78 2c 79 | d.GIN?....INSERT......record(x,y |
1b3b40 | 29 20 20 20 20 20 56 41 4c 55 45 53 28 27 61 66 77 2e 61 2c 6e 65 77 2e 62 2c 20 42 45 46 4f 56 | ).....VALUES('afw.a,new.b,.BEFOV |
1b3b60 | 45 20 55 50 44 41 54 45 53 28 27 20 74 31 20 42 45 47 49 4e 0a 20 20 20 20 49 4e 4a 4f 49 4e 20 | E.UPDATES('.t1.BEGIN.....INJOIN. |
1b3b80 | 49 4e 54 4f 45 53 28 27 62 65 66 6f 72 65 2d 75 70 64 61 74 65 27 2c 70 72 69 6e 74 66 28 1d 25 | INTOES('before-update',printf(.% |
1b3ba0 | 64 2c 25 64 2c 25 64 2f 25 64 2c 25 64 2c 25 64 27 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | d,%d,%d/%d,%d,%d',.............. |
1b3bc0 | 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f 6c 64 | .................old.a,old.b,old |
1b3be0 | 2e 63 30 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c f1 65 77 2e 3b 0a 20 20 45 4e 44 3b 0a 20 20 43 52 | .c0new.a,new.b,.ew.;...END;...CR |
1b3c00 | 45 41 46 45 20 54 74 46 54 45 52 20 55 50 44 41 54 45 20 4f 4e 20 74 31 20 42 45 47 49 4e 0a 20 | EAFE.TtFTER.UPDATE.ON.t1.BEGIN.. |
1b3c20 | 20 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 72 65 63 6f 72 64 28 78 2c 79 29 0a 20 45 41 54 45 | ...INSERT.INTO.record(x,y)..EATE |
1b3c40 | 20 54 52 49 47 25 64 2c 25 64 27 09 0a 20 20 20 20 20 20 20 20 20 20 20 20 3e 20 20 20 20 20 20 | .TRIG%d,%d'..............>...... |
1b3c60 | 20 06 20 43 20 20 20 20 20 20 20 20 27 20 20 20 20 20 20 6f 6c 64 2e 61 2c 6f 6c 64 2e 62 2c 6f | ...C........'......old.a,old.b,o |
1b3c80 | 6c 64 2e 63 2c 6e 65 77 2e 61 2c 6e 65 77 2e 62 2c 6e 65 77 2e 63 29 29 3b 0a 20 33 45 4e 44 3b | ld.c,new.a,new.b,new.c));..3END; |
1b3ca0 | 0a 20 20 49 28 56 41 52 54 20 49 4e 54 4f 20 74 31 28 61 2c 62 32 20 56 41 4f 4e 46 c3 72 65 63 | ...I(VART.INTO.t1(a,b2.VAONF.rec |
1b3cc0 | 6f 72 64 3b 0a 20 20 49 4e 53 45 52 54 20 49 49 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 | ord;...INSERT.IITO.t1(a,b).VALUE |
1b3ce0 | 53 28 31 2c 32 29 0a 20 20 20 20 4f 4e 20 01 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 50 44 | S(1,2).....ON..ONFLICT(a).DO.UPD |
1b3d00 | 41 54 45 64 53 45 54 20 63 3d 74 03 e8 63 2b 31 3b 0a e7 20 3d 45 4c 45 43 54 20 2a 20 46 52 4f | ATEdSET.c=t..c+1;...=ELECT.*.FRO |
1b3d20 | 4d 20 72 65 63 6f 72 64 3b 0a 20 20 44 45 4c 45 54 00 40 46 52 4f 4d 20 72 65 63 6f 72 64 3b 0a | M.record;...DELET.@FROM.record;. |
1b3d40 | 20 20 49 4e 53 45 52 54 20 49 4e 54 4f 20 74 1b 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 | ..INSERT.INTO.t.(a,b).VALUES(1,2 |
1b3d60 | 29 0a 20 20 20 20 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 29 20 44 4f 20 55 52 44 41 54 45 20 53 | ).....ON.CONFLICT(a).DO.URDATE.S |
1b3d80 | 45 54 20 63 3d 63 2b 31 20 57 48 45 52 45 20 63 3c 30 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 | ET.c=c+1.WHERE.c<0;...SELECT.*.F |
1b3da0 | 52 4f 4d 20 72 67 63 6f 72 64 3b 0a 81 10 9e 21 04 00 82 25 45 58 50 4c 41 49 4e 20 57 49 54 48 | ROM.rgcord;....!...%EXPLAIN.WITH |
1b3dc0 | 20 63 28 78 29 20 41 53 20 28 76 61 6c 75 65 73 28 31 29 29 20 20 20 53 45 4c 45 43 54 20 73 71 | .c(x).AS.(values(1))...SELECT.sq |
1b3de0 | 6c 69 74 65 5f 73 6f 75 72 63 65 5f 69 64 28 29 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | lite_source_id().ROWID;.INSERT.I |
1b3e00 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
1b3e20 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |
1b3e40 | 81 13 9e 20 04 00 82 2b 45 58 50 4c 41 49 4e 20 52 45 49 4e 44 45 58 20 43 52 45 41 54 45 20 54 | .......+EXPLAIN.REINDEX.CREATE.T |
1b3e60 | 41 42 4c 45 20 74 31 28 61 20 49 4e 54 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 | ABLE.t1(a.INTEGER.PRIMARY.KEY,.b |
1b3e80 | 20 49 4e 54 2c 20 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 | .INT,.c.DEFAULT.0);...CREATE.UNI |
1b3ea0 | 51 55 45 20 49 4e 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 20 49 4e 4f | QUE.INDEX.t1x1.ON.t1(a+b);...INO |
1b3ec0 | 54 48 49 4e 47 3b 0a 20 20 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 81 0a 9e 1f 04 00 82 19 45 | THING;...SELECT.*.FROM.........E |
1b3ee0 | 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 20 52 45 49 4e 44 45 58 20 43 52 45 41 54 45 | XPLAIN.QUERY.PLAN.REINDEX.CREATE |
1b3f00 | 20 54 41 42 4c 45 20 45 47 45 52 20 50 52 49 4d 41 52 59 20 4b 45 59 2c 20 62 20 49 4e 54 2c 20 | .TABLE.EGER.PRIMARY.KEY,.b.INT,. |
1b3f20 | 63 20 44 45 46 41 55 4c 54 20 30 29 3b 0a 20 20 43 52 45 41 54 45 20 55 4e 49 51 55 45 20 49 4e | c.DEFAULT.0);...CREATE.UNIQUE.IN |
1b3f40 | 44 45 58 20 74 31 78 31 20 4f 4e 20 74 31 28 61 2b 62 29 3b 0a 20 45 43 54 20 2a 20 46 52 4f 4d | DEX.t1x1.ON.t1(a+b);..ECT.*.FROM |
1b3f60 | 20 74 31 3b 0a 81 17 9e 1e 04 00 82 33 45 58 50 4c 41 49 4e 20 51 55 45 52 59 20 50 4c 41 4e 20 | .t1;........3EXPLAIN.QUERY.PLAN. |
1b3f80 | 44 45 54 41 43 48 20 61 66 66 69 6e 69 74 79 28 31 29 43 4f 4c 4c 41 54 45 20 6e 6f 63 61 73 65 | DETACH.affinity(1)COLLATE.nocase |
1b3fa0 | 20 49 4e 20 28 31 29 52 59 20 4b 54 48 4f 55 54 20 52 4f 57 49 44 3b 0a 49 4e 53 45 52 54 20 49 | .IN.(1)RY.KTHOUT.ROWID;.INSERT.I |
1b3fc0 | 4e 54 4f 20 74 31 28 61 2c 62 29 20 56 41 4c 55 45 53 28 31 2c 32 29 2c 28 33 2c 34 29 2c 28 31 | NTO.t1(a,b).VALUES(1,2),(3,4),(1 |
1b3fe0 | 2c 32 29 4f 4e 20 43 4f 4e 46 4c 49 43 54 28 61 2c 62 29 20 44 4f 20 4e 4f 54 48 49 4e 47 3b 0a | ,2)ON.CONFLICT(a,b).DO.NOTHING;. |