Hi,
I was just wondering if it is possible to use common-table expressions (CTE) with the sql-templating feature for datasources. I have a datasource, that currently uses the <customSQL> sql tag, however I am trying to convert this to use the sql-templating tags (selectClause, whereClause, etc), as these use pagination.
However, I'm not sure if it's possible to include a CTEs while using the sql-templating function.
Given that CTEs are actually placed before the select statement, it doesn't seem possible to use the WITH statement, unless creating a custom query, which doesn't paginate results.
Is there anything like a <withClause>, that would allow a custom CTE to be written? that would just be inserted before the select statement.
I was just wondering if it is possible to use common-table expressions (CTE) with the sql-templating feature for datasources. I have a datasource, that currently uses the <customSQL> sql tag, however I am trying to convert this to use the sql-templating tags (selectClause, whereClause, etc), as these use pagination.
However, I'm not sure if it's possible to include a CTEs while using the sql-templating function.
Given that CTEs are actually placed before the select statement, it doesn't seem possible to use the WITH statement, unless creating a custom query, which doesn't paginate results.
Is there anything like a <withClause>, that would allow a custom CTE to be written? that would just be inserted before the select statement.
Comment