Documentation Source Text

Check-in [cb8f091c8f]
Login

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

Overview
Comment:Move C-API requirements text out of sqlite.h.in and into docsrc.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:cb8f091c8ffe8b70da02cec65ba4c5c37864f331
User & Date: drh 2009-02-18 18:36:28
Context
2009-02-19
14:38
Update and reformat the requirements documents. check-in: 1112ebf74b user: drh tags: trunk
2009-02-18
18:36
Move C-API requirements text out of sqlite.h.in and into docsrc. check-in: cb8f091c8f user: drh tags: trunk
2009-02-17
18:10
Update statistics in the testing.html document. check-in: cd844328a2 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to pages/capi3ref.in.

86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
...
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
        foreach k $kx {
          set keyword($k) 1
        }
      } elseif {[regexp {^EXPERIMENTAL} $lx]} {
        set exflag 1
      } elseif {[regexp {^DEPRECATED} $lx]} {
        set obsflag 1
      } elseif {[regexp {^INVARIANTS:$} $lx]} {
        append body "\n<h3>Invariants:</h3>\n"
        starttab
        set phase 2
      } elseif {[regexp {^ASSUMPTIONS:$} $lx]} {
        append body "\n<h3>Assumptions:</h3>\n"
        starttab
        set phase 2
      } else {
        append body $lx\n
      }
    } elseif {[string range $line 0 1]=="*/"} {
      # When we reach the end of the block comment that contained the
      # CAPI3REF keyword, that ends the description.  Switch to phase 3
      # in order to begin picking up the interface definition.
      #
      set phase 3
    }
  } elseif {$phase==2} {
    # In phase 2, we are still reading the description of an interface.
    # But at this point we have seen either an INVARIANTS or ASSUMPTIONS
    # keyword and are thus reading in the specially formatted invariants
    # or assumptions.
    #
    if {[string range $line 0 1]=="**"} {
      set lx [string trim [string range $line 3 end]]
      if {[regexp {\{([\w.]+)\}\s+(.+)$} $lx all tag lxtail]} {
        endrow
        append body "<tr><td valign=\"top\">$tag</td>\
                     \n<td valign=\"top\">\n"
        set rowbody $lxtail\n
        set rowtag $tag
        set inrow 1
      } elseif {[regexp {^INVARIANTS:$} $lx]} {
        endtab
        append body "\n<h3>Invariants:</h3>\n"
        starttab
      } elseif {[regexp {^ASSUMPTIONS:$} $lx]} {
        endtab
        append body "\n<h3>Assumptions:</h3>\n"
        starttab
      } else {
        append rowbody $lx\n
      }
    } elseif {[string range $line 0 1]=="*/"} {
      # At the end of the block comment, switch to phase 3 in order to begin
      # picking up the interface definition.
      #
      endtab
      set phase 3
    }
  } elseif {$phase==3} {
    # Reading in an interface definition.  Stop reading at the first blank
    # line.
    #
    # Ignore API tags.
    regsub {^SQLITE_DEPRECATED } $line {} line
    regsub {^SQLITE_EXPERIMENTAL } $line {} line
    regsub {^SQLITE_API } $line {} line
................................................................................
      set obsflag 0
      set key $type:$kwlist
      regsub -all { *\{[\w.]+\}} $body {} body
      set body [string map \
          {<todo> {<font color="red">(TODO: } </todo> )</font>} $body]
      set code [string map {& &amp; < &lt; > &gt;} $code]
      lappend content [list $key $title $type $kwlist $body $code]
      #if {$reqtag!=""} {
      #  set reqbody "The sqlite3.h header file shall define the\n"
      #  append reqbody "the following interfaces:\n<blockquote><pre>\n"
      #  append reqbody $code
      #  append reqbody "\n</pre></blockquote>"
      #  #hd_requirement $reqtag $reqbody$reqdf 1
      #}
      set title {}
      set keywords {}
      set type {}
      set body {}
      set code {}
      set phase 0
      set dcnt 0







<
<
<
<
<
<
<
<








|


<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







86
87
88
89
90
91
92








93
94
95
96
97
98
99
100
101
102
103

































104
105
106
107
108
109
110
...
132
133
134
135
136
137
138







139
140
141
142
143
144
145
        foreach k $kx {
          set keyword($k) 1
        }
      } elseif {[regexp {^EXPERIMENTAL} $lx]} {
        set exflag 1
      } elseif {[regexp {^DEPRECATED} $lx]} {
        set obsflag 1








      } else {
        append body $lx\n
      }
    } elseif {[string range $line 0 1]=="*/"} {
      # When we reach the end of the block comment that contained the
      # CAPI3REF keyword, that ends the description.  Switch to phase 3
      # in order to begin picking up the interface definition.
      #
      set phase 2
    }
  } elseif {$phase==2} {

































    # Reading in an interface definition.  Stop reading at the first blank
    # line.
    #
    # Ignore API tags.
    regsub {^SQLITE_DEPRECATED } $line {} line
    regsub {^SQLITE_EXPERIMENTAL } $line {} line
    regsub {^SQLITE_API } $line {} line
................................................................................
      set obsflag 0
      set key $type:$kwlist
      regsub -all { *\{[\w.]+\}} $body {} body
      set body [string map \
          {<todo> {<font color="red">(TODO: } </todo> )</font>} $body]
      set code [string map {& &amp; < &lt; > &gt;} $code]
      lappend content [list $key $title $type $kwlist $body $code]







      set title {}
      set keywords {}
      set type {}
      set body {}
      set code {}
      set phase 0
      set dcnt 0

Added pages/hlr10000.in.

























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<title>SQLite Application C-langauge Interface Requirements</title>

<h1 align="center">
Requirements for the SQLite C-language Application Interface
</h1>


<dl>
<tcl>
# Actual requirements text is stored separately.  Read and render it.
#
unset -nocomplain REQ
hd_read_requirement_file $::DOC/req/hlr10000.txt REQ
foreach id $REQ(*) {
  hd_puts "\n<dt><b>"
  hd_fragment $id $id
  hd_puts "$id</b></dt>\n"
  hd_puts "<dd><p>\n"
  hd_resolve [lindex $REQ($id) 1]\n
  set comment [lindex $REQ($id) 2]
  if {$comment!=""} {
    hd_puts "</p>\n<p>"
    hd_resolve $comment\n
  }
  hd_puts "</p></dd>\n"
}
</tcl>
</dl>

Changes to req/hlr10000.txt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76


77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
...
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
...
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
...
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
...
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
...
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
...
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
...
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
...
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
...
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
....
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
....
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
....
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
....
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
....
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
....
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
....
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
....
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
....
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
....
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
....
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
....
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
....
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
....
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
....
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
....
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
....
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
....
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
....
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
....
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
....
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
....
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
....
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
....
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
....
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
....
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
....
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
....
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
....
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
....
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
....
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
....
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
....
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
HLR H10010 S60100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_VERSION         "3.6.10"
#define SQLITE_VERSION_NUMBER  3006010
</pre></blockquote>

HLR H10011 S60100
The SQLITE_VERSION #define in the sqlite3.h header file shall
evaluate to a string literal that is the SQLite version
with which the header file is associated.

HLR H10014 S60100
The SQLITE_VERSION_NUMBER #define shall resolve to an integer
with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z
are the major version, minor version, and release number.

HLR H10020 S60100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
SQLITE_EXTERN const char sqlite3_version[];
const char *sqlite3_libversion(void);
int sqlite3_libversion_number(void);
</pre></blockquote>

HLR H10021 S60100
The [sqlite3_libversion_number()] interface shall return
an integer equal to [SQLITE_VERSION_NUMBER].

HLR H10022 S60100
The [sqlite3_version] string constant shall contain
the text of the [SQLITE_VERSION] string.

HLR H10023 S60100
The [sqlite3_libversion()] function shall return
a pointer to the [sqlite3_version] string constant.

HLR H10100 S60100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_threadsafe(void);
</pre></blockquote>

HLR H10101 S60100
The [sqlite3_threadsafe()] function shall return zero if
and only if SQLite was compiled with mutexing code omitted.

HLR H10130 S20000 S30100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_initialize(void);
int sqlite3_shutdown(void);
int sqlite3_os_init(void);
int sqlite3_os_end(void);
</pre></blockquote>

HLR H10155 S20120
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_mem_methods sqlite3_mem_methods;
struct sqlite3_mem_methods {
  void *(*xMalloc)(int);         /* Memory allocation function */
  void (*xFree)(void*);          /* Free a prior allocation */
  void *(*xRealloc)(void*,int);  /* Resize an allocation */
  int (*xSize)(void*);           /* Return the size of an allocation */
  int (*xRoundup)(int);          /* Round up request size to allocation size */
  int (*xInit)(void*);           /* Initialize the memory allocator */
  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */
  void *pAppData;                /* Argument to xInit() and xShutdown() */
};
</pre></blockquote>



HLR H10160 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
#define SQLITE_CONFIG_SERIALIZED    3  /* nil */
#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */
#define SQLITE_CONFIG_PCACHE       14  /* sqlite3_pcache_methods* */
#define SQLITE_CONFIG_GETPCACHE    15  /* sqlite3_pcache_methods* */
</pre></blockquote>

HLR H10170 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_DBCONFIG_LOOKASIDE    1001  /* void* int int */
</pre></blockquote>

HLR H10200 S10110
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#ifdef SQLITE_INT64_TYPE
typedef SQLITE_INT64_TYPE sqlite_int64;
typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
#elif defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 sqlite_int64;
typedef unsigned __int64 sqlite_uint64;
#else
typedef long long int sqlite_int64;
typedef unsigned long long int sqlite_uint64;
#endif
typedef sqlite_int64 sqlite3_int64;
typedef sqlite_uint64 sqlite3_uint64;
</pre></blockquote>

HLR H10201 S10110
The [sqlite_int64] and [sqlite3_int64] type shall specify
a 64-bit signed integer.

HLR H10202 S10110
The [sqlite_uint64] and [sqlite3_uint64] type shall specify
a 64-bit unsigned integer.

HLR H10210 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_OK           0   /* Successful result */
/* beginning-of-error-codes */
#define SQLITE_ERROR        1   /* SQL error or missing database */
#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
#define SQLITE_PERM         3   /* Access permission denied */
#define SQLITE_ABORT        4   /* Callback routine requested an abort */
#define SQLITE_BUSY         5   /* The database file is locked */
#define SQLITE_LOCKED       6   /* A table in the database is locked */
#define SQLITE_NOMEM        7   /* A malloc() failed */
#define SQLITE_READONLY     8   /* Attempt to write a readonly database */
#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/
#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */
#define SQLITE_CORRUPT     11   /* The database disk image is malformed */
#define SQLITE_NOTFOUND    12   /* NOT USED. Table or record not found */
#define SQLITE_FULL        13   /* Insertion failed because database is full */
#define SQLITE_CANTOPEN    14   /* Unable to open the database file */
#define SQLITE_PROTOCOL    15   /* NOT USED. Database lock protocol error */
#define SQLITE_EMPTY       16   /* Database is empty */
#define SQLITE_SCHEMA      17   /* The database schema changed */
#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
#define SQLITE_MISMATCH    20   /* Data type mismatch */
#define SQLITE_MISUSE      21   /* Library used incorrectly */
#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */
#define SQLITE_AUTH        23   /* Authorization denied */
#define SQLITE_FORMAT      24   /* Auxiliary database format error */
#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */
#define SQLITE_NOTADB      26   /* File opened that is not a database file */
#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
/* end-of-error-codes */
</pre></blockquote>

HLR H10220 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1&lt;&lt;8))
#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2&lt;&lt;8))
#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3&lt;&lt;8))
#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4&lt;&lt;8))
#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5&lt;&lt;8))
#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6&lt;&lt;8))
#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7&lt;&lt;8))
#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8&lt;&lt;8))
#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9&lt;&lt;8))
#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10&lt;&lt;8))
#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11&lt;&lt;8))
#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12&lt;&lt;8))
#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13&lt;&lt;8))
#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14&lt;&lt;8))
#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15&lt;&lt;8))
#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16&lt;&lt;8))
#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17&lt;&lt;8))
</pre></blockquote>

HLR H10223 S10700
The symbolic name for an extended result code shall contains
a related primary result code as a prefix.

HLR H10224 S10700
Primary result code names shall contain a single "_" character.

HLR H10225 S10700
Extended result code names shall contain two or more "_" characters.

HLR H10226 S10700
The numeric value of an extended result code shall contain the
numeric value of its corresponding primary result code in
its least significant 8 bits.

HLR H10230 H11120 H12700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_OPEN_READONLY         0x00000001
#define SQLITE_OPEN_READWRITE        0x00000002
#define SQLITE_OPEN_CREATE           0x00000004
#define SQLITE_OPEN_DELETEONCLOSE    0x00000008
#define SQLITE_OPEN_EXCLUSIVE        0x00000010
#define SQLITE_OPEN_MAIN_DB          0x00000100
#define SQLITE_OPEN_TEMP_DB          0x00000200
#define SQLITE_OPEN_TRANSIENT_DB     0x00000400
#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800
#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000
#define SQLITE_OPEN_SUBJOURNAL       0x00002000
#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000
#define SQLITE_OPEN_NOMUTEX          0x00008000
#define SQLITE_OPEN_FULLMUTEX        0x00010000
</pre></blockquote>

HLR H10240 H11120
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_IOCAP_ATOMIC          0x00000001
#define SQLITE_IOCAP_ATOMIC512       0x00000002
#define SQLITE_IOCAP_ATOMIC1K        0x00000004
#define SQLITE_IOCAP_ATOMIC2K        0x00000008
#define SQLITE_IOCAP_ATOMIC4K        0x00000010
#define SQLITE_IOCAP_ATOMIC8K        0x00000020
#define SQLITE_IOCAP_ATOMIC16K       0x00000040
#define SQLITE_IOCAP_ATOMIC32K       0x00000080
#define SQLITE_IOCAP_ATOMIC64K       0x00000100
#define SQLITE_IOCAP_SAFE_APPEND     0x00000200
#define SQLITE_IOCAP_SEQUENTIAL      0x00000400
#de</pre></blockquote>

HLR H10250 H11120 H11310
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_LOCK_NONE          0
#define SQLITE_LOCK_SHARED        1
#define SQLITE_LOCK_RESERVED      2
#define SQLITE_LOCK_PENDING       3
#define SQLITE_LOCK_EXCLUSIVE     4
</pre></blockquote>

HLR H10260 H11120
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_SYNC_NORMAL        0x00002
#define SQLITE_SYNC_FULL          0x00003
#define SQLITE_SYNC_DATAONLY      0x00010
</pre></blockquote>

HLR H10265 S10110 S10120
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_INTEGER  1
#define SQLITE_FLOAT    2
#define SQLITE_BLOB     4
#define SQLITE_NULL     5
#ifdef SQLITE_TEXT
# undef SQLITE_TEXT
#else
# define SQLITE_TEXT     3
#endif
#define SQLITE3_TEXT     3
</pre></blockquote>

HLR H10267 S50200 H16100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_UTF8           1
#define SQLITE_UTF16LE        2
#define SQLITE_UTF16BE        3
#define SQLITE_UTF16          4    /* Use native byte order */
#define SQLITE_ANY            5    /* sqlite3_create_function only */
#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */
</pre></blockquote>

HLR H10280 S30100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef void (*sqlite3_destructor_type)(void*);
#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)
</pre></blockquote>

HLR H10310 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
SQLITE_EXTERN char *sqlite3_temp_directory;
</pre></blockquote>

HLR H10330 S30900
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_enable_shared_cache(int);
</pre></blockquote>

HLR H10331 S30900
A successful invocation of [sqlite3_enable_shared_cache(B)]
will enable or disable shared cache mode for any subsequently
created [database connection] in the same process.

HLR H10336 S30900
................................................................................
HLR H10337 S30900
The [sqlite3_enable_shared_cache(B)] interface returns
[SQLITE_OK] if shared cache was enabled or disabled successfully.

HLR H10339 S30900
Shared cache is disabled by default.

HLR H10510 S70200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_complete(const char *sql);
int sqlite3_complete16(const void *sql);
</pre></blockquote>

HLR H10511 S70200
A successful evaluation of [sqlite3_complete()] or
[sqlite3_complete16()] functions shall
return a numeric 1 if and only if the input string contains
one or more non-whitespace tokens and the last non-whitespace
token in is a semicolon that is not in the middle of
a CREATE TRIGGER statement.

HLR H10512 S70200
If a memory allocation error occurs during an invocation
of [sqlite3_complete()] or [sqlite3_complete16()] then the
routine shall return [SQLITE_NOMEM].

HLR H10530 S40410
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_sleep(int);
</pre></blockquote>

HLR H10533 S40410
The [sqlite3_sleep(M)] interface invokes the xSleep
method of the default [sqlite3_vfs|VFS] in order to
suspend execution of the current thread for at least
M milliseconds.

HLR H10536 S40410
The [sqlite3_sleep(M)] interface returns the number of
milliseconds of sleep actually requested of the operating
system, which might be larger than the parameter M.

HLR H11110 S20110
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_file sqlite3_file;
struct sqlite3_file {
  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
};
</pre></blockquote>

HLR H11120 S20110
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_io_methods sqlite3_io_methods;
struct sqlite3_io_methods {
  int iVersion;
  int (*xClose)(sqlite3_file*);
  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
  int (*xSync)(sqlite3_file*, int flags);
  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
  int (*xLock)(sqlite3_file*, int);
  int (*xUnlock)(sqlite3_file*, int);
  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
  int (*xFileControl)(sqlite3_file*, int op, void *pArg);
  int (*xSectorSize)(sqlite3_file*);
  int (*xDeviceCharacteristics)(sqlite3_file*);
  /* Additional methods may be added in future releases */
};
</pre></blockquote>

HLR H11140 S20100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_vfs sqlite3_vfs;
struct sqlite3_vfs {
  int iVersion;            /* Structure version number */
  int szOsFile;            /* Size of subclassed sqlite3_file */
  int mxPathname;          /* Maximum file pathname length */
  sqlite3_vfs *pNext;      /* Next registered VFS */
  const char *zName;       /* Name of this virtual file system */
  void *pAppData;          /* Pointer to application-specific data */
  int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
  int flags, int *pOutFlags);
  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
  void (*xDlClose)(sqlite3_vfs*, void*);
  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
  int (*xSleep)(sqlite3_vfs*, int microseconds);
  int (*xCurrentTime)(sqlite3_vfs*, double*);
  int (*xGetLastError)(sqlite3_vfs*, int, char *);
  /* New fields may be appended in figure versions.  The iVersion
  ** value will increment whenever this happens. */
};
</pre></blockquote>

HLR H11190 H11140
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_ACCESS_EXISTS    0
#define SQLITE_ACCESS_READWRITE 1
#define SQLITE_ACCESS_READ      2
</pre></blockquote>

HLR H11200 S20100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
int sqlite3_vfs_unregister(sqlite3_vfs*);
</pre></blockquote>

HLR H11203 S20100
The [sqlite3_vfs_find(N)] interface returns a pointer to the
registered [sqlite3_vfs] object whose name exactly matches
the zero-terminated UTF-8 string N, or it returns NULL if
there is no match.

HLR H11206 S20100
................................................................................
object P the default [sqlite3_vfs] object if F is non-zero.

HLR H11218 S20100
The [sqlite3_vfs_unregister(P)] interface unregisters the
[sqlite3_vfs] object P so that it is no longer returned by
subsequent calls to [sqlite3_vfs_find()].

HLR H11300 S30800
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
</pre></blockquote>

HLR H11302 S70300
The [sqlite3_finalize(S)] interface destroys the
[prepared statement] S and releases all
memory and file resources held by that object.

HLR H11304 S70300
If the most recent call to [sqlite3_step(S)] for the
[prepared statement] S returned an error,
then [sqlite3_finalize(S)] returns that same error.

HLR H11310 S30800
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_FCNTL_LOCKSTATE        1
#define SQLITE_GET_LOCKPROXYFILE      2
#define SQLITE_SET_LOCKPROXYFILE      3
#define SQLITE_LAST_ERRNO             4
</pre></blockquote>

HLR H11400 S30800
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_test_control(int op, ...);
</pre></blockquote>

HLR H11410 H11400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_TESTCTRL_PRNG_SAVE                5
#define SQLITE_TESTCTRL_PRNG_RESTORE             6
#define SQLITE_TESTCTRL_PRNG_RESET               7
#define SQLITE_TESTCTRL_BITVEC_TEST              8
#define SQLITE_TESTCTRL_FAULT_INSTALL            9
#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10
</pre></blockquote>

HLR H12000 S40200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3 sqlite3;
</pre></blockquote>

HLR H12010 S30100 S40200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_close(sqlite3 *);
</pre></blockquote>

HLR H12011 S30100
A successful call to [sqlite3_close(C)] shall destroy the
[database connection] object C.

HLR H12012 S30100
A successful call to [sqlite3_close(C)] shall return SQLITE_OK.

................................................................................
be a harmless no-op returning SQLITE_OK.

HLR H12019 S30100
When [sqlite3_close(C)] is invoked on a [database connection] C
that has a pending transaction, the transaction shall be
rolled back.

HLR H12100 S10000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_exec(
sqlite3*,                                  /* An open database */
const char *sql,                           /* SQL to be evaluated */
int (*callback)(void*,int,char**,char**),  /* Callback function */
void *,                                    /* 1st argument to callback */
char **errmsg                              /* Error msg written here */
);
</pre></blockquote>

HLR H12101 S10000
A successful invocation of [sqlite3_exec(D,S,C,A,E)]
shall sequentially evaluate all of the UTF-8 encoded,
semicolon-separated SQL statements in the zero-terminated
string S within the context of the [database connection] D.

HLR H12102 S10000
................................................................................
If the S parameter to [sqlite3_exec(D,S,C,A,E)] is NULL or an
empty string or contains nothing other than whitespace, comments,
and/or semicolons, then results of [sqlite3_errcode()],
[sqlite3_extended_errcode()],
[sqlite3_errmsg()], and [sqlite3_errmsg16()]
shall reset to indicate no errors.

HLR H12200 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_extended_result_codes(sqlite3*, int onoff);
</pre></blockquote>

HLR H12201 S10700
Each new [database connection] shall have the
[extended result codes] feature disabled by default.

HLR H12202 S10700
The [sqlite3_extended_result_codes(D,F)] interface shall enable
[extended result codes] for the  [database connection] D
if the F parameter is true, or disable them if F is false.

HLR H12220 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
</pre></blockquote>

HLR H12221 S10700
The [sqlite3_last_insert_rowid()] function shall return the rowid
of the most recent successful [INSERT] performed on the same
[database connection] and within the same or higher level
trigger context, or zero if there have been no qualifying
[INSERT] statements.

HLR H12223 S10700
The [sqlite3_last_insert_rowid()] function shall return the
same value when called from the same trigger context
immediately before and after a [ROLLBACK].

HLR H12240 S10600
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_changes(sqlite3*);
</pre></blockquote>

HLR H12241 S10600
The [sqlite3_changes()] function shall return the number of
row changes caused by the most recent INSERT, UPDATE,
or DELETE statement on the same database connection and
within the same or higher trigger context, or zero if there have
not been any qualifying row changes.

HLR H12243 S10600
Statements of the form "DELETE FROM tablename" with no
WHERE clause shall cause subsequent calls to
[sqlite3_changes()] to return zero, regardless of the
number of rows originally in the table.

HLR H12260 S10600
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_total_changes(sqlite3*);
</pre></blockquote>

HLR H12261 S10600
The [sqlite3_total_changes()] returns the total number
of row changes caused by INSERT, UPDATE, and/or DELETE
statements on the same [database connection], in any
trigger context, since the database connection was created.

HLR H12263 S10600
Statements of the form "DELETE FROM tablename" with no
WHERE clause shall not change the value returned
by [sqlite3_total_changes()].

HLR H12270 S30500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void sqlite3_interrupt(sqlite3*);
</pre></blockquote>

HLR H12271 S30500
The [sqlite3_interrupt()] interface will force all running
SQL statements associated with the same database connection
to halt after processing at most one additional row of data.

HLR H12272 S30500
Any SQL statement that is interrupted by [sqlite3_interrupt()]
will return [SQLITE_INTERRUPT].

HLR H12280 S60400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
void *sqlite3_profile(sqlite3*,
void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
</pre></blockquote>

HLR H12281 S60400
The callback function registered by [sqlite3_trace()]
shall be invoked
whenever an SQL statement first begins to execute and
whenever a trigger subprogram first begins to run.

HLR H12282 S60400
................................................................................
or the equivalent.

HLR H12290 S60400
The third parameter to the profile callback is an estimate
of the number of nanoseconds of wall-clock time required to
run the SQL statement from start to finish.

HLR H12310 S40400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
</pre></blockquote>

HLR H12311 S40400
The [sqlite3_busy_handler(D,C,A)] function shall replace
busy callback in the [database connection] D with a new
a new busy handler C and application data pointer A.

HLR H12312 S40400
Newly created [database connections] shall have a busy
................................................................................

HLR H12318 S40400
SQLite shall invokes the busy handler with two arguments which
are a copy of the pointer supplied by the 3rd parameter to
[sqlite3_busy_handler()] and a count of the number of prior
invocations of the busy handler for the same locking event.

HLR H12340 S40410
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_busy_timeout(sqlite3*, int ms);
</pre></blockquote>

HLR H12341 S40410
The [sqlite3_busy_timeout()] function shall override any prior
[sqlite3_busy_timeout()] or [sqlite3_busy_handler()] setting
on the same [database connection].

HLR H12343 S40410
If the 2nd parameter to [sqlite3_busy_timeout()] is less than
................................................................................
HLR H12344 S40410
If the 2nd parameter to [sqlite3_busy_timeout()] is a positive
number N, then a busy handler shall be set that repeatedly calls
the xSleep() method in the [sqlite3_vfs | VFS interface] until
either the lock clears or until the cumulative sleep time
reported back by xSleep() exceeds N milliseconds.

HLR H12370 S10000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_get_table(
sqlite3 *db,          /* An open database */
const char *zSql,     /* SQL to be evaluated */
char ***pazResult,    /* Results of the query */
int *pnRow,           /* Number of result rows written here */
int *pnColumn,        /* Number of result columns written here */
char **pzErrmsg       /* Error msg written here */
);
void sqlite3_free_table(char **result);
</pre></blockquote>

HLR H12371 S10000
If a [sqlite3_get_table()] fails a memory allocation, then
it shall free the result table under construction, abort the
query in process, skip any subsequent queries, set the
*pazResult output pointer to NULL and return [SQLITE_NOMEM].

HLR H12373 S10000
................................................................................
HLR H12382 S10000
When an error other than SQLITE_NOMEM occurs during evaluation 
of [sqlite3_get_table()] the function shall set *pazResult to NULL,
write an error message into memory obtained from [sqlite3_malloc()], make
**pzErrmsg point to that error message, and return a
appropriate [error code].

HLR H12500 S70100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_set_authorizer(
sqlite3*,
int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
void *pUserData
);
</pre></blockquote>

HLR H12501 S70100
The [sqlite3_set_authorizer(D,...)] interface registers a
authorizer callback with database connection D.

HLR H12502 S70100
The authorizer callback is invoked as SQL statements are
being parseed and compiled.
................................................................................
HLR H12521 S70100
A NULL authorizer means that no authorization
callback is invoked.

HLR H12522 S70100
The default authorizer is NULL.

HLR H12550 H12500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
/******************************************* 3rd ************ 4th ***********/
#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
#define SQLITE_DELETE                9   /* Table Name      NULL            */
#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */
#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */
#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */
#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */
#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
#define SQLITE_INSERT               18   /* Table Name      NULL            */
#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
#define SQLITE_READ                 20   /* Table Name      Column Name     */
#define SQLITE_SELECT               21   /* NULL            NULL            */
#define SQLITE_TRANSACTION          22   /* NULL            NULL            */
#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
#define SQLITE_ATTACH               24   /* Filename        NULL            */
#define SQLITE_DETACH               25   /* Database Name   NULL            */
#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
#define SQLITE_REINDEX              27   /* Index Name      NULL            */
#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
#define SQLITE_COPY                  0   /* No longer used */
</pre></blockquote>

HLR H12551 H12500
The second parameter to an
[sqlite3_set_authorizer | authorizer callback] shall be an integer
[SQLITE_COPY | authorizer code] that specifies what action
is being authorized.

HLR H12552 H12500
................................................................................
HLR H12554 H12500
The 6th parameter to the
[sqlite3_set_authorizer | authorizer callback] shall be the name
of the inner-most trigger or view that is responsible for
the access attempt or NULL if this access attempt is directly from
top-level SQL code.

HLR H12590 H12500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_DENY   1   /* Abort the SQL statement with an error */
#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */
</pre></blockquote>

HLR H12600 S20500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_load_extension(
sqlite3 *db,          /* Load the extension into this database connection */
const char *zFile,    /* Name of the shared library containing extension */
const char *zProc,    /* Entry point.  Derived from zFile if 0 */
char **pzErrMsg       /* Put error message here if not 0 */
);
</pre></blockquote>

HLR H12620 S20500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
</pre></blockquote>

HLR H12640 S20500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_auto_extension(void (*xEntryPoint)(void));
</pre></blockquote>

HLR H12660 S20500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void sqlite3_reset_auto_extension(void);
</pre></blockquote>

HLR H12700 S40200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_open(
const char *filename,   /* Database filename (UTF-8) */
sqlite3 **ppDb          /* OUT: SQLite db handle */
);
int sqlite3_open16(
const void *filename,   /* Database filename (UTF-16) */
sqlite3 **ppDb          /* OUT: SQLite db handle */
);
int sqlite3_open_v2(
const char *filename,   /* Database filename (UTF-8) */
sqlite3 **ppDb,         /* OUT: SQLite db handle */
int flags,              /* Flags */
const char *zVfs        /* Name of VFS module to use */
);
</pre></blockquote>

HLR H12701 S40200
The [sqlite3_open()], [sqlite3_open16()], and
[sqlite3_open_v2()] interfaces create a new
[database connection] associated with
the database file given in their first parameter.

HLR H12702 S40200
................................................................................

HLR H12723 S40200
Two [database connections] will share a common cache if both were
opened with the same VFS while [shared cache mode] was enabled and
if both filenames compare equal using memcmp() after having been
processed by the [sqlite3_vfs | xFullPathname] method of the VFS.

HLR H12760 S20600
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_limit(sqlite3*, int id, int newVal);
</pre></blockquote>

HLR H12762 S20600
A successful call to [sqlite3_limit(D,C,V)] where V is
positive changes the limit on the size of construct C in the
[database connection] D to the lesser of V and the hard upper
bound on the size of C that is set at compile-time.

HLR H12766 S20600
................................................................................
leaves the state of the [database connection] D unchanged.

HLR H12769 S20600
A successful call to [sqlite3_limit(D,C,V)] returns the
value of the limit on the size of construct C in the
[database connection] D as it was prior to the call.

HLR H12790 H12760
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_LIMIT_LENGTH                    0
#define SQLITE_LIMIT_SQL_LENGTH                1
#define SQLITE_LIMIT_COLUMN                    2
#define SQLITE_LIMIT_EXPR_DEPTH                3
#define SQLITE_LIMIT_COMPOUND_SELECT           4
#define SQLITE_LIMIT_VDBE_OP                   5
#define SQLITE_LIMIT_FUNCTION_ARG              6
#define SQLITE_LIMIT_ATTACHED                  7
#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
#define SQLITE_LIMIT_VARIABLE_NUMBER           9
</pre></blockquote>

HLR H12800 S60200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_errcode(sqlite3 *db);
int sqlite3_extended_errcode(sqlite3 *db);
const char *sqlite3_errmsg(sqlite3*);
const void *sqlite3_errmsg16(sqlite3*);
</pre></blockquote>

HLR H12801 S60200
The [sqlite3_errcode(D)] interface returns the numeric
[result code] or [extended result code] for the most recently
failed interface call associated with the [database connection] D.

HLR H12802 S60200
The [sqlite3_extended_errcode(D)] interface returns the numeric
................................................................................
Interfaces that are not associated with a specific
[database connection] (examples:
[sqlite3_mprintf()] or [sqlite3_enable_shared_cache()]
do not change the values returned by
[sqlite3_errcode()], [sqlite3_extended_errcode()],
[sqlite3_errmsg()], or [sqlite3_errmsg16()].

HLR H12850 S60300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_table_column_metadata(
sqlite3 *db,                /* Connection handle */
const char *zDbName,        /* Database name or NULL */
const char *zTableName,     /* Table name */
const char *zColumnName,    /* Column name */
char const **pzDataType,    /* OUTPUT: Declared data type */
char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
int *pAutoinc               /* OUTPUT: True if column is auto-increment */
);
</pre></blockquote>

HLR H12910 S60400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
</pre></blockquote>

HLR H12911 S60400
The callback function registered by sqlite3_progress_handler()
is invoked periodically during long running calls to
[sqlite3_step()].

HLR H12912 S60400
The progress callback is invoked once for every N virtual
................................................................................
If the progress handler callback is NULL then no progress
handler is invoked.

HLR H12918 S30500 S60400
If the progress callback returns a result other than 0, then
the behavior is a if [sqlite3_interrupt()] had been called.

HLR H12930 S60200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_get_autocommit(sqlite3*);
</pre></blockquote>

HLR H12931 S60200
The [sqlite3_get_autocommit(D)] interface returns non-zero or
zero if the [database connection] D is or is not in autocommit
mode, respectively.

HLR H12932 S60200
Autocommit mode is on by default.
................................................................................
HLR H12933 S60200
Autocommit mode is disabled by a successful [BEGIN] statement.

HLR H12934 S60200
Autocommit mode is enabled by a successful [COMMIT] or [ROLLBACK]
statement.

HLR H12950 S60400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
</pre></blockquote>

HLR H12951 S60400
The [sqlite3_commit_hook(D,F,P)] interface registers the
callback function F to be invoked with argument P whenever
a transaction commits on the [database connection] D.

HLR H12952 S60400
The [sqlite3_commit_hook(D,F,P)] interface returns the P argument
................................................................................
registered by prior calls.

HLR H12964 S60400
If the F argument to [sqlite3_rollback_hook(D,F,P)] is NULL
then the rollback hook callback is canceled and no callback
is invoked when a transaction rolls back.

HLR H12970 S60400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_update_hook(
sqlite3*,
void(*)(void *,int ,char const *,char const *,sqlite3_int64),
void*
);
</pre></blockquote>

HLR H12971 S60400
The [sqlite3_update_hook(D,F,P)] interface causes the callback
function F to be invoked with first parameter P whenever
a table row is modified, inserted, or deleted on
the [database connection] D.

HLR H12973 S60400
................................................................................
depending on the operation that caused the callback to be invoked.

HLR H12983 S60400
The third and fourth arguments to the callback contain pointers
to zero-terminated UTF-8 strings which are the names of the
database and table that is being updated.

HLR H12985 S60400
The final callback parameter is the rowid of the row after
the change occurs.

HLR H13000 H13010
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_stmt sqlite3_stmt;
</pre></blockquote>

HLR H13010 S10000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_prepare(
sqlite3 *db,            /* Database handle */
const char *zSql,       /* SQL statement, UTF-8 encoded */
int nByte,              /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
const char **pzTail     /* OUT: Pointer to unused portion of zSql */
);
int sqlite3_prepare_v2(
sqlite3 *db,            /* Database handle */
const char *zSql,       /* SQL statement, UTF-8 encoded */
int nByte,              /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
const char **pzTail     /* OUT: Pointer to unused portion of zSql */
);
int sqlite3_prepare16(
sqlite3 *db,            /* Database handle */
const void *zSql,       /* SQL statement, UTF-16 encoded */
int nByte,              /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
const void **pzTail     /* OUT: Pointer to unused portion of zSql */
);
int sqlite3_prepare16_v2(
sqlite3 *db,            /* Database handle */
const void *zSql,       /* SQL statement, UTF-16 encoded */
int nByte,              /* Maximum length of zSql in bytes. */
sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
const void **pzTail     /* OUT: Pointer to unused portion of zSql */
);
</pre></blockquote>

HLR H13011 S10000
The [sqlite3_prepare(db,zSql,...)] and
[sqlite3_prepare_v2(db,zSql,...)] interfaces interpret the
text in their zSql parameter as UTF-8.

HLR H13012 S10000
The [sqlite3_prepare16(db,zSql,...)] and
................................................................................
[SQLITE_OK] or an appropriate [error code] upon failure.

HLR H13021 S10000
Before [sqlite3_prepare(db,zSql,nByte,ppStmt,pzTail)] or its
variants returns an error (any value other than [SQLITE_OK]),
they first set *ppStmt to NULL.

HLR H13100 H13000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const char *sqlite3_sql(sqlite3_stmt *pStmt);
</pre></blockquote>

HLR H13101 H13000
If the [prepared statement] passed as the argument to
[sqlite3_sql()] was compiled using either [sqlite3_prepare_v2()] or
[sqlite3_prepare16_v2()], then [sqlite3_sql()] returns
a pointer to a zero-terminated string containing a UTF-8 rendering
of the original SQL statement.

................................................................................
[sqlite3_sql()] was compiled using either [sqlite3_prepare()] or
[sqlite3_prepare16()], then [sqlite3_sql()] returns a NULL pointer.

HLR H13103 H13000
The string returned by [sqlite3_sql(S)] is valid until the
[prepared statement] S is deleted using [sqlite3_finalize(S)].

HLR H13120 S60600
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
</pre></blockquote>

HLR H13123 S60600
The [sqlite3_db_handle(S)] interface returns a pointer
to the [database connection] associated with the
[prepared statement] S.

HLR H13140 S60600
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
</pre></blockquote>

HLR H13143 S60600
If D is a [database connection] that holds one or more
unfinalized [prepared statements] and S is a NULL pointer,
then [sqlite3_next_stmt(D, S)] routine shall return a pointer
to one of the prepared statements associated with D.

HLR H13146 S60600
................................................................................
to the next prepared statement in D after S.

HLR H13152 S60600
If S is the last [prepared statement] in the
[database connection] D then the [sqlite3_next_stmt(D, S)]
routine shall return a NULL pointer.

HLR H13200 S10000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_step(sqlite3_stmt*);
</pre></blockquote>

HLR H13202 S10000
If the [prepared statement] S is ready to be run, then
[sqlite3_step(S)] advances that prepared statement until
completion or until it is ready to return another row of the
result set, or until an [sqlite3_interrupt | interrupt]
or a run-time error occurs.

HLR H13300 S70300 S30100
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_finalize(sqlite3_stmt *pStmt);
</pre></blockquote>

HLR H13330 S70300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_reset(sqlite3_stmt *pStmt);
</pre></blockquote>

HLR H13500 S70300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
int sqlite3_bind_double(sqlite3_stmt*, int, double);
int sqlite3_bind_int(sqlite3_stmt*, int, int);
int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
int sqlite3_bind_null(sqlite3_stmt*, int);
int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
</pre></blockquote>

HLR H13506 S70300
The [SQL statement compiler] recognizes tokens of the forms
"?", "?NNN", "$VVV", ":VVV", and "@VVV" as SQL parameters,
where NNN is any sequence of one or more digits
and where VVV is any sequence of one or more alphanumeric
characters or "::" optionally followed by a string containing
no spaces and contained within parentheses.
................................................................................
is a BLOB of L bytes, or a zero-length BLOB if L is negative.

HLR H13551 S70300
In calls to [sqlite3_bind_value(S,N,V)] the V argument may
be either a [protected sqlite3_value] object or an
[unprotected sqlite3_value] object.

HLR H13600 S70300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_bind_parameter_count(sqlite3_stmt*);
</pre></blockquote>

HLR H13601 S70300
The [sqlite3_bind_parameter_count(S)] interface returns
the largest index of all SQL parameters in the
[prepared statement] S, or 0 if S contains no SQL parameters.

HLR H13620 S70300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
</pre></blockquote>

HLR H13621 S70300
The [sqlite3_bind_parameter_name(S,N)] interface returns
a UTF-8 rendering of the name of the SQL parameter in
the [prepared statement] S having index N, or
NULL if there is no SQL parameter with index N or if the
parameter with index N is an anonymous parameter "?".

HLR H13640 S70300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
</pre></blockquote>

HLR H13641 S70300
The [sqlite3_bind_parameter_index(S,N)] interface returns
the index of SQL parameter in the [prepared statement]
S whose name matches the UTF-8 string N, or 0 if there is
no match.

HLR H13660 S70300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_clear_bindings(sqlite3_stmt*);
</pre></blockquote>

HLR H13661 S70300
The [sqlite3_clear_bindings(S)] interface resets all SQL
parameter bindings in the [prepared statement] S back to NULL.

HLR H13710 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_column_count(sqlite3_stmt *pStmt);
</pre></blockquote>

HLR H13711 S10700
The [sqlite3_column_count(S)] interface returns the number of
columns in the result set generated by the [prepared statement] S,
or 0 if S does not generate a result set.

HLR H13720 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const char *sqlite3_column_name(sqlite3_stmt*, int N);
const void *sqlite3_column_name16(sqlite3_stmt*, int N);
</pre></blockquote>

HLR H13721 S10700
A successful invocation of the [sqlite3_column_name(S,N)]
interface returns the name of the Nth column (where 0 is
the leftmost column) for the result set of the
[prepared statement] S as a zero-terminated UTF-8 string.

HLR H13723 S10700
................................................................................
or until [sqlite3_finalize(S)] is called.

HLR H13727 S10700
When a result column of a [SELECT] statement contains
an AS clause, the name of that column is the identifier
to the right of the AS keyword.

HLR H13740 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const char *sqlite3_column_database_name(sqlite3_stmt*,int);
const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
const char *sqlite3_column_table_name(sqlite3_stmt*,int);
const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
</pre></blockquote>

HLR H13741 S10700
The [sqlite3_column_database_name(S,N)] interface returns either
the UTF-8 zero-terminated name of the database from which the
Nth result column of the [prepared statement] S is extracted,
or NULL if the Nth column of S is a general expression
or if unable to allocate memory to store the name.

................................................................................
HLR H13748 S10700
The return values from
[sqlite3_column_database_name | column metadata interfaces]
are valid for the lifetime of the [prepared statement]
or until the encoding is changed by another metadata
interface call for the same prepared statement and column.

HLR H13760 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const char *sqlite3_column_decltype(sqlite3_stmt*,int);
const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
</pre></blockquote>

HLR H13761 S10700
A successful call to [sqlite3_column_decltype(S,N)] returns a
zero-terminated UTF-8 string containing the declared datatype
of the table column that appears as the Nth column (numbered
from 0) of the result set to the [prepared statement] S.

HLR H13762 S10700
................................................................................
the number of columns in the [prepared statement] S,
or if the Nth column of S is an expression or subquery rather
than a table column, or if a memory allocation failure
occurs during encoding conversions, then
calls to [sqlite3_column_decltype(S,N)] or
[sqlite3_column_decltype16(S,N)] return NULL.

HLR H13770 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_data_count(sqlite3_stmt *pStmt);
</pre></blockquote>

HLR H13771 S10700
After a call to [sqlite3_step(S)] that returns [SQLITE_ROW],
the [sqlite3_data_count(S)] routine will return the same value
as the [sqlite3_column_count(S)] function.

HLR H13772 S10700
After [sqlite3_step(S)] has returned any value other than
[SQLITE_ROW] or before [sqlite3_step(S)] has been called on the
[prepared statement] for the first time since it was
[sqlite3_prepare | prepared] or [sqlite3_reset | reset],
the [sqlite3_data_count(S)] routine returns zero.

HLR H13800 S10700
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
double sqlite3_column_double(sqlite3_stmt*, int iCol);
int sqlite3_column_int(sqlite3_stmt*, int iCol);
sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
int sqlite3_column_type(sqlite3_stmt*, int iCol);
sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
</pre></blockquote>

HLR H13803 S10700
The [sqlite3_column_blob(S,N)] interface converts the
Nth column in the current row of the result set for
the [prepared statement] S into a BLOB and then returns a
pointer to the converted value.

HLR H13806 S10700
................................................................................

HLR H13830 S10700
The [sqlite3_column_value(S,N)] interface returns a
pointer to an [unprotected sqlite3_value] object for the
Nth column in the current row of the result set for
the [prepared statement] S.

HLR H14100 S20000 S30200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_config(int, ...);
</pre></blockquote>

HLR H14103 S20000
A successful invocation of [sqlite3_config()] shall return
[SQLITE_OK].

HLR H14106 S20000
The [sqlite3_config()] interface shall return [SQLITE_MISUSE]
if it is invoked in between calls to [sqlite3_initialize()] and
................................................................................
[memsys5] memory allocator.

HLR H14168 S20000
A successful call to [sqlite3_config]([SQLITE_CONFIG_LOOKASIDE],Z,N)
shall cause the default [lookaside memory allocator] configuration
for new [database connections] to be N slots of Z bytes each.

HLR H14200 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_db_config(sqlite3*, int op, ...);
</pre></blockquote>

HLR H14203 S20000
A call to [sqlite3_db_config(D,V,...)] shall return [SQLITE_OK]
if and only if the call is successful.

HLR H14206 S20000
If one or more slots of the [lookaside memory allocator] for
[database connection] D are in use, then a call to
................................................................................

HLR H14215 S20000
A successful call to
[sqlite3_db_config](D,[SQLITE_DBCONFIG_LOOKASIDE],B,Z,N) where
D is an open [database connection] and Z and N are zero shall
disable the [lookaside memory allocator] for D.

HLR H15000 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct Mem sqlite3_value;
</pre></blockquote>

HLR H15100 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
const void *sqlite3_value_blob(sqlite3_value*);
int sqlite3_value_bytes(sqlite3_value*);
int sqlite3_value_bytes16(sqlite3_value*);
double sqlite3_value_double(sqlite3_value*);
int sqlite3_value_int(sqlite3_value*);
sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
const unsigned char *sqlite3_value_text(sqlite3_value*);
const void *sqlite3_value_text16(sqlite3_value*);
const void *sqlite3_value_text16le(sqlite3_value*);
const void *sqlite3_value_text16be(sqlite3_value*);
int sqlite3_value_type(sqlite3_value*);
int sqlite3_value_numeric_type(sqlite3_value*);
</pre></blockquote>

HLR H15103 S20200
The [sqlite3_value_blob(V)] interface converts the
[protected sqlite3_value] object V into a BLOB and then
returns a pointer to the converted value.

HLR H15106 S20200
The [sqlite3_value_bytes(V)] interface returns the
................................................................................
If an [sqlite3_interrupt | interrupt] or a run-time error
occurs during a call to [sqlite3_step(S)]
for a [prepared statement] S created using
legacy interfaces [sqlite3_prepare()] or
[sqlite3_prepare16()], then the function returns either
[SQLITE_ERROR], [SQLITE_BUSY], or [SQLITE_MISUSE].

HLR H16001 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_context sqlite3_context;
</pre></blockquote>

HLR H16100 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_create_function(
sqlite3 *db,
const char *zFunctionName,
int nArg,
int eTextRep,
void *pApp,
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*)
);
int sqlite3_create_function16(
sqlite3 *db,
const void *zFunctionName,
int nArg,
int eTextRep,
void *pApp,
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
void (*xFinal)(sqlite3_context*)
);
</pre></blockquote>

HLR H16103 S20200
The [sqlite3_create_function16(D,X,...)] interface shall behave
as [sqlite3_create_function(D,X,...)] in every way except that it
interprets the X argument as zero-terminated UTF-16
native byte order instead of as zero-terminated UTF-8.

HLR H16106 S20200
................................................................................
HLR H16142 S20200
When SQLite invokes either the xFunc or xStep function of
an application-defined SQL function or aggregate created
by [sqlite3_create_function()] or [sqlite3_create_function16()],
then the array of [sqlite3_value] objects passed as the
third parameter shall be [protected sqlite3_value] objects.

HLR H16210 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
</pre></blockquote>

HLR H16211 S20200
The first invocation of [sqlite3_aggregate_context(C,N)] for
a particular instance of an aggregate function (for a particular
context C) causes SQLite to allocate N bytes of memory,
zero that memory, and return a pointer to the allocated memory.

HLR H16213 S20200
................................................................................

HLR H16217 S20200
The memory allocated by [sqlite3_aggregate_context(C,N)] is
automatically freed on the next call to [sqlite3_reset()]
or [sqlite3_finalize()] for the [prepared statement] containing
the aggregate function associated with context C.

HLR H16240 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_user_data(sqlite3_context*);
</pre></blockquote>

HLR H16243 S20200
The [sqlite3_user_data(C)] interface returns a copy of the
P pointer from the [sqlite3_create_function(D,X,N,E,P,F,S,L)]
or [sqlite3_create_function16(D,X,N,E,P,F,S,L)] call that
registered the SQL function associated with [sqlite3_context] C.

HLR H16250 S60600 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
</pre></blockquote>

HLR H16253 S60600
The [sqlite3_context_db_handle(C)] interface returns a copy of the
D pointer from the [sqlite3_create_function(D,X,N,E,P,F,S,L)]
or [sqlite3_create_function16(D,X,N,E,P,F,S,L)] call that
registered the SQL function associated with [sqlite3_context] C.

HLR H16270 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_get_auxdata(sqlite3_context*, int N);
void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
</pre></blockquote>

HLR H16272 S20200
The [sqlite3_get_auxdata(C,N)] interface returns a pointer
to metadata associated with the Nth parameter of the SQL function
whose context is C, or NULL if there is no metadata associated
with that parameter.

HLR H16274 S20200
................................................................................
context C and parameter N.

HLR H16279 S20200
SQLite will call destructors for any metadata it is holding
in a particular [prepared statement] S when either
[sqlite3_reset(S)] or [sqlite3_finalize(S)] is called.

HLR H16342 S30220
The [sqlite3_release_memory(N)] returns the number
of bytes actually freed, which might be more or less
than the amount requested.

HLR H16351 S30220
The [sqlite3_soft_heap_limit(N)] interface places a soft limit
of N bytes on the amount of heap memory that may be allocated
using [sqlite3_malloc()] or [sqlite3_realloc()] at any point
in time.

HLR H16352 S30220
................................................................................
HLR H16355 S30220
The default value for the soft heap limit is zero.

HLR H16358 S30220
Each call to [sqlite3_soft_heap_limit(N)] overrides the
values set by all prior calls.

HLR H16400 S20200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
void sqlite3_result_double(sqlite3_context*, double);
void sqlite3_result_error(sqlite3_context*, const char*, int);
void sqlite3_result_error16(sqlite3_context*, const void*, int);
void sqlite3_result_error_toobig(sqlite3_context*);
void sqlite3_result_error_nomem(sqlite3_context*);
void sqlite3_result_error_code(sqlite3_context*, int);
void sqlite3_result_int(sqlite3_context*, int);
void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
void sqlite3_result_null(sqlite3_context*);
void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
void sqlite3_result_zeroblob(sqlite3_context*, int n);
</pre></blockquote>

HLR H16403 S20200
The default return value from any SQL function is NULL.

HLR H16406 S20200
The [sqlite3_result_blob(C,V,N,D)] interface changes the
return value of function C to be a BLOB that is N bytes
in length and with content pointed to by V.
................................................................................
[sqlite3_result_text(C,V,N,D)], [sqlite3_result_text16(C,V,N,D)],
[sqlite3_result_text16be(C,V,N,D)], or
[sqlite3_result_text16le(C,V,N,D)] is some value other than
the constants [SQLITE_STATIC] and [SQLITE_TRANSIENT] then
SQLite will invoke the destructor D with V as its only argument
when it has finished with the V value.

HLR H16600 S20300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_create_collation(
sqlite3*,
const char *zName,
int eTextRep,
void*,
int(*xCompare)(void*,int,const void*,int,const void*)
);
int sqlite3_create_collation_v2(
sqlite3*,
const char *zName,
int eTextRep,
void*,
int(*xCompare)(void*,int,const void*,int,const void*),
void(*xDestroy)(void*)
);
int sqlite3_create_collation16(
sqlite3*,
const void *zName,
int eTextRep,
void*,
int(*xCompare)(void*,int,const void*,int,const void*)
);
</pre></blockquote>

HLR H16603 S20300
A successful call to the
[sqlite3_create_collation_v2(B,X,E,P,F,D)] interface
registers function F as the comparison function used to
implement collation X on the [database connection] B for
databases having encoding E.

................................................................................

HLR H16630 S20300
When multiple comparison functions are available for the same
collating sequence, SQLite chooses the one whose text encoding
requires the least amount of conversion from the default
text encoding of the database.

HLR H16700 S20300
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_collation_needed(
sqlite3*,
void*,
void(*)(void*,sqlite3*,int eTextRep,const char*)
);
int sqlite3_collation_needed16(
sqlite3*,
void*,
void(*)(void*,sqlite3*,int eTextRep,const void*)
);
</pre></blockquote>

HLR H16702 S20300
A successful call to [sqlite3_collation_needed(D,P,F)]
or [sqlite3_collation_needed16(D,P,F)] causes
the [database connection] D to invoke callback F with first
parameter P whenever it needs a comparison function for a
collating sequence that it does not know about.

................................................................................
HLR H16706 S20300
The name of the requested collating function passed in the
4th parameter to the callback is in UTF-8 if the callback
was registered using [sqlite3_collation_needed()] and
is in UTF-16 native byte order if the callback was
registered using [sqlite3_collation_needed16()].

HLR H17000 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3_mutex *sqlite3_mutex_alloc(int);
void sqlite3_mutex_free(sqlite3_mutex*);
void sqlite3_mutex_enter(sqlite3_mutex*);
int sqlite3_mutex_try(sqlite3_mutex*);
void sqlite3_mutex_leave(sqlite3_mutex*);
</pre></blockquote>

HLR H17001 H17000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_MUTEX_FAST             0
#define SQLITE_MUTEX_RECURSIVE        1
#define SQLITE_MUTEX_STATIC_MASTER    2
#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
#define SQLITE_MUTEX_STATIC_MEM2      4  /* sqlite3_release_memory() */
#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
#define SQLITE_MUTEX_STATIC_LRU2      7  /* lru page list */
</pre></blockquote>

HLR H17002 H17000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
</pre></blockquote>

HLR H17080 S20130 S30800
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_mutex_held(sqlite3_mutex*);
int sqlite3_mutex_notheld(sqlite3_mutex*);
</pre></blockquote>

HLR H17110 S20130
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_mutex sqlite3_mutex;
</pre></blockquote>

HLR H17120 S20130
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
struct sqlite3_mutex_methods {
int (*xMutexInit)(void);
int (*xMutexEnd)(void);
sqlite3_mutex *(*xMutexAlloc)(int);
void (*xMutexFree)(sqlite3_mutex *);
void (*xMutexEnter)(sqlite3_mutex *);
int (*xMutexTry)(sqlite3_mutex *);
void (*xMutexLeave)(sqlite3_mutex *);
int (*xMutexHeld)(sqlite3_mutex *);
int (*xMutexNotheld)(sqlite3_mutex *);
};
</pre></blockquote>

HLR H17200 S60200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
</pre></blockquote>

HLR H17250 H17200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_STATUS_MEMORY_USED          0
#define SQLITE_STATUS_PAGECACHE_USED       1
#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
#define SQLITE_STATUS_SCRATCH_USED         3
#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
#define SQLITE_STATUS_MALLOC_SIZE          5
#define SQLITE_STATUS_PARSER_STACK         6
#define SQLITE_STATUS_PAGECACHE_SIZE       7
#define SQLITE_STATUS_SCRATCH_SIZE         8
</pre></blockquote>

HLR H17300 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void *sqlite3_malloc(int);
void *sqlite3_realloc(void*, int);
void sqlite3_free(void*);
</pre></blockquote>

HLR H17303 S20000
The [sqlite3_malloc(N)] interface returns either a pointer to
a newly checked-out block of at least N bytes of memory
that is 8-byte aligned, or it returns NULL if it is unable
to fulfill the request.

HLR H17304 S20000
................................................................................
When [sqlite3_realloc(P,N)] returns a non-NULL pointer, it first
releases the buffer P.

HLR H17323 S20000
When [sqlite3_realloc(P,N)] returns NULL, the buffer P is
not modified or released.

HLR H17340 S30220
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_release_memory(int);
</pre></blockquote>

HLR H17341 S30220
The [sqlite3_release_memory(N)] interface attempts to
free N bytes of heap memory by deallocating non-essential
memory allocations held by the database library.

HLR H17350 S30220
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void sqlite3_soft_heap_limit(int);
</pre></blockquote>

HLR H17370 S30210
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
sqlite3_int64 sqlite3_memory_used(void);
sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
</pre></blockquote>

HLR H17371 S30210
The [sqlite3_memory_used()] routine returns the number of bytes
of memory currently outstanding (malloced but not freed).

HLR H17373 S30210
The [sqlite3_memory_highwater()] routine returns the maximum
................................................................................
HLR H17375 S30210
The memory high-water mark is reset to the current value of
[sqlite3_memory_used()] if and only if the parameter to
[sqlite3_memory_highwater()] is true.  The value returned
by [sqlite3_memory_highwater(1)] is the high-water mark
prior to the reset.

HLR H17390 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
void sqlite3_randomness(int N, void *P);
</pre></blockquote>

HLR H17392 S20000
The [sqlite3_randomness(N,P)] interface writes N bytes of
high-quality pseudo-randomness into buffer P.

HLR H17400 S70000 S20000
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
char *sqlite3_mprintf(const char*,...);
char *sqlite3_vmprintf(const char*, va_list);
char *sqlite3_snprintf(int,char*,const char*, ...);
</pre></blockquote>

HLR H17403 S70000
The [sqlite3_mprintf()] and [sqlite3_vmprintf()] interfaces
return either pointers to zero-terminated UTF-8 strings held in
memory obtained from [sqlite3_malloc()] or NULL pointers if
a call to [sqlite3_malloc()] fails.

HLR H17406 S70000
................................................................................
HLR H17407 S70000
The [sqlite3_snprintf()] interface does not write slots of
its output buffer (the second parameter) outside the range
of 0 through N-1 (where N is the first parameter)
regardless of the length of the string
requested by the format specification.

HLR H17500 S60200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
</pre></blockquote>

HLR H17520 H17500
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_DBSTATUS_LOOKASIDE_USED     0
</pre></blockquote>

HLR H17550 S60200
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
</pre></blockquote>

HLR H17570 H17550
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1
#define SQLITE_STMTSTATUS_SORT              2
</pre></blockquote>

HLR H17800 S30230
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
typedef struct sqlite3_blob sqlite3_blob;
</pre></blockquote>

HLR H17810 S30230
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_blob_open(
sqlite3*,
const char *zDb,
const char *zTable,
const char *zColumn,
sqlite3_int64 iRow,
int flags,
sqlite3_blob **ppBlob
);
</pre></blockquote>

HLR H17813 S30230
A successful invocation of the [sqlite3_blob_open(D,B,T,C,R,F,P)]
interface shall open an [sqlite3_blob] object P on the BLOB
in column C of the table T in the database B on
the [database connection] D.

HLR H17814 S30230
................................................................................

HLR H17824 S30230
If any column in the row that a [sqlite3_blob] has open is
changed by a separate [UPDATE] or [DELETE] statement or by
an [ON CONFLICT] side effect, then the [sqlite3_blob] shall
be marked as invalid.

HLR H17830 S30230
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_blob_close(sqlite3_blob *);
</pre></blockquote>

HLR H17833 S30230
The [sqlite3_blob_close(P)] interface closes an [sqlite3_blob]
object P previously opened using [sqlite3_blob_open()].

HLR H17836 S30230
Closing an [sqlite3_blob] object using
[sqlite3_blob_close()] shall cause the current transaction to
................................................................................
the database connection is in [autocommit mode].

HLR H17839 S30230
The [sqlite3_blob_close(P)] interfaces shall close the
[sqlite3_blob] object P unconditionally, even if
[sqlite3_blob_close(P)] returns something other than [SQLITE_OK].

HLR H17840 S30230
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_blob_bytes(sqlite3_blob *);
</pre></blockquote>

HLR H17843 S30230
The [sqlite3_blob_bytes(P)] interface returns the size
in bytes of the BLOB that the [sqlite3_blob] object P
refers to.

HLR H17850 S30230
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
</pre></blockquote>

HLR H17853 S30230
A successful invocation of [sqlite3_blob_read(P,Z,N,X)]
shall reads N bytes of data out of the BLOB referenced by
[BLOB handle] P beginning at offset X and store those bytes
into buffer Z.

HLR H17856 S30230
................................................................................
If an error occurs during evaluation of [sqlite3_blob_read(P,...)]
then subsequent calls to [sqlite3_errcode(D)],
[sqlite3_extended_errcode()],
[sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] shall return
information appropriate for that error, where D is the
[database connection] that was used to open the [BLOB handle] P.

HLR H17870 S30230
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
</pre></blockquote>

HLR H17873 S30230
A successful invocation of [sqlite3_blob_write(P,Z,N,X)]
shall write N bytes of data from buffer Z into the BLOB
referenced by [BLOB handle] P beginning at offset X into
the BLOB.

HLR H17874 S30230
................................................................................

HLR H17888 S30230
If an error occurs during evaluation of [sqlite3_blob_write(D,...)]
then subsequent calls to [sqlite3_errcode(D)],
[sqlite3_extended_errcode()],
[sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] shall return
information appropriate for that error.

HLR H18000 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
struct sqlite3_module {
int iVersion;
int (*xCreate)(sqlite3*, void *pAux,
int argc, const char *const*argv,
sqlite3_vtab **ppVTab, char**);
int (*xConnect)(sqlite3*, void *pAux,
int argc, const char *const*argv,
sqlite3_vtab **ppVTab, char**);
int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
int (*xDisconnect)(sqlite3_vtab *pVTab);
int (*xDestroy)(sqlite3_vtab *pVTab);
int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
int (*xClose)(sqlite3_vtab_cursor*);
int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
int argc, sqlite3_value **argv);
int (*xNext)(sqlite3_vtab_cursor*);
int (*xEof)(sqlite3_vtab_cursor*);
int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
int (*xBegin)(sqlite3_vtab *pVTab);
int (*xSync)(sqlite3_vtab *pVTab);
int (*xCommit)(sqlite3_vtab *pVTab);
int (*xRollback)(sqlite3_vtab *pVTab);
int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
void **ppArg);
int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
};
</pre></blockquote>

HLR H18010 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
struct sqlite3_vtab {
const sqlite3_module *pModule;  /* The module for this virtual table */
int nRef;                       /* Used internally */
char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
/* Virtual table implementations will typically add additional fields */
};
</pre></blockquote>

HLR H18020 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
struct sqlite3_vtab_cursor {
sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
/* Virtual table implementations will typically add additional fields */
};
</pre></blockquote>

HLR H18100 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
struct sqlite3_index_info {
/* Inputs */
int nConstraint;           /* Number of entries in aConstraint */
struct sqlite3_index_constraint {
int iColumn;              /* Column on left-hand side of constraint */
unsigned char op;         /* Constraint operator */
unsigned char usable;     /* True if this constraint is usable */
int iTermOffset;          /* Used internally - xBestIndex should ignore */
} *aConstraint;            /* Table of WHERE clause constraints */
int nOrderBy;              /* Number of terms in the ORDER BY clause */
struct sqlite3_index_orderby {
int iColumn;              /* Column number */
unsigned char desc;       /* True for DESC.  False for ASC. */
} *aOrderBy;               /* The ORDER BY clause */
/* Outputs */
struct sqlite3_index_constraint_usage {
int argvIndex;           /* if &gt;0, constraint is part of argv to xFilter */
unsigned char omit;      /* Do not code a test for this constraint */
} *aConstraintUsage;
int idxNum;                /* Number used to identify the index */
char *idxStr;              /* String, possibly obtained from sqlite3_malloc */
int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */
int orderByConsumed;       /* True if output is already ordered */
double estimatedCost;      /* Estimated cost of using this index */
};
#define SQLITE_INDEX_CONSTRAINT_EQ    2
#define SQLITE_INDEX_CONSTRAINT_GT    4
#define SQLITE_INDEX_CONSTRAINT_LE    8
#define SQLITE_INDEX_CONSTRAINT_LT    16
#define SQLITE_INDEX_CONSTRAINT_GE    32
#define SQLITE_INDEX_CONSTRAINT_MATCH 64
</pre></blockquote>

