Static/reusable custom window functions
Hello, I'm trying to buld a properly typed
array_agg
window function and would like to reuse the existing FunctionModule
in a reusable way, so to have orderby, over, and so on.
Is there a way to get the function module you get from fn.agg
outside of an expression builder and without creating a puppet kysely instance, so to create an array_agg
function and return what fn.agg
return but properly typed?
As an example:
(right now there's no sql.fn
forcing you to use a kysely instance or an expression builder to access the fn
function module)1 Reply
Also, I noticed there's no way to accomplish the following if I'm right:
cause the
orderBy
bit is only available after applying a over
partitioning. Is that correct?