Documentation Source Text

Check-in [a94ea31acb]
Login

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

Overview
Comment:Fix introspection pragma documentation to show that they are now on by default. Add documentation for the TCL Interface config method.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a94ea31acb2252d37278b501f900e378f503a8a2ea5da9fe22a76634409035b4
User & Date: drh 2019-09-26 19:02:09.128
Context
2019-09-26
19:24
More documentation on how PRAGMA index_info and PRAGMA index_xinfo handle indexes on expressions. (check-in: d9d337b927 user: drh tags: trunk)
19:02
Fix introspection pragma documentation to show that they are now on by default. Add documentation for the TCL Interface config method. (check-in: a94ea31acb user: drh tags: trunk)
15:24
Adjustments to the document indexes. (check-in: ede6ba1df3 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to pages/changes.in.
33
34
35
36
37
38
39




40



41
42
43
44
45
46
47
<li> Improvements to the [.recover dot-command] in the [CLI] so that
     it recovers more content from corrupt database files.
<li> Enhance the [RBU] extension to support [indexes on expressions].
<li> Change the schema parser so that it will error out if any of
     the type, name, and tbl_name columns of the [sqlite_master table]
     have been corrupted and the database connection is not in
     [writable_schema] mode.




<li> Add the [SQLITE_DBCONFIG_ENABLE_VIEW] option for [sqlite3_db_config()].



<li> Added the [SQLITE_DIRECTONLY] flag for
     [application-defined SQL functions] to prevent those functions from
     being used inside triggers and views.
<li> The legacy [SQLITE_ENABLE_STAT3] compile-time option is now a no-op.
}

chng {2019-07-10 (3.29.0)} {







>
>
>
>

>
>
>







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<li> Improvements to the [.recover dot-command] in the [CLI] so that
     it recovers more content from corrupt database files.
<li> Enhance the [RBU] extension to support [indexes on expressions].
<li> Change the schema parser so that it will error out if any of
     the type, name, and tbl_name columns of the [sqlite_master table]
     have been corrupted and the database connection is not in
     [writable_schema] mode.
<li> The [PRAGMA function_list], [PRAGMA module_list], and
     [PRAGMA pragma_list] commands are now
     enabled in all builds by default.  Disable them using
     [-DSQLITE_OMIT_INTROSPECTION_PRAGMAS].
<li> Add the [SQLITE_DBCONFIG_ENABLE_VIEW] option for [sqlite3_db_config()].
<li> Added the [TCL Interface] [config method] in order to be able to
     disable [SQLITE_DBCONFIG_ENABLE_VIEW] as well as control other
     [sqlite3_db_config()] options from TCL.
<li> Added the [SQLITE_DIRECTONLY] flag for
     [application-defined SQL functions] to prevent those functions from
     being used inside triggers and views.
<li> The legacy [SQLITE_ENABLE_STAT3] compile-time option is now a no-op.
}

chng {2019-07-10 (3.29.0)} {
Changes to pages/compile.in.
1242
1243
1244
1245
1246
1247
1248

1249
1250
1251

1252
1253
1254
1255
1256
1257
1258
  This option enables the [sqlite3_unlock_notify()] interface and
  its associated functionality.  See the documentation titled
  [Using the SQLite Unlock Notification Feature] for additional
  information.
}

COMPILE_OPTION {SQLITE_INTROSPECTION_PRAGMAS} {

  This option adds some extra PRAGMA statements such as
  [PRAGMA function_list], [PRAGMA module_list], and
  [PRAGMA pragma_list].

}

COMPILE_OPTION {SQLITE_SOUNDEX} {
  This option enables the [soundex() SQL function].
}

COMPILE_OPTION {SQLITE_USE_ALLOCA} {







>
|

|
>







1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
  This option enables the [sqlite3_unlock_notify()] interface and
  its associated functionality.  See the documentation titled
  [Using the SQLite Unlock Notification Feature] for additional
  information.
}

COMPILE_OPTION {SQLITE_INTROSPECTION_PRAGMAS} {
  This option is obsolete.  It used to enable some extra
  some extra PRAGMA statements such as
  [PRAGMA function_list], [PRAGMA module_list], and
  [PRAGMA pragma_list], but those pragmas are now all
  enabled by default.  See [SQLITE_OMIT_INTROSPECTION_PRAGMAS].
}

COMPILE_OPTION {SQLITE_SOUNDEX} {
  This option enables the [soundex() SQL function].
}

COMPILE_OPTION {SQLITE_USE_ALLOCA} {
1636
1637
1638
1639
1640
1641
1642







1643
1644
1645
1646
1647
1648
1649
  to be omitted.
}

COMPILE_OPTION {SQLITE_OMIT_INTEGRITY_CHECK} {
  This option omits support for the [integrity_check pragma].
}








COMPILE_OPTION {SQLITE_OMIT_LIKE_OPTIMIZATION} {
  This option disables the ability of SQLite to use indices to help
  resolve [LIKE] and [GLOB] operators in a WHERE clause.
}

COMPILE_OPTION {SQLITE_OMIT_LOAD_EXTENSION} {
  This option omits the entire extension loading mechanism from







>
>
>
>
>
>
>







1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
  to be omitted.
}

COMPILE_OPTION {SQLITE_OMIT_INTEGRITY_CHECK} {
  This option omits support for the [integrity_check pragma].
}


COMPILE_OPTION {SQLITE_OMIT_INTROSPECTION_PRAGMAS} {
  This option omits support for
  [PRAGMA function_list], [PRAGMA module_list], and
  [PRAGMA pragma_list].
}