HLR H18200 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_create_module(
sqlite3 *db,               /* SQLite connection to register module with */
const char *zName,         /* Name of the module */
const sqlite3_module *,    /* Methods for the module */
void *                     /* Client data for xCreate/xConnect */
);
</pre></blockquote>

HLR H18210 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_create_module_v2(
sqlite3 *db,               /* SQLite connection to register module with */
const char *zName,         /* Name of the module */
const sqlite3_module *,    /* Methods for the module */
void *,                    /* Client data for xCreate/xConnect */
void(*xDestroy)(void*)     /* Module destructor function */
);
</pre></blockquote>

HLR H18280 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_declare_vtab(sqlite3*, const char *zCreateTable);
</pre></blockquote>

HLR H18300 S20400
The sqlite3.h header file shall define the
the following interfaces:
<blockquote><pre>
int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
</pre></blockquote>
<
<
<
<
<
<
<
<

|




|



<
<
<
<
<
<
<
<
<












<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>
>

<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<













<
<
<
<
<
<
<











<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<










<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<









<
<
<
<
<
<
<












<
<
<
<
<
<
<













<
<
<
<
<
<
<











<
<
<
<
<
<
<









<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<







 







|



<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<





<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<





<
<
<
<
<
<
<







<
<
<
<
<
<
<






