Skip to content

Array operators #18

@mwpowellhtx

Description

@mwpowellhtx

So interesting are these HQL functions are you registering

// array_contains(arr, 3) => :num = any(arr)
RegisterFunction("array_contains", new SQLFunctionTemplate(NHibernateUtil.Boolean, "?2 = any(?1)"));

// array_intersects => ?1 && ?2
RegisterFunction("array_intersects", new SQLFunctionTemplate(NHibernateUtil.Boolean, "?1 && ?2"));

Any thoughts on something like array_length, is it necessary? How about array_except, I'm not sure what the operator would be for that, i.e. "?1 ^ ?2". Or does it assume known SQL or HQL operators in order for the registered functions to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions