diff options
author | drh <drh@noemail.net> | 2002-11-04 19:32:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2002-11-04 19:32:25 +0000 |
commit | 647cb0e159cfe8a42691bd29a8e1820efa1a171c (patch) | |
tree | 59d259d53524a7e79d67f7a0cb0765b153de0e2b /src/tclsqlite.c | |
parent | 7bc09d3111dbea26be4d894d72b9eb63d5d2bf07 (diff) | |
download | sqlite-647cb0e159cfe8a42691bd29a8e1820efa1a171c.tar.gz sqlite-647cb0e159cfe8a42691bd29a8e1820efa1a171c.zip |
Add the sqlite_version() SQL function as a built-in. (CVS 777)
FossilOrigin-Name: 7c8c0e7633dca00bde7bc7c22075f688c034c200
Diffstat (limited to 'src/tclsqlite.c')
-rw-r--r-- | src/tclsqlite.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c index 9037bdac6..2326f7533 100644 --- a/src/tclsqlite.c +++ b/src/tclsqlite.c @@ -11,7 +11,7 @@ ************************************************************************* ** A TCL Interface to SQLite ** -** $Id: tclsqlite.c,v 1.42 2002/09/14 13:47:32 drh Exp $ +** $Id: tclsqlite.c,v 1.43 2002/11/04 19:32:26 drh Exp $ */ #ifndef NO_TCL /* Omit this whole file if TCL is unavailable */ @@ -623,6 +623,10 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){ ** Return the encoding used by LIKE and GLOB operators. Choices ** are UTF-8 and iso8859. ** +** sqlite -version +** +** Return the version number of the SQLite library. +** ** sqlite -tcl-uses-utf ** ** Return "1" if compiled with a Tcl uses UTF-8. Return "0" if @@ -639,6 +643,10 @@ static int DbMain(void *cd, Tcl_Interp *interp, int argc, char **argv){ Tcl_AppendResult(interp,sqlite_encoding,0); return TCL_OK; } + if( strcmp(argv[1],"-version")==0 ){ + Tcl_AppendResult(interp,sqlite_version,0); + return TCL_OK; + } if( strcmp(argv[1],"-tcl-uses-utf")==0 ){ #ifdef TCL_UTF_MAX Tcl_AppendResult(interp,"1",0); |