<
<
<
<
<
<
<




<
<
<
<
<
<
<





<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<












<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<






<
<
<
<
<
<
<






<
<
<
<
<
<
<
<







 







<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<





|
|
|
|
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<




<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<





<
<
<
<
<
<
<







 







<
<
<
<
<
<
<







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<








1
2
3
4
5
6
7
8
9
10









11
12
13
14
15
16
17
18
19
20
21
22







23
24
25
26










27















28
29
30














































31
32
33
34
35
36
37
38






















































































































































































39
40
41
42
43
44
45
..
49
50
51
52
53
54
55








56
57
58
59
60
61
62
63
64
65
66
67
68







69
70
71
72
73
74
75
76
77
78
79

















































































80
81
82
83
84
85
86
...
103
104
105
106
107
108
109







110
111
112
113
114
115
116
117
118
119











































120
121
122
123
124
125
126
...
139
140
141
142
143
144
145













146
147
148
149
150
151
152
...
218
219
220
221
222
223
224







225
226
227
228
229
230
231
232
233







234
235
236
237
238
239
240
241
242
243
244
245







246
247
248
249
250
251
252
253
254
255
256
257
258







259
260
261
262
263
264
265
266
267
268
269







270
271
272
273
274
275
276
277
278









279
280
281
282
283
284
285
...
315
316
317
318
319
320
321







322
323
324
325
326
327
328
...
340
341
342
343
344
345
346







347
348
349
350
351
352
353
...
357
358
359
360
361
362
363















364
365
366
367
368
369
370
...
394
395
396
397
398
399
400











401
402
403
404
405
406
407
...
457
458
459
460
461
462
463







































464
465
466
467
468
469
470
...
481
482
483
484
485
486
487





























































488
489
490
491
492
493
494
...
561
562
563
564
565
566
567







568
569
570
571
572
573
574
...
576
577
578
579
580
581
582


























583
584
585
586
587
588
589
...
611
612
613
614
615
616
617
























618
619
620
621
622
623
624
...
648
649
650
651
652
653
654







655
656
657
658
659
660
661
...
663
664
665
666
667
668
669








670
671
672
673
674
675
676
...
706
707
708
709
710
711
712











713
714
715
716
717
718
719
...
739
740
741
742
743
744
745
746
747
748
749









































750
751
752
753
754
755
756
...
785
786
787
788
789
790
791







792
793
794
795
796
797
798
...
801
802
803
804
805
806
807







808
809
810
811
812







813
814
815
816
817
818
819
...
828
829
830
831
832
833
834







835
836
837
838
839
840
841





























842
843
844
845
846
847
848
...
923
924
925
926
927
928
929







930
931
932
933
934







935
936
937
938
939
940
941







942
943
944
945
946
947







948
949
950
951







952
953
954
955
956








957
958
959
960
961
962
963
...
984
985
986
987
988
989
990












991
992
993
994
995
996
997
....
1034
1035
1036
1037
1038
1039
1040








1041
1042
1043
1044
1045
1046
1047
....
1056
1057
1058
1059
1060
1061
1062







1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
















1075
1076
1077
1078
1079
1080
1081
....
1131
1132
1133
1134
1135
1136
1137







1138
1139
1140
1141
1142
1143
1144
....
1237
1238
1239
1240
1241
1242
1243







1244
1245
1246
1247
1248
1249
1250
....
1270
1271
1272
1273
1274
1275
1276

























1277
1278
1279
1280
1281
1282
1283
....
1364
1365
1366
1367
1368
1369
1370

































1371
1372
1373
1374
1375
1376
1377
....
1440
1441
1442
1443
1444
1445
1446







1447
1448
1449
1450
1451
1452
1453
....
1462
1463
1464
1465
1466
1467
1468







1469
1470
1471
1472
1473
1474







1475
1476
1477
1478
1479
1480








1481
1482
1483
1484
1485
1486
1487
....
1504
1505
1506
1507
1508
1509
1510





1511
1512
1513
1514
1515
1516
1517
....
1536
1537
1538
1539
1540
1541
1542






















1543
1544
1545
1546
1547
1548
1549
....
1651
1652
1653
1654
1655
1656
1657




























1658
1659
1660
1661
1662
1663
1664
....
1709
1710
1711
1712
1713
1714
1715
















1716
1717
1718
1719
1720
1721
1722
....
1729
1730
1731
1732
1733
1734
1735
































































































1736
1737
1738
1739
1740
1741
1742
....
1779
1780
1781
1782
1783
1784
1785







1786
1787
1788
1789
1790
1791
1792
1793
1794










1795
1796
1797
1798
1799
1800
1801
....
1812
1813
1814
1815
1816
1817
1818







1819
1820
1821
1822









1823
1824
1825
1826
1827
1828
1829
....
1834
1835
1836
1837
1838
1839
1840



















































1841
1842
1843
1844
1845
1846
1847
....
1867
1868
1869
1870
1871
1872
1873







1874
1875
1876
1877
1878
1879
1880
....
1883
1884
1885
1886
1887
1888
1889







1890
1891
1892
1893
1894







1895
1896
1897
1898
1899
1900
1901
....
1926
1927
1928
1929
1930
1931
1932







1933
1934
1935
1936
1937
1938
1939
....
1972
1973
1974
1975
1976
1977
1978













































































































































HLR H10011 S60100
The [SQLITE_VERSION] #define in the sqlite3.h header file shall
evaluate to a string literal that is the SQLite version
with which the header file is associated.

HLR H10014 S60100
The [SQLITE_VERSION_NUMBER] #define shall resolve to an integer
with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z
are the major version, minor version, and release number.










HLR H10021 S60100
The [sqlite3_libversion_number()] interface shall return
an integer equal to [SQLITE_VERSION_NUMBER].

HLR H10022 S60100
The [sqlite3_version] string constant shall contain
the text of the [SQLITE_VERSION] string.

HLR H10023 S60100
The [sqlite3_libversion()] function shall return
a pointer to the [sqlite3_version] string constant.








HLR H10101 S60100
The [sqlite3_threadsafe()] function shall return zero if
and only if SQLite was compiled with mutexing code omitted.











HLR H10102 S60100















The value returned by [sqlite3_threadsafe()] shall remain the same
across calls to [sqlite3_config()].















































HLR H10201 S10110
The [sqlite_int64] and [sqlite3_int64] type shall specify
a 64-bit signed integer.

HLR H10202 S10110
The [sqlite_uint64] and [sqlite3_uint64] type shall specify
a 64-bit unsigned integer.
























































































































































































HLR H10331 S30900
A successful invocation of [sqlite3_enable_shared_cache(B)]
will enable or disable shared cache mode for any subsequently
created [database connection] in the same process.

HLR H10336 S30900
................................................................................
HLR H10337 S30900
The [sqlite3_enable_shared_cache(B)] interface returns
[SQLITE_OK] if shared cache was enabled or disabled successfully.

HLR H10339 S30900
Shared cache is disabled by default.









HLR H10511 S70200
A successful evaluation of [sqlite3_complete()] or
[sqlite3_complete16()] functions shall
return a numeric 1 if and only if the input string contains
one or more non-whitespace tokens and the last non-whitespace
token in is a semicolon that is not in the middle of
a CREATE TRIGGER statement.

HLR H10512 S70200
If a memory allocation error occurs during an invocation
of [sqlite3_complete()] or [sqlite3_complete16()] then the
routine shall return [SQLITE_NOMEM].








HLR H10533 S40410
The [sqlite3_sleep(M)] interface invokes the xSleep
method of the default [sqlite3_vfs|VFS] in order to
suspend execution of the current thread for at least
M milliseconds.

HLR H10536 S40410
The [sqlite3_sleep(M)] interface returns the number of
milliseconds of sleep actually requested of the operating
system, which might be larger than the parameter M.


















































































HLR H11203 S20100
The [sqlite3_vfs_find(N)] interface returns a pointer to the
registered [sqlite3_vfs] object whose name exactly matches
the zero-terminated UTF-8 string N, or it returns NULL if
there is no match.

HLR H11206 S20100
................................................................................
object P the default [sqlite3_vfs] object if F is non-zero.

HLR H11218 S20100
The [sqlite3_vfs_unregister(P)] interface unregisters the
[sqlite3_vfs] object P so that it is no longer returned by
subsequent calls to [sqlite3_vfs_find()].








HLR H11302 S70300
The [sqlite3_finalize(S)] interface destroys the
[prepared statement] S and releases all
memory and file resources held by that object.

HLR H11304 S70300
If the most recent call to [sqlite3_step(S)] for the
[prepared statement] S returned an error,
then [sqlite3_finalize(S)] returns that same error.












































HLR H12011 S30100
A successful call to [sqlite3_close(C)] shall destroy the
[database connection] object C.

HLR H12012 S30100
A successful call to [sqlite3_close(C)] shall return SQLITE_OK.

................................................................................
be a harmless no-op returning SQLITE_OK.

HLR H12019 S30100
When [sqlite3_close(C)] is invoked on a [database connection] C
that has a pending transaction, the transaction shall be
rolled back.














HLR H12101 S10000
A successful invocation of [sqlite3_exec(D,S,C,A,E)]
shall sequentially evaluate all of the UTF-8 encoded,
semicolon-separated SQL statements in the zero-terminated
string S within the context of the [database connection] D.

HLR H12102 S10000
................................................................................
If the S parameter to [sqlite3_exec(D,S,C,A,E)] is NULL or an
empty string or contains nothing other than whitespace, comments,
and/or semicolons, then results of [sqlite3_errcode()],
[sqlite3_extended_errcode()],
[sqlite3_errmsg()], and [sqlite3_errmsg16()]
shall reset to indicate no errors.








HLR H12201 S10700
Each new [database connection] shall have the
[extended result codes] feature disabled by default.

HLR H12202 S10700
The [sqlite3_extended_result_codes(D,F)] interface shall enable
[extended result codes] for the  [database connection] D
if the F parameter is true, or disable them if F is false.








HLR H12221 S10700
The [sqlite3_last_insert_rowid()] function shall return the rowid
of the most recent successful [INSERT] performed on the same
[database connection] and within the same or higher level
trigger context, or zero if there have been no qualifying
[INSERT] statements.

HLR H12223 S10700
The [sqlite3_last_insert_rowid()] function shall return the
same value when called from the same trigger context
immediately before and after a [ROLLBACK].








HLR H12241 S10600
The [sqlite3_changes()] function shall return the number of
row changes caused by the most recent INSERT, UPDATE,
or DELETE statement on the same database connection and
within the same or higher trigger context, or zero if there have
not been any qualifying row changes.

HLR H12243 S10600
Statements of the form "DELETE FROM tablename" with no
WHERE clause shall cause subsequent calls to
[sqlite3_changes()] to return zero, regardless of the
number of rows originally in the table.








HLR H12261 S10600
The [sqlite3_total_changes()] returns the total number
of row changes caused by INSERT, UPDATE, and/or DELETE
statements on the same [database connection], in any
trigger context, since the database connection was created.

HLR H12263 S10600
Statements of the form "DELETE FROM tablename" with no
WHERE clause shall not change the value returned
by [sqlite3_total_changes()].








HLR H12271 S30500
The [sqlite3_interrupt()] interface will force all running
SQL statements associated with the same database connection
to halt after processing at most one additional row of data.

HLR H12272 S30500
Any SQL statement that is interrupted by [sqlite3_interrupt()]
will return [SQLITE_INTERRUPT].










HLR H12281 S60400
The callback function registered by [sqlite3_trace()]
shall be invoked
whenever an SQL statement first begins to execute and
whenever a trigger subprogram first begins to run.

HLR H12282 S60400
................................................................................
or the equivalent.

HLR H12290 S60400
The third parameter to the profile callback is an estimate
of the number of nanoseconds of wall-clock time required to
run the SQL statement from start to finish.








HLR H12311 S40400
The [sqlite3_busy_handler(D,C,A)] function shall replace
busy callback in the [database connection] D with a new
a new busy handler C and application data pointer A.

HLR H12312 S40400
Newly created [database connections] shall have a busy
................................................................................

HLR H12318 S40400
SQLite shall invokes the busy handler with two arguments which
are a copy of the pointer supplied by the 3rd parameter to
[sqlite3_busy_handler()] and a count of the number of prior
invocations of the busy handler for the same locking event.








HLR H12341 S40410
The [sqlite3_busy_timeout()] function shall override any prior
[sqlite3_busy_timeout()] or [sqlite3_busy_handler()] setting
on the same [database connection].

HLR H12343 S40410
If the 2nd parameter to [sqlite3_busy_timeout()] is less than
................................................................................
HLR H12344 S40410
If the 2nd parameter to [sqlite3_busy_timeout()] is a positive
number N, then a busy handler shall be set that repeatedly calls
the xSleep() method in the [sqlite3_vfs | VFS interface] until
either the lock clears or until the cumulative sleep time
reported back by xSleep() exceeds N milliseconds.
















HLR H12371 S10000
If a [sqlite3_get_table()] fails a memory allocation, then
it shall free the result table under construction, abort the
query in process, skip any subsequent queries, set the
*pazResult output pointer to NULL and return [SQLITE_NOMEM].

HLR H12373 S10000
................................................................................
HLR H12382 S10000
When an error other than SQLITE_NOMEM occurs during evaluation 
of [sqlite3_get_table()] the function shall set *pazResult to NULL,
write an error message into memory obtained from [sqlite3_malloc()], make
**pzErrmsg point to that error message, and return a
appropriate [error code].












HLR H12501 S70100
The [sqlite3_set_authorizer(D,...)] interface registers a
authorizer callback with database connection D.

HLR H12502 S70100
The authorizer callback is invoked as SQL statements are
being parseed and compiled.
................................................................................
HLR H12521 S70100
A NULL authorizer means that no authorization
callback is invoked.

HLR H12522 S70100
The default authorizer is NULL.








































HLR H12551 H12500
The second parameter to an
[sqlite3_set_authorizer | authorizer callback] shall be an integer
[SQLITE_COPY | authorizer code] that specifies what action
is being authorized.

HLR H12552 H12500
................................................................................
HLR H12554 H12500
The 6th parameter to the
[sqlite3_set_authorizer | authorizer callback] shall be the name
of the inner-most trigger or view that is responsible for
the access attempt or NULL if this access attempt is directly from
top-level SQL code.






























































HLR H12701 S40200
The [sqlite3_open()], [sqlite3_open16()], and
[sqlite3_open_v2()] interfaces create a new
[database connection] associated with
the database file given in their first parameter.

HLR H12702 S40200
................................................................................

HLR H12723 S40200
Two [database connections] will share a common cache if both were
opened with the same VFS while [shared cache mode] was enabled and
if both filenames compare equal using memcmp() after having been
processed by the [sqlite3_vfs | xFullPathname] method of the VFS.








HLR H12762 S20600
A successful call to [sqlite3_limit(D,C,V)] where V is
positive changes the limit on the size of construct C in the
[database connection] D to the lesser of V and the hard upper
bound on the size of C that is set at compile-time.

HLR H12766 S20600
................................................................................
leaves the state of the [database connection] D unchanged.

HLR H12769 S20600
A successful call to [sqlite3_limit(D,C,V)] returns the
value of the limit on the size of construct C in the
[database connection] D as it was prior to the call.



























HLR H12801 S60200
The [sqlite3_errcode(D)] interface returns the numeric
[result code] or [extended result code] for the most recently
failed interface call associated with the [database connection] D.

HLR H12802 S60200
The [sqlite3_extended_errcode(D)] interface returns the numeric
................................................................................
Interfaces that are not associated with a specific
[database connection] (examples:
[sqlite3_mprintf()] or [sqlite3_enable_shared_cache()]
do not change the values returned by
[sqlite3_errcode()], [sqlite3_extended_errcode()],
[sqlite3_errmsg()], or [sqlite3_errmsg16()].

























HLR H12911 S60400
The callback function registered by sqlite3_progress_handler()
is invoked periodically during long running calls to
[sqlite3_step()].

HLR H12912 S60400
The progress callback is invoked once for every N virtual
................................................................................
If the progress handler callback is NULL then no progress
handler is invoked.

HLR H12918 S30500 S60400
If the progress callback returns a result other than 0, then
the behavior is a if [sqlite3_interrupt()] had been called.








HLR H12931 S60200
The [sqlite3_get_autocommit(D)] interface returns non-zero or
zero if the [database connection] D is or is not in autocommit
mode, respectively.

HLR H12932 S60200
Autocommit mode is on by default.
................................................................................
HLR H12933 S60200
Autocommit mode is disabled by a successful [BEGIN] statement.

HLR H12934 S60200
Autocommit mode is enabled by a successful [COMMIT] or [ROLLBACK]
statement.









HLR H12951 S60400
The [sqlite3_commit_hook(D,F,P)] interface registers the
callback function F to be invoked with argument P whenever
a transaction commits on the [database connection] D.

HLR H12952 S60400
The [sqlite3_commit_hook(D,F,P)] interface returns the P argument
................................................................................
registered by prior calls.

HLR H12964 S60400
If the F argument to [sqlite3_rollback_hook(D,F,P)] is NULL
then the rollback hook callback is canceled and no callback
is invoked when a transaction rolls back.












HLR H12971 S60400
The [sqlite3_update_hook(D,F,P)] interface causes the callback
function F to be invoked with first parameter P whenever
a table row is modified, inserted, or deleted on
the [database connection] D.

HLR H12973 S60400
................................................................................
depending on the operation that caused the callback to be invoked.

HLR H12983 S60400
The third and fourth arguments to the callback contain pointers
to zero-terminated UTF-8 strings which are the names of the
database and table that is being updated.

HLR H12986 S60400
The final callback parameter is the rowid of the row after
the change occurs.










































HLR H13011 S10000
The [sqlite3_prepare(db,zSql,...)] and
[sqlite3_prepare_v2(db,zSql,...)] interfaces interpret the
text in their zSql parameter as UTF-8.

HLR H13012 S10000
The [sqlite3_prepare16(db,zSql,...)] and
................................................................................
[SQLITE_OK] or an appropriate [error code] upon failure.

HLR H13021 S10000
Before [sqlite3_prepare(db,zSql,nByte,ppStmt,pzTail)] or its
variants returns an error (any value other than [SQLITE_OK]),
they first set *ppStmt to NULL.








HLR H13101 H13000
If the [prepared statement] passed as the argument to
[sqlite3_sql()] was compiled using either [sqlite3_prepare_v2()] or
[sqlite3_prepare16_v2()], then [sqlite3_sql()] returns
a pointer to a zero-terminated string containing a UTF-8 rendering
of the original SQL statement.

................................................................................
[sqlite3_sql()] was compiled using either [sqlite3_prepare()] or
[sqlite3_prepare16()], then [sqlite3_sql()] returns a NULL pointer.

HLR H13103 H13000
The string returned by [sqlite3_sql(S)] is valid until the
[prepared statement] S is deleted using [sqlite3_finalize(S)].








HLR H13123 S60600
The [sqlite3_db_handle(S)] interface returns a pointer
to the [database connection] associated with the
[prepared statement] S.








HLR H13143 S60600
If D is a [database connection] that holds one or more
unfinalized [prepared statements] and S is a NULL pointer,
then [sqlite3_next_stmt(D, S)] routine shall return a pointer
to one of the prepared statements associated with D.

HLR H13146 S60600
................................................................................
to the next prepared statement in D after S.

HLR H13152 S60600
If S is the last [prepared statement] in the
[database connection] D then the [sqlite3_next_stmt(D, S)]
routine shall return a NULL pointer.








HLR H13202 S10000
If the [prepared statement] S is ready to be run, then
[sqlite3_step(S)] advances that prepared statement until
completion or until it is ready to return another row of the
result set, or until an [sqlite3_interrupt | interrupt]
or a run-time error occurs.






























HLR H13506 S70300
The [SQL statement compiler] recognizes tokens of the forms
"?", "?NNN", "$VVV", ":VVV", and "@VVV" as SQL parameters,
where NNN is any sequence of one or more digits
and where VVV is any sequence of one or more alphanumeric
characters or "::" optionally followed by a string containing
no spaces and contained within parentheses.
................................................................................
is a BLOB of L bytes, or a zero-length BLOB if L is negative.

HLR H13551 S70300
In calls to [sqlite3_bind_value(S,N,V)] the V argument may
be either a [protected sqlite3_value] object or an
[unprotected sqlite3_value] object.








HLR H13601 S70300
The [sqlite3_bind_parameter_count(S)] interface returns
the largest index of all SQL parameters in the
[prepared statement] S, or 0 if S contains no SQL parameters.








HLR H13621 S70300
The [sqlite3_bind_parameter_name(S,N)] interface returns
a UTF-8 rendering of the name of the SQL parameter in
the [prepared statement] S having index N, or
NULL if there is no SQL parameter with index N or if the
parameter with index N is an anonymous parameter "?".








HLR H13641 S70300
The [sqlite3_bind_parameter_index(S,N)] interface returns
the index of SQL parameter in the [prepared statement]
S whose name matches the UTF-8 string N, or 0 if there is
no match.








HLR H13661 S70300
The [sqlite3_clear_bindings(S)] interface resets all SQL
parameter bindings in the [prepared statement] S back to NULL.








HLR H13711 S10700
The [sqlite3_column_count(S)] interface returns the number of
columns in the result set generated by the [prepared statement] S,
or 0 if S does not generate a result set.









HLR H13721 S10700
A successful invocation of the [sqlite3_column_name(S,N)]
interface returns the name of the Nth column (where 0 is
the leftmost column) for the result set of the
[prepared statement] S as a zero-terminated UTF-8 string.

HLR H13723 S10700
................................................................................
or until [sqlite3_finalize(S)] is called.

HLR H13727 S10700
When a result column of a [SELECT] statement contains
an AS clause, the name of that column is the identifier
to the right of the AS keyword.













HLR H13741 S10700
The [sqlite3_column_database_name(S,N)] interface returns either
the UTF-8 zero-terminated name of the database from which the
Nth result column of the [prepared statement] S is extracted,
or NULL if the Nth column of S is a general expression
or if unable to allocate memory to store the name.

................................................................................
HLR H13748 S10700
The return values from
[sqlite3_column_database_name | column metadata interfaces]
are valid for the lifetime of the [prepared statement]
or until the encoding is changed by another metadata
interface call for the same prepared statement and column.









HLR H13761 S10700
A successful call to [sqlite3_column_decltype(S,N)] returns a
zero-terminated UTF-8 string containing the declared datatype
of the table column that appears as the Nth column (numbered
from 0) of the result set to the [prepared statement] S.

HLR H13762 S10700
................................................................................
the number of columns in the [prepared statement] S,
or if the Nth column of S is an expression or subquery rather
than a table column, or if a memory allocation failure
occurs during encoding conversions, then
calls to [sqlite3_column_decltype(S,N)] or
[sqlite3_column_decltype16(S,N)] return NULL.








HLR H13771 S10700
After a call to [sqlite3_step(S)] that returns [SQLITE_ROW],
the [sqlite3_data_count(S)] routine will return the same value
as the [sqlite3_column_count(S)] function.

HLR H13772 S10700
After [sqlite3_step(S)] has returned any value other than
[SQLITE_ROW] or before [sqlite3_step(S)] has been called on the
[prepared statement] for the first time since it was
[sqlite3_prepare | prepared] or [sqlite3_reset | reset],
the [sqlite3_data_count(S)] routine returns zero.

















HLR H13803 S10700
The [sqlite3_column_blob(S,N)] interface converts the
Nth column in the current row of the result set for
the [prepared statement] S into a BLOB and then returns a
pointer to the converted value.

HLR H13806 S10700
................................................................................

HLR H13830 S10700
The [sqlite3_column_value(S,N)] interface returns a
pointer to an [unprotected sqlite3_value] object for the
Nth column in the current row of the result set for
the [prepared statement] S.








HLR H14103 S20000
A successful invocation of [sqlite3_config()] shall return
[SQLITE_OK].

HLR H14106 S20000
The [sqlite3_config()] interface shall return [SQLITE_MISUSE]
if it is invoked in between calls to [sqlite3_initialize()] and
................................................................................
[memsys5] memory allocator.

HLR H14168 S20000
A successful call to [sqlite3_config]([SQLITE_CONFIG_LOOKASIDE],Z,N)
shall cause the default [lookaside memory allocator] configuration
for new [database connections] to be N slots of Z bytes each.








HLR H14203 S20000
A call to [sqlite3_db_config(D,V,...)] shall return [SQLITE_OK]
if and only if the call is successful.

HLR H14206 S20000
If one or more slots of the [lookaside memory allocator] for
[database connection] D are in use, then a call to
................................................................................

HLR H14215 S20000
A successful call to
[sqlite3_db_config](D,[SQLITE_DBCONFIG_LOOKASIDE],B,Z,N) where
D is an open [database connection] and Z and N are zero shall
disable the [lookaside memory allocator] for D.


























HLR H15103 S20200
The [sqlite3_value_blob(V)] interface converts the
[protected sqlite3_value] object V into a BLOB and then
returns a pointer to the converted value.

HLR H15106 S20200
The [sqlite3_value_bytes(V)] interface returns the
................................................................................
If an [sqlite3_interrupt | interrupt] or a run-time error
occurs during a call to [sqlite3_step(S)]
for a [prepared statement] S created using
legacy interfaces [sqlite3_prepare()] or
[sqlite3_prepare16()], then the function returns either
[SQLITE_ERROR], [SQLITE_BUSY], or [SQLITE_MISUSE].


































HLR H16103 S20200
The [sqlite3_create_function16(D,X,...)] interface shall behave
as [sqlite3_create_function(D,X,...)] in every way except that it
interprets the X argument as zero-terminated UTF-16
native byte order instead of as zero-terminated UTF-8.

HLR H16106 S20200
................................................................................
HLR H16142 S20200
When SQLite invokes either the xFunc or xStep function of
an application-defined SQL function or aggregate created
by [sqlite3_create_function()] or [sqlite3_create_function16()],
then the array of [sqlite3_value] objects passed as the
third parameter shall be [protected sqlite3_value] objects.








HLR H16211 S20200
The first invocation of [sqlite3_aggregate_context(C,N)] for
a particular instance of an aggregate function (for a particular
context C) causes SQLite to allocate N bytes of memory,
zero that memory, and return a pointer to the allocated memory.

HLR H16213 S20200
................................................................................

HLR H16217 S20200
The memory allocated by [sqlite3_aggregate_context(C,N)] is
automatically freed on the next call to [sqlite3_reset()]
or [sqlite3_finalize()] for the [prepared statement] containing
the aggregate function associated with context C.








HLR H16243 S20200
The [sqlite3_user_data(C)] interface returns a copy of the
P pointer from the [sqlite3_create_function(D,X,N,E,P,F,S,L)]
or [sqlite3_create_function16(D,X,N,E,P,F,S,L)] call that
registered the SQL function associated with [sqlite3_context] C.








HLR H16253 S60600
The [sqlite3_context_db_handle(C)] interface returns a copy of the
D pointer from the [sqlite3_create_function(D,X,N,E,P,F,S,L)]
or [sqlite3_create_function16(D,X,N,E,P,F,S,L)] call that
registered the SQL function associated with [sqlite3_context] C.









HLR H16272 S20200
The [sqlite3_get_auxdata(C,N)] interface returns a pointer
to metadata associated with the Nth parameter of the SQL function
whose context is C, or NULL if there is no metadata associated
with that parameter.

HLR H16274 S20200
................................................................................
context C and parameter N.

HLR H16279 S20200
SQLite will call destructors for any metadata it is holding
in a particular [prepared statement] S when either
[sqlite3_reset(S)] or [sqlite3_finalize(S)] is called.






HLR H16351 S30220
The [sqlite3_soft_heap_limit(N)] interface places a soft limit
of N bytes on the amount of heap memory that may be allocated
using [sqlite3_malloc()] or [sqlite3_realloc()] at any point
in time.

HLR H16352 S30220
................................................................................
HLR H16355 S30220
The default value for the soft heap limit is zero.

HLR H16358 S30220
Each call to [sqlite3_soft_heap_limit(N)] overrides the
values set by all prior calls.























HLR H16403 S20200
The default return value from any SQL function is NULL.

HLR H16406 S20200
The [sqlite3_result_blob(C,V,N,D)] interface changes the
return value of function C to be a BLOB that is N bytes
in length and with content pointed to by V.
................................................................................
[sqlite3_result_text(C,V,N,D)], [sqlite3_result_text16(C,V,N,D)],
[sqlite3_result_text16be(C,V,N,D)], or
[sqlite3_result_text16le(C,V,N,D)] is some value other than
the constants [SQLITE_STATIC] and [SQLITE_TRANSIENT] then
SQLite will invoke the destructor D with V as its only argument
when it has finished with the V value.





























HLR H16603 S20300
A successful call to the
[sqlite3_create_collation_v2(B,X,E,P,F,D)] interface
registers function F as the comparison function used to
implement collation X on the [database connection] B for
databases having encoding E.

................................................................................

HLR H16630 S20300
When multiple comparison functions are available for the same
collating sequence, SQLite chooses the one whose text encoding
requires the least amount of conversion from the default
text encoding of the database.

















HLR H16702 S20300
A successful call to [sqlite3_collation_needed(D,P,F)]
or [sqlite3_collation_needed16(D,P,F)] causes
the [database connection] D to invoke callback F with first
parameter P whenever it needs a comparison function for a
collating sequence that it does not know about.

................................................................................
HLR H16706 S20300
The name of the requested collating function passed in the
4th parameter to the callback is in UTF-8 if the callback
was registered using [sqlite3_collation_needed()] and
is in UTF-16 native byte order if the callback was
registered using [sqlite3_collation_needed16()].

































































































HLR H17303 S20000
The [sqlite3_malloc(N)] interface returns either a pointer to
a newly checked-out block of at least N bytes of memory
that is 8-byte aligned, or it returns NULL if it is unable
to fulfill the request.

HLR H17304 S20000
................................................................................
When [sqlite3_realloc(P,N)] returns a non-NULL pointer, it first
releases the buffer P.

HLR H17323 S20000
When [sqlite3_realloc(P,N)] returns NULL, the buffer P is
not modified or released.








HLR H17341 S30220
The [sqlite3_release_memory(N)] interface attempts to
free N bytes of heap memory by deallocating non-essential
memory allocations held by the database library.

HLR H17342 S30220
The [sqlite3_release_memory(N)] returns the number
of bytes actually freed, which might be more or less
than the amount requested.











HLR H17371 S30210
The [sqlite3_memory_used()] routine returns the number of bytes
of memory currently outstanding (malloced but not freed).

HLR H17373 S30210
The [sqlite3_memory_highwater()] routine returns the maximum
................................................................................
HLR H17375 S30210
The memory high-water mark is reset to the current value of
[sqlite3_memory_used()] if and only if the parameter to
[sqlite3_memory_highwater()] is true.  The value returned
by [sqlite3_memory_highwater(1)] is the high-water mark
prior to the reset.








HLR H17392 S20000
The [sqlite3_randomness(N,P)] interface writes N bytes of
high-quality pseudo-randomness into buffer P.










HLR H17403 S70000
The [sqlite3_mprintf()] and [sqlite3_vmprintf()] interfaces
return either pointers to zero-terminated UTF-8 strings held in
memory obtained from [sqlite3_malloc()] or NULL pointers if
a call to [sqlite3_malloc()] fails.

HLR H17406 S70000
................................................................................
HLR H17407 S70000
The [sqlite3_snprintf()] interface does not write slots of
its output buffer (the second parameter) outside the range
of 0 through N-1 (where N is the first parameter)
regardless of the length of the string
requested by the format specification.




















































HLR H17813 S30230
A successful invocation of the [sqlite3_blob_open(D,B,T,C,R,F,P)]
interface shall open an [sqlite3_blob] object P on the BLOB
in column C of the table T in the database B on
the [database connection] D.

HLR H17814 S30230
................................................................................

HLR H17824 S30230
If any column in the row that a [sqlite3_blob] has open is
changed by a separate [UPDATE] or [DELETE] statement or by
an [ON CONFLICT] side effect, then the [sqlite3_blob] shall
be marked as invalid.








HLR H17833 S30230
The [sqlite3_blob_close(P)] interface closes an [sqlite3_blob]
object P previously opened using [sqlite3_blob_open()].

HLR H17836 S30230
Closing an [sqlite3_blob] object using
[sqlite3_blob_close()] shall cause the current transaction to
................................................................................
the database connection is in [autocommit mode].

HLR H17839 S30230
The [sqlite3_blob_close(P)] interfaces shall close the
[sqlite3_blob] object P unconditionally, even if
[sqlite3_blob_close(P)] returns something other than [SQLITE_OK].








HLR H17843 S30230
The [sqlite3_blob_bytes(P)] interface returns the size
in bytes of the BLOB that the [sqlite3_blob] object P
refers to.








HLR H17853 S30230
A successful invocation of [sqlite3_blob_read(P,Z,N,X)]
shall reads N bytes of data out of the BLOB referenced by
[BLOB handle] P beginning at offset X and store those bytes
into buffer Z.

HLR H17856 S30230
................................................................................
If an error occurs during evaluation of [sqlite3_blob_read(P,...)]
then subsequent calls to [sqlite3_errcode(D)],
[sqlite3_extended_errcode()],
[sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] shall return
information appropriate for that error, where D is the
[database connection] that was used to open the [BLOB handle] P.








HLR H17873 S30230
A successful invocation of [sqlite3_blob_write(P,Z,N,X)]
shall write N bytes of data from buffer Z into the BLOB
referenced by [BLOB handle] P beginning at offset X into
the BLOB.

HLR H17874 S30230
................................................................................

HLR H17888 S30230
If an error occurs during evaluation of [sqlite3_blob_write(D,...)]
then subsequent calls to [sqlite3_errcode(D)],
[sqlite3_extended_errcode()],
[sqlite3_errmsg(D)], and [sqlite3_errmsg16(D)] shall return
information appropriate for that error.