COMPILE_OPTION {SQLITE_OMIT_LIKE_OPTIMIZATION} {
  This option disables the ability of SQLite to use indices to help
  resolve [LIKE] and [GLOB] operators in a WHERE clause.
}

COMPILE_OPTION {SQLITE_OMIT_LOAD_EXTENSION} {
  This option omits the entire extension loading mechanism from
Changes to pages/pragma.in.
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
    is off, then the [sqlite_master] table
    can be changed using ordinary [UPDATE], [INSERT], and [DELETE]
    statements.)^  ^<warning><b>Warning:</b>
    misuse of this pragma can easily result in
    a [cfgerrors|corrupt database file].</warning>
}

EnablePragma function_list {
    <p>^(<b>PRAGMA function_list;</b>
    <p>This pragma returns a list of SQL functions
    known to the database connection.)^

    DISCLAIMER
} SQLITE_INTROSPECTION_PRAGMAS	

EnablePragma pragma_list {
    <p>^(<b>PRAGMA pragma_list;</b>
    <p>This pragma returns a list of PRAGMA commands
    known to the database connection.)^

    DISCLAIMER
} SQLITE_INTROSPECTION_PRAGMAS

EnablePragma module_list {
    <p>^(<b>PRAGMA module_list;</b>
    <p>This pragma returns a list of 
    [virtual table] modules registered with the database connection.)^

    DISCLAIMER
} SQLITE_INTROSPECTION_PRAGMAS

Section {List Of PRAGMAs} {toc} {{pragma list}}
set lx {}
foreach prag [array names PragmaKeys] {
  set ref $PragmaRef($prag)
  if {[info exists PragmaLegacy($prag)]} {
    lappend lx [list "PRAGMA $ref" $prag 3]







|



|
<
<

|



|
<
<

|



|
<
<







1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847


1848
1849
1850
1851
1852
1853


1854
1855
1856
1857
1858
1859


1860
1861
1862
1863
1864
1865
1866
    is off, then the [sqlite_master] table
    can be changed using ordinary [UPDATE], [INSERT], and [DELETE]
    statements.)^  ^<warning><b>Warning:</b>
    misuse of this pragma can easily result in
    a [cfgerrors|corrupt database file].</warning>
}

Pragma function_list {
    <p>^(<b>PRAGMA function_list;</b>
    <p>This pragma returns a list of SQL functions
    known to the database connection.)^
}



Pragma pragma_list {
    <p>^(<b>PRAGMA pragma_list;</b>
    <p>This pragma returns a list of PRAGMA commands
    known to the database connection.)^
}



Pragma module_list {
    <p>^(<b>PRAGMA module_list;</b>
    <p>This pragma returns a list of 
    [virtual table] modules registered with the database connection.)^
}



Section {List Of PRAGMAs} {toc} {{pragma list}}
set lx {}
foreach prag [array names PragmaKeys] {
  set ref $PragmaRef($prag)
  if {[info exists PragmaLegacy($prag)]} {
    lappend lx [list "PRAGMA $ref" $prag 3]
Changes to pages/tclsqlite.in.
107
108
109
110
111
112
113

114
115
116
117
118
119
120
 authorizer
 backup
 bind_fallback
 busy
 cache
 changes
 close

 collate
 collation_needed
 commit_hook
 complete
 copy
 deserialize
 enable_load_extension







>







107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
 authorizer
 backup
 bind_fallback
 busy
 cache
 changes
 close
 config
 collate
 collation_needed
 commit_hook
 complete
 copy
 deserialize
 enable_load_extension
447
448
449
450
451
452
453






























454
455
456
457
458
459
460

<p>The "complete" method is useful when building interactive applications
in order to know when the user has finished entering a line of SQL code.
This is really just an interface to the 
<a href="c3ref/complete.html"><b>sqlite3_complete()</b></a> C
function.
}































##############################################################################
METHOD copy {

<p>
The "copy" method copies data from a file into a table.
It returns the number of rows processed successfully from the file.







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491

<p>The "complete" method is useful when building interactive applications
in order to know when the user has finished entering a line of SQL code.
This is really just an interface to the 
<a href="c3ref/complete.html"><b>sqlite3_complete()</b></a> C
function.
}

##############################################################################
METHOD config {

<p>
The "config" method queries or changes certain configuration settings for
the database connection using the [sqlite3_db_config()] interface.
Run this method with no arguments to get a TCL list of available
configuration settings and their current values:

<blockquote>
<i>dbcmd</i>&nbsp;&nbsp;<b>config</b>
</blockquote>

<p>The above will return something like this:

<blockquote>
enable_fkey 0 enable_trigger 1 enable_view 1 fts3_tokenizer 0 load_extension 0 no_ckpt_on_close 0 enable_qpsg 0 trigger_eqp 0 reset_database 0 defensive 0 writable_schema 0 legacy_alter_table 0 dqs_dml 1 dqs_ddl 1
</blockquote>

<p>Add the name of an individual configuration setting to query the current
value of that setting.  Optionally add a boolean value to change a setting.
For example, turn off support for the [double-quoted string literal]
misfeature like this:

<blockquote><pre>
db config dqs_dml 0
db config dqs_ddl 0
</pre></blockquote>
}

##############################################################################
METHOD copy {

<p>
The "copy" method copies data from a file into a table.
It returns the number of rows processed successfully from the file.