我可以在准则2中使用窗口功能吗? [英] Can I use window functions in doctrine 2?
本文介绍了我可以在准则2中使用窗口功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
SELECT invoice.id,
COUNT(slip.id),
SUM(projected_minutes) OVER (PARTITION BY task.id) AS projected_minutes
FROM invoice
INNER JOIN task ON task.invoice_id = invoice.id
LEFT JOIN slip ON slip.task_id = task.id
上面的查询是在postgresql中,我想将其转换为DQL,但是我找不到DQL中有关窗口函数的任何文档,这在学说中是本机支持的,还是我必须为此创建一个自定义的dql函数?
The query above is in postgresql, and I want to convert it to DQL, but I cant find any documentation for window functions in DQL, is this natively supported in doctrine or would i have to create a custom dql function for this?
推荐答案
Doctrine中不支持此供应商特定的函数。创建自定义DQL函数或使用本机SQL。
There is no support for this vendor specific function in Doctrine. Either create a custom DQL function or use Native SQL.
这篇关于我可以在准则2中使用窗口功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文