View Ticket
Not logged in
Ticket UUID: 7772cc876e640d152e95b3629646fcc8fa4713c0
Title: Provide database access from TH scripts.
Status: Open Type: Feature_Request
Severity: Important Priority: Immediate
Subsystem: one Resolution: Open
Last Modified: 2011-04-14 02:29:39
Version Found In:
Description & Comments:
I want to populate a ticket version selector with tag values from the tag table. It appears to be possilbe to put a 'proc' command in the common definitions for tickets and use it to reture values for a combobox but I don't know how to do a database select on the tag table. Is it possible to do a SELECT inside proc?

Tom K.

The (undocumented) TH scripting language is well-suited for doing this kind of thing. But doing so will require a bit of C code for linking TH with SQLite. Such code does not currently exist in fossil.

This seems like a reasonable enhancement request. I'll look into adding it. You might want to write a ticket to so that I don't forget.

D. Richard Hipp


anonymous added on 2011-04-08 23:05:34 UTC:
What is the status of this ticket? I would really see this feature added.


anonymous claiming to be anonymous (claiming to be a Feral) added on 2011-04-10 22:17:51 UTC:

You might want to write a ticket to so that I don't forget.
I am going with the assumption that this ticket(7772cc876e) is the aforementioned. As such I offer my "+1" vote to include this and echo Anonymous' comment directly above.

Thank you for Fossil!


anonymous claiming to be RonW added on 2011-04-14 02:29:39 UTC:
It looks to me like the dateCmd function in th_main.c could be cloned and modified to create a new function to evaluate a string parameter as an SQL query.

Of course, it might be desirable to add checking to this new queryCmd function before giving the string to sqlite.