#
LIBOBJ = build.o dbbe.o delete.o expr.o insert.o \
main.o parse.o select.o tokenize.o update.o \
- util.o vdbe.o where.o
+ util.o vdbe.o where.o tclsqlite.o
# All of the source code files.
#
update.o: $(TOP)/src/update.c $(HDR)
$(TCC) $(GDBM_FLAGS) -c $(TOP)/src/update.c
+tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR)
+ $(TCC) $(GDBM_FLAGS) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
+
gdbmdump: $(TOP)/tool/gdbmdump.c
$(TCC) $(GDBM_FLAGS) -o gdbmdump $(TOP)/tool/gdbmdump.c $(LIBGDBM)
# The following RCS revision string applies to configure.in
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#########
# Make sure we are not building in a subdirectory of the source tree.
fi
done
fi
+if test "$found" = "no"; then
+ TARGET_TCL_INC="-DNO_TCL=1"
+fi
##########
LIBS=""
echo $ac_n "checking for library containing gdbm_open""... $ac_c" 1>&6
-echo "configure:1391: checking for library containing gdbm_open" >&5
+echo "configure:1394: checking for library containing gdbm_open" >&5
if eval "test \"`echo '$''{'ac_cv_search_gdbm_open'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_gdbm_open="no"
cat > conftest.$ac_ext <<EOF
-#line 1398 "configure"
+#line 1401 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gdbm_open()
; return 0; }
EOF
-if { (eval echo configure:1409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gdbm_open="none required"
else
test "$ac_cv_search_gdbm_open" = "no" && for i in gdbm; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1420 "configure"
+#line 1423 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
gdbm_open()
; return 0; }
EOF
-if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_gdbm_open="-l$i"
break
# Figure out where to get the GDBM header files.
#
echo $ac_n "checking GDBM header files""... $ac_c" 1>&6
-echo "configure:1459: checking GDBM header files" >&5
+echo "configure:1462: checking GDBM header files" >&5
found=no
if test "$config_TARGET_GDBM_INC" != ""; then
TARGET_GDBM_INC=$config_TARGET_GDBM_INC
echo "$ac_t""not specified: still searching..." 1>&6
ac_safe=`echo "gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for gdbm.h""... $ac_c" 1>&6
-echo "configure:1471: checking for gdbm.h" >&5
+echo "configure:1474: checking for gdbm.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1476 "configure"
+#line 1479 "configure"
#include "confdefs.h"
#include <gdbm.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_safe=`echo "$dir/include/gdbm.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/gdbm.h""... $ac_c" 1>&6
-echo "configure:1508: checking for $dir/include/gdbm.h" >&5
+echo "configure:1511: checking for $dir/include/gdbm.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
LIBS=""
echo $ac_n "checking for library containing readline""... $ac_c" 1>&6
-echo "configure:1549: checking for library containing readline" >&5
+echo "configure:1552: checking for library containing readline" >&5
if eval "test \"`echo '$''{'ac_cv_search_readline'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_func_search_save_LIBS="$LIBS"
ac_cv_search_readline="no"
cat > conftest.$ac_ext <<EOF
-#line 1556 "configure"
+#line 1559 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
readline()
; return 0; }
EOF
-if { (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_readline="none required"
else
test "$ac_cv_search_readline" = "no" && for i in readline; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1578 "configure"
+#line 1581 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
readline()
; return 0; }
EOF
-if { (eval echo configure:1589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_search_readline="-l$i"
break
# Figure out where to get the READLINE header files.
#
echo $ac_n "checking readline header files""... $ac_c" 1>&6
-echo "configure:1617: checking readline header files" >&5
+echo "configure:1620: checking readline header files" >&5
found=no
if test "$config_TARGET_READLINE_INC" != ""; then
TARGET_READLINE_INC=$config_TARGET_READLINE_INC
echo "$ac_t""not specified: still searching..." 1>&6
ac_safe=`echo "readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for readline.h""... $ac_c" 1>&6
-echo "configure:1629: checking for readline.h" >&5
+echo "configure:1632: checking for readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1634 "configure"
+#line 1637 "configure"
#include "confdefs.h"
#include <readline.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
ac_safe=`echo "$dir/include/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/readline.h""... $ac_c" 1>&6
-echo "configure:1666: checking for $dir/include/readline.h" >&5
+echo "configure:1669: checking for $dir/include/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_safe=`echo "$dir/include/readline/readline.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $dir/include/readline/readline.h""... $ac_c" 1>&6
-echo "configure:1695: checking for $dir/include/readline/readline.h" >&5
+echo "configure:1698: checking for $dir/include/readline/readline.h" >&5
if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Figure out whether or not we have a "usleep()" function.
#
echo $ac_n "checking for usleep""... $ac_c" 1>&6
-echo "configure:1739: checking for usleep" >&5
+echo "configure:1742: checking for usleep" >&5
if eval "test \"`echo '$''{'ac_cv_func_usleep'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1744 "configure"
+#line 1747 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char usleep(); below. */
; return 0; }
EOF
-if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_usleep=yes"
else
dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
-# $Revision: 1.6 $
+# $Revision: 1.7 $
#########
# Make sure we are not building in a subdirectory of the source tree.
fi
done
fi
+if test "$found" = "no"; then
+ TARGET_TCL_INC="-DNO_TCL=1"
+fi
AC_SUBST(TARGET_TCL_INC)
##########
-C Version\s1.0.5\s(CVS\s495)
-D 2000-09-14T01:25:00
+C Obj-ify\stclsqlite\s(CVS\s146)
+D 2000-09-21T13:01:36
F COPYRIGHT 74a8a6531a42e124df07ab5599aad63870fa0bd4
-F Makefile.in 036bce328b963f48dbaadbec8cc4144a1fd9e50a
+F Makefile.in e699d55492bcfe06ab93e2d3f86da4705d45692c
F README 51f6a4e7408b34afa5bc1c0485f61b6a4efb6958
F VERSION 4edef6ec60a55c61b01fc0abebbf5a2f67c4f0e7
-F configure 078a370347baf9375baa8053857ca1e6bc84afa7 x
-F configure.in 381aeb4564f1562b7b2a115f5e99035c561a7fea
+F configure bc917320fcc6d8a1a5154737304763acb5f7f68c x
+F configure.in ae915ce37ff010e8aac34b90b9136d4a32659bdb
F doc/lemon.html e233a3e97a779c7a87e1bc4528c664a58e49dd47
F src/build.c 4d90e9e94750ca80249fc7958c617021d8bb7a50
F src/dbbe.c 226daaf8c095ceb4aff48cad188dad90643f9867
F src/shell.tcl 27ecbd63dd88396ad16d81ab44f73e6c0ea9d20e
F src/sqlite.h.in d341439fc1432c7d7014bcff5f7b6e914571232c
F src/sqliteInt.h b65fdecac7281aafb4c9ff3e79ea1b5546478385
-F src/tclsqlite.c 89dc4ba2b521f3e919d6d7aaa4cc1c2aba8e16f3
+F src/tclsqlite.c a08428125ba2429b71764d5365653771ded4a2b8
F src/tokenize.c 097bec5843d4a0fb4509e036fee93bac080c5e73
F src/update.c 51b9ef7434b15e31096155da920302e9db0d27fc
F src/util.c 782f87af3c48c898631a2d5b7074437c899f6f13
F test/sort.test d582086c4bb7df3fbf50aa72e69d7e235e9f8e31
F test/subselect.test bf8b251a92fb091973c1c469ce499dc9648a41d5
F test/table.test 620cd72a6c29da3b9153d15c9e94abbbb282373b
-F test/tester.tcl 95b286791e6256bb6db0165f9342c70fff549a62
+F test/tester.tcl ad57d7e8114b0691eb5e943b9dabbd68119b8e2c
F test/update.test 62f6ce99ff31756aab0ca832ff6d34c5a87b6250
F test/vacuum.test 8becf5cfeb897108b35cdd996793e7f1df2f28fd
F test/where.test bbab5a308055fb6087dc23d600b4ad2b72797397
F www/arch.png c4d908b79065a72e7dcf19317f36d1324c550e87
F www/arch.tcl 4f6a9afecc099a27bba17b4f8cc9561abc15dc40
F www/c_interface.tcl 1b79e404a0dd46f44cd453a44b01df568c9586d1
-F www/changes.tcl 8ac23210e8cef43b77041f01b439a6ff3d1554fc
+F www/changes.tcl 5f047e9e0154cf1b800e626e635c4334420ddb9b
F www/crosscompile.tcl 19734ce7f18b16ff2ed8479412abf8aca56e1dcc
F www/fileformat.tcl cfb7fba80b7275555281ba2f256c00734bcdd1c9
F www/index.tcl 2f5cc070b8fa8c3fc2f71bba4e6b7877d528fbde
F www/opcode.tcl cb3a1abf8b7b9be9f3a228d097d6bf8b742c2b6f
F www/sqlite.tcl cb0d23d8f061a80543928755ec7775da6e4f362f
F www/vdbe.tcl bcbfc33bcdd0ebad95eab31286adb9e1bc289520
-P ea0e32828f5643eeb00b216a287d14f4826ddf2d
-R d838e77add09f4d92cf328c578007f7b
+P 84839d8764ecdfac4d8c56618d9c107c8bbf65ab
+R c08eefda2a9f502c4bc4de062c9d0908
U drh
-Z de8fe72d201ddf752c7db67bb8650632
+Z 23e467b7f382bfed639e5b43f4e92064
-84839d8764ecdfac4d8c56618d9c107c8bbf65ab
\ No newline at end of file
+85a4254ef0998fac06ddc285decd79345968fee1
\ No newline at end of file
*************************************************************************
** A TCL Interface to SQLite
**
-** $Id: tclsqlite.c,v 1.8 2000/08/17 09:50:00 drh Exp $
+** $Id: tclsqlite.c,v 1.9 2000/09/21 13:01:37 drh Exp $
*/
+#ifndef NO_TCL /* Omit this whole file if TCL is unavailable */
+
#include "sqlite.h"
#include <tcl.h>
#include <stdlib.h>
struct SqliteDb {
sqlite *db; /* The "real" database structure */
Tcl_Interp *interp; /* The interpreter used for this database */
- char *zBusy; /* The name of the busy callback routine */
+ char *zBusy; /* The busy callback routine */
};
/*
struct CallbackData {
Tcl_Interp *interp; /* The TCL interpreter */
char *zArray; /* The array into which data is written */
- char *zCode; /* The code to execute for each row */
+ Tcl_Obj *pCode; /* The code to execute for each row */
int once; /* Set only for the first invocation of callback */
};
}
}
cbData->once = 0;
- rc = Tcl_Eval(cbData->interp, cbData->zCode);
+ rc = Tcl_EvalObj(cbData->interp, cbData->pCode);
return rc;
}
+/*
+** This is an alternative callback for database queries. Instead
+** of invoking a TCL script to handle the result, this callback just
+** appends each column of the result to a list. After the query
+** is complete, the list is returned.
+*/
+static int DbEvalCallback2(
+ void *clientData, /* An instance of CallbackData */
+ int nCol, /* Number of columns in the result */
+ char ** azCol, /* Data for each column */
+ char ** azN /* Name for each column */
+){
+ Tcl_Obj *pList = (Tcl_Obj*)clientData;
+ int i;
+ for(i=0; i<nCol; i++){
+ Tcl_Obj *pElem;
+ if( azCol[i] && *azCol[i] ){
+ pElem = Tcl_NewStringObj(azCol[i], -1);
+ }else{
+ pElem = Tcl_NewObj();
+ }
+ Tcl_ListObjAppendElement(0, pList, pElem);
+ }
+ return 0;
+}
+
/*
** Called when the command is deleted.
*/
** and calls that connection "db1". The second command causes this
** subroutine to be invoked.
*/
-static int DbCmd(void *cd, Tcl_Interp *interp, int argc, char **argv){
- char *z;
- int n, c;
+static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
SqliteDb *pDb = (SqliteDb*)cd;
- if( argc<2 ){
- Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0],
- " SUBCOMMAND ...\"", 0);
+ int choice;
+ static char *DB_optStrs[] = {
+ "busy", "close", "complete", "eval", "timeout"
+ };
+ enum DB_opts {
+ DB_BUSY, DB_CLOSE, DB_COMPLETE, DB_EVAL, DB_TIMEOUT
+ };
+
+ if( objc<2 ){
+ Tcl_WrongNumArgs(interp, 1, objv, "SUBCOMMAND ...");
+ return TCL_ERROR;
+ }
+ if( Tcl_GetIndexFromObj(interp, objv[1], DB_optStrs, "option", 0, &choice) ){
return TCL_ERROR;
}
- z = argv[1];
- n = strlen(z);
- c = z[0];
+
+ switch( (enum DB_opts)choice ){
/* $db busy ?CALLBACK?
**
** Invoke the given callback if an SQL statement attempts to open
** a locked database file.
*/
- if( c=='b' && strncmp(z,"busy",n)==0 ){
- if( argc>3 ){
- Tcl_AppendResult(interp,"wrong # args: should be \"",
- argv[0], " busy ?CALLBACK?", 0);
+ case DB_BUSY: {
+ if( objc>3 ){
+ Tcl_WrongNumArgs(interp, 2, objv, "CALLBACK");
return TCL_ERROR;
- }else if( argc==2 ){
+ }else if( objc==2 ){
if( pDb->zBusy ){
Tcl_AppendResult(interp, pDb->zBusy, 0);
}
}else{
+ char *zBusy;
+ int len;
if( pDb->zBusy ){
Tcl_Free(pDb->zBusy);
- pDb->zBusy = 0;
}
- if( argv[2][0] ){
- pDb->zBusy = Tcl_Alloc( strlen(argv[2]) + 1 );
- if( pDb->zBusy ){
- strcpy(pDb->zBusy, argv[2]);
- }
+ zBusy = Tcl_GetStringFromObj(objv[2], &len);
+ if( zBusy && len>0 ){
+ pDb->zBusy = Tcl_Alloc( len + 1 );
+ strcpy(pDb->zBusy, zBusy);
+ }else{
+ pDb->zBusy = 0;
}
if( pDb->zBusy ){
pDb->interp = interp;
sqlite_busy_handler(pDb->db, DbBusyHandler, pDb);
+ }else{
+ sqlite_busy_handler(pDb->db, 0, 0);
}
}
- }else
+ break;
+ }
/* $db close
**
** Shutdown the database
*/
- if( c=='c' && n>=2 && strncmp(z,"close",n)==0 ){
- Tcl_DeleteCommand(interp, argv[0]);
- }else
+ case DB_CLOSE: {
+ Tcl_DeleteCommand(interp, Tcl_GetStringFromObj(objv[0], 0));
+ break;
+ }
/* $db complete SQL
**
** additional lines of input are needed. This is similar to the
** built-in "info complete" command of Tcl.
*/
- if( c=='c' && n>=2 && strncmp(z,"complete",n)==0 ){
- char *zRes;
- if( argc!=3 ){
- Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0],
- " complete SQL\"", 0);
+ case DB_COMPLETE: {
+ Tcl_Obj *pResult;
+ int isComplete;
+ if( objc!=3 ){
+ Tcl_WrongNumArgs(interp, 2, objv, "SQL");
return TCL_ERROR;
}
- zRes = sqlite_complete(argv[2]) ? "1" : "0";
- Tcl_SetResult(interp, zRes, TCL_VOLATILE);
- }else
+ isComplete = sqlite_complete( Tcl_GetStringFromObj(objv[2], 0) );
+ pResult = Tcl_GetObjResult(interp);
+ Tcl_SetBooleanObj(pResult, isComplete);
+ break;
+ }
/*
** $db eval $sql ?array { ...code... }?
** If "array" is an empty string, then the values are placed in variables
** that have the same name as the fields extracted by the query.
*/
- if( c=='e' && strncmp(z,"eval",n)==0 ){
+ case DB_EVAL: {
CallbackData cbData;
char *zErrMsg;
+ char *zSql;
int rc;
- if( argc!=5 && argc!=3 ){
- Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0],
- " eval SQL ?ARRAY-NAME CODE?", 0);
+ if( objc!=5 && objc!=3 ){
+ Tcl_WrongNumArgs(interp, 2, objv, "SQL ?ARRAY-NAME CODE?");
return TCL_ERROR;
}
pDb->interp = interp;
- if( argc==5 ){
+ zSql = Tcl_GetStringFromObj(objv[2], 0);
+ Tcl_IncrRefCount(objv[2]);
+ if( objc==5 ){
cbData.interp = interp;
cbData.once = 1;
- cbData.zArray = argv[3];
- cbData.zCode = argv[4];
+ cbData.zArray = Tcl_GetStringFromObj(objv[3], 0);
+ cbData.pCode = objv[4];
zErrMsg = 0;
- rc = sqlite_exec(pDb->db, argv[2], DbEvalCallback, &cbData, &zErrMsg);
+ Tcl_IncrRefCount(objv[3]);
+ Tcl_IncrRefCount(objv[4]);
+ rc = sqlite_exec(pDb->db, zSql, DbEvalCallback, &cbData, &zErrMsg);
+ Tcl_DecrRefCount(objv[4]);
+ Tcl_DecrRefCount(objv[3]);
}else{
- rc = sqlite_exec(pDb->db, argv[2], 0, 0, &zErrMsg);
+ Tcl_Obj *pList = Tcl_NewObj();
+ rc = sqlite_exec(pDb->db, zSql, DbEvalCallback2, pList, &zErrMsg);
+ Tcl_SetObjResult(interp, pList);
}
if( zErrMsg ){
Tcl_SetResult(interp, zErrMsg, TCL_VOLATILE);
free(zErrMsg);
}
+ Tcl_DecrRefCount(objv[2]);
return rc;
- }else
+ }
/*
** $db timeout MILLESECONDS
**
** Delay for the number of milliseconds specified when a file is locked.
*/
- if( c=='t' && strncmp(z,"timeout",n)==0 ){
+ case DB_TIMEOUT: {
int ms;
- if( argc!=3 ){
- Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0],
- " timeout MILLISECONDS", 0);
+ if( objc!=3 ){
+ Tcl_WrongNumArgs(interp, 2, objv, "MILLISECONDS");
return TCL_ERROR;
}
- if( Tcl_GetInt(interp, argv[2], &ms) ) return TCL_ERROR;
+ if( Tcl_GetIntFromObj(interp, objv[2], &ms) ) return TCL_ERROR;
sqlite_busy_timeout(pDb->db, ms);
- }else
-
- /* The default
- */
- {
- Tcl_AppendResult(interp,"unknown subcommand \"", z,
- "\" - should be one of: close complete eval", 0);
- return TCL_ERROR;
+ break;
}
+ } /* End of the SWITCH statement */
return TCL_OK;
}
free(zErrMsg);
return TCL_ERROR;
}
- Tcl_CreateCommand(interp, argv[1], DbCmd, (char*)p, DbDeleteCmd);
+ Tcl_CreateObjCommand(interp, argv[1], DbObjCmd, (char*)p, DbDeleteCmd);
return TCL_OK;
}
return 0;
}
#endif /* TCLSH */
+
+#endif /* !defined(NO_TCL) */
# This file implements some common TCL routines used for regression
# testing the SQLite library
#
-# $Id: tester.tcl,v 1.5 2000/06/08 13:36:41 drh Exp $
+# $Id: tester.tcl,v 1.6 2000/09/21 13:01:37 drh Exp $
# Create a test database
#
# A procedure to execute SQL
#
proc execsql {sql} {
- set result {}
- db eval $sql data {
- foreach f $data(*) {
- lappend result $data($f)
- }
- }
- return $result
+ return [db eval $sql]
}
# Another procedure to execute SQL. This one includes the field
puts "<DD><P><UL>$desc</UL></P></DD>"
}
+chng {2000 Sep 21 (Not Released)} {
+<li>Change the tclsqlite "eval" method to return a list of results if
+ no callback script is specified.</li>
+<li>Change tclsqlite.c to use the Tcl_Obj interface</li>
+<li>Add tclsqlite.c to the libsqlite.a library</li>
+}
+
chng {2000 Sep 13 (Version 1.0.5)} {
<li>Changed the print format for floating point values from "%g" to "%.15g".
</li>