bloodhound-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olemis Lang <ole...@gmail.com>
Subject Re: Requesting rpc ticket.query advice
Date Sat, 14 Mar 2015 21:50:42 GMT
Hi Mark .

Sorry for the delay to reply . That RPC method only supports TracQuery
syntax [1]_ . I honestly do not think supporting SQL syntax in there
is appropriate in this case . That's what SQL reports are for , and
they are meant to be eventually phased out considering the tightly
coupling with DB structure .

Hint : Have you tried creating the report once and parameterizing your
SQL query [2]_ ?

.. [1] http://trac.edgewall.org/wiki/TracQuery

.. [2] http://trac.edgewall.org/wiki/TracReports#AdvancedReports:DynamicVariables


On 2/27/15, Mark Abbate <abbatemp@gmail.com> wrote:
> Hi All
>
> I'm in a situation where I need to perform queries via RPC but it looks
> like I'm limited by the simple query language.
>
> For example, I need to query for a range of values in a custom field I
> added that holds an epoch millisec value.
>
> I *could* use the report methods to create a report that uses SQL, and
> then execute that report on the fly, but afaict I cannot then delete
> that report which makes this approach impractical because this will be a
> heavily used activity.
>
> I did try to populate the ticket.query with SQL such as:
>
> {"params": ["SELECT id FROM ticket WHERE  id='1000'"] , "method":
> "ticket.query"}
>
> but I get back a list of all ticket ids. If I execute that same SELECT
> in a report in BH I get ticket 1000 back.
>
>
> (1) Am I missing something in the query language?
>
> (2) Would it be a modest task for me to modify ticket.query to accept
> SQL? I haven't looked into the BH code at all. If yes, pointers are
> welcome.
>
> (3) Would it be easier to add a report.delete?
>
> (4) Or shall I just make my own custom rest interface and access the BH
> DB directly for read only queries?
>
>
> As always, thanks for the effort put into this tool, really useful.
> Best
> Mark
>


-- 
Regards,

Olemis - @olemislc

Apache(tm) Bloodhound contributor
http://issues.apache.org/bloodhound
http://blood-hound.net

Blog ES: http://simelo-es.blogspot.com/
Blog EN: http://simelo-en.blogspot.com/

Featured article:

Mime
View raw message