What you have written below seems correct to me. If you're thinking of
modifying source files to add the capability to the tcl interface, this
is what I think:

* You won't need to modify anything other than the "tclsqlite.c" file.
  Don't add a pragma. Instead add a tcl command to set the "null string".

* Store the "null string" as part of the SqliteDb struct in tclsqlite.c.

* Add a case to the switch statement "switch( sqlite3_column_type(pStmt, i) ){"
  that is on line 956 of tclsqlite.c in the 3.2.0 source.

Dan.


--- Stefan Finzel <[EMAIL PROTECTED]> wrote:
> 
> Although Tcl does not know NULL at all, sqlite does. From my current 
> unterstanding there are five different  fundamental internal datatypes. 
> One of them is  SQLITE_NULL. But SQLITE_NULL is not used at all while 
> iterating over the results of
> 
> dbcmd eval "SELECT ..."
> 
>  From my current unterstanding the result of the query is still a C 
> array during this iteration within DbObjCmd and than gets converted to 
> Tcl objects. So it should be simple to extend to use SQLITE_NULL  and 
> return a predefined value e.g. if a special PRAGMA is set.  In the 
> moment i am to tired to figure out of whether there is an already usable 
> relation to  combine it with the sqlite shells .nullvalue command.
> 
> It's the first time i've looked in the sqlite code base. Maybe i am wrong.
> 
> Is there any experience?
> 
> TIA



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

Reply via email to