On Thu, Sep 11, 2014 at 7:03 PM, Ron W <[email protected]> wrote:

> As best I can determine, Fossil already demands that whomever adds custom
> fields take responsibility for the customized New Ticket, View Tick and
> Edit Ticket pages and associated TH1 apply the semantics correctly and
> consistently.
>

But the JSON API has no mechanism for the user to take over.


>  I think that the most the JSON API would not need to do more than to
> limit string lengths, map a "JSON Query" into a SQLite query and a "JSON
> Update" into a SQLite update. Then map the SQLite results into a suitable
> JSON response.
>

That kind of thing is easy to do in a script language, but not much fun in
C :/.


> For the query and update operations, I suggest the mapping only because it
> would limit what commands could be presented to SQLite. I would NOT expose
> Fossil to "raw" SQLite commands via any web interface.
>

What, like this?

[odroid@host:~/fossil/cwal]$ f json query -sql 'select count(*) from user'
{
"fossil":"d600c9f85421c0972231561560cb8410589c9606",
"timestamp":1410455421,
"command":"query",
"procTimeUs":5000,
"procTimeMs":5,
"payload":{
"columns":["count(*)"],
"rows":[{"count(*)":5}]
},
"g":{
...


(Reminder to self: bug: the 'g' object in the result should not be
happening without the flag which enables it. Aha... this is almost
certainly another signed vs unsigned char/overflow bug, as the odroid has
unsigned char.)

;)



> Any integration that required more than this would allow should either
> interact with the Fossil CLI or use libfossil.
>

So far i've been punting on the "ticket problem" in libfossil too because
of the tight connection between tickets and th1. i really don't want
libfossil to have _any_ built-in scripting language, because no language is
a perfect fit. Still not yet sure what's going to happen in that corner of
the code.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to