我創建了一些TracReports,但試圖用SQL來做,我沒有得到我期待的結果。這是我的SQL查詢:是否有可能將TracQuery轉換爲Trac SQL語句,反之亦然?
SELECT p.value AS __color__,
reporter AS __group__,
id AS ticket, summary, resolution , component,
t.type AS type, priority, severity, time AS created,
changetime AS modified,
changetime AS __changetime, description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE t.status = 'closed'
ORDER BY changetime DESC, CAST(p.value AS integer), milestone, t.type, time
使用此查詢,記者組完全不工作。每個記者有幾行。所以我試圖使用「自定義查詢」功能獲得結果。那我的生產具有以下TracQuery預期的結果:
query:?status=closed
&group=reporter
&col=id
&col=summary
&col=resolution
&col=component
&col=type
&col=priority
&col=severity
&col=time
&col=changetime
&order=changetime
&desc=1
我的問題是:我可以轉換TracQuery到SQL語句或我可以看到在後臺完成的SQL語句?我在問,因爲我希望能夠投出一些列或使用其他SQL函數。
感謝您的提示。不幸的是,我不是一個Python開發人員,所以我不想自己改變代碼。但我會嘗試調試模式,並報告是否得到我的結果。 – 2ndkauboy 2011-01-12 16:58:07