Skip to content

PgSupportFunctionAttribute

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Selects a generated planner support function by its managed declaration and orders it before this function.

[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class PgSupportFunctionAttribute : Attribute

The selected method must be an ordinary generated function with one SQL internal argument and a scalar SQL internal result. Aggregate helpers require an aggregate invocation and cannot serve as planner support functions.

Inheritance: object, Attribute

Selects a generated planner support function by its managed declaration and orders it before this function.

public PgSupportFunctionAttribute(Type declaringType, string memberName)

Parameters:

declaringType — Type

The type declaring the support method.

memberName — string

The support method name, normally supplied with nameof.

The selected method must be an ordinary generated function with one SQL internal argument and a scalar SQL internal result. Aggregate helpers require an aggregate invocation and cannot serve as planner support functions.

Gets the type declaring the support method.

public Type DeclaringType { get; }

Value: Type

Gets the support method name.

public string MemberName { get; }

Value: string

Gets or sets exact managed parameter types to select an overloaded method. The selected function must take one SQL internal argument and return SQL internal.

public Type[]? ParameterTypes { get; set; }

Value: Type[]