From: jplyon Date: Sun, 4 May 2003 07:31:09 +0000 (+0000) Subject: Added shell command ".databases" to list name and file of open ones. X-Git-Tag: version-3.6.10~5114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5640433e48498d80392256aa1f6930f0f570f579;p=thirdparty%2Fsqlite.git Added shell command ".databases" to list name and file of open ones. Added several missing shell commands. (CVS 954) FossilOrigin-Name: dd57d6ae6a247824e44a6073bc7e73ecb3c500fd --- diff --git a/manifest b/manifest index 58bc89bf2e..1c0bb018fa 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C added\sshell\scommand\s".databases"\sto\slist\sname\sand\sfile\sof\sopen\sones.\s(CVS\s953) -D 2003-05-04T07:25:58 +C Added\sshell\scommand\s".databases"\sto\slist\sname\sand\sfile\sof\sopen\sones.\nAdded\sseveral\smissing\sshell\scommands.\s(CVS\s954) +D 2003-05-04T07:31:10 F Makefile.in 004acec253ecdde985c8ecd5b7c9accdb210378f F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd @@ -162,10 +162,10 @@ F www/omitted.tcl 118062f40a203fcb88b8d68ef1d7c0073ac191ec F www/opcode.tcl 33c5f2061a05c5d227c72b84c080b3bf74c74f8b F www/quickstart.tcl 4e97bef825e6a4153c43afb9f97235fc4da278ab F www/speed.tcl cb4c10a722614aea76d2c51f32ee43400d5951be -F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098 +F www/sqlite.tcl ffde644361e1d8e2a44a235ff23ad3b43d640df2 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218 -P 87e1b6a936972670771cf90670aeb4308ba0a30a -R 5320898e74f5e804dcf5efe20f5cd8de +P 741a5a8d3975fb5db18914b7879b12aead59279b +R dd130a1f7dd3e8a6528c790b087edc44 U jplyon -Z 6095dc4d8b2b48d4029c4d0dd1f58135 +Z 8e9e207bfa04e253d2be1e2c73c48742 diff --git a/manifest.uuid b/manifest.uuid index edc44f36f7..f23493adb5 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -741a5a8d3975fb5db18914b7879b12aead59279b \ No newline at end of file +dd57d6ae6a247824e44a6073bc7e73ecb3c500fd \ No newline at end of file diff --git a/www/sqlite.tcl b/www/sqlite.tcl index 9e5974ccc7..e8b82750d4 100644 --- a/www/sqlite.tcl +++ b/www/sqlite.tcl @@ -1,7 +1,7 @@ # # Run this Tcl script to generate the sqlite.html file. # -set rcsid {$Id: sqlite.tcl,v 1.18 2002/06/27 13:21:02 drh Exp $} +set rcsid {$Id: sqlite.tcl,v 1.19 2003/05/04 07:31:10 jplyon Exp $} puts { @@ -143,19 +143,27 @@ at any time. For example: Code { sqlite> (((.help))) -.dump Dump database in a text format +.databases List names and files of attached databases +.dump ?TABLE? ... Dump the database in a text format +.echo ON|OFF Turn command echo on or off .exit Exit this program -.explain Set output mode suitable for EXPLAIN -.header ON|OFF Turn display of headers on or off +.explain ON|OFF Turn output mode suitable for EXPLAIN on or off. +.header(s) ON|OFF Turn display of headers on or off .help Show this message .indices TABLE Show names of all indices on TABLE -.mode MODE Set mode to one of "line", "column", "list", or "html" +.mode MODE Set mode to one of "line(s)", "column(s)", + "insert", "list", or "html" .mode insert TABLE Generate SQL insert statements for TABLE +.nullvalue STRING Print STRING instead of nothing for NULL data .output FILENAME Send output to FILENAME .output stdout Send output to the screen +.prompt MAIN CONTINUE Replace the standard prompts +.quit Exit this program +.read FILENAME Execute SQL in FILENAME .schema ?TABLE? Show the CREATE statements .separator STRING Change separator string for "list" mode -.tables List names all tables in the database +.show Show the current values for various settings +.tables ?PATTERN? List names of tables matching a pattern .timeout MS Try opening locked tables for MS milliseconds .width NUM NUM ... Set column widths for "column" mode sqlite> @@ -422,6 +430,19 @@ appended and prepended and a LIKE clause is added to the query. This allows you to list only those tables that match a particular pattern.

+

The ".databases" command shows a list of all databases open in +the current connection. There will always be at least 2. The first +one is "main", the original database opened. The second is "temp", +the database used for temporary tables. There may be additional +databases listed for databases attached using the ATTACH statement. +The first output column is the name the database is attached with, +and the second column is the filename of the external file.

} + +Code { +sqlite> (((.databases))) +} + +puts {

Converting An Entire Database To An ASCII Text File

Use the ".dump" command to convert the entire contents of a