logo       

Re: Tcl-Interface: Nested db eval in db eval script?: msg#00185

db.sqlite.general

Subject: Re: Tcl-Interface: Nested db eval in db eval script?

yahoo-e4Esne7T6u9n68oJJulU0Q@xxxxxxxxxxxxxxxx wrote:
> The eval method of the sqlite Tcl Interface has the syntax:
>
> dbcmd eval sql ?array-name script?
>
> Is it allowed, to use other [dbcmd eval ..] calls (with the same
> dbcmd) inside the script? For example
>
> db1 eval {SELECT a,b FROM t1} {} {
> puts $b
> db1 eval "SELECT c,d FROM t2 WHERE c='$a'" {} {
> puts "\t$d"
> }
> }
>
> I've tried it. At least with read-only access inside the script, this
> seems to work. But I thought, it's better, to ask. Is this allowed?
> Are there limits or problems with that (if ever)?
>

This is explicitly allowed. The only restriction I am
aware of is that you cannot access tables in the inner
query that are also being used in the outer query.


--
D. Richard Hipp -- drh-X1OJI8nnyKUAvxtiuMwx3w@xxxxxxxxxxxxxxxx -- 704.948.4565


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise