Skip to content

PgOperatorAttribute

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Exposes a static method or C# operator declaration as a PostgreSQL function and a binary or prefix operator in the function’s schema. Add PgFunction to customize the backing function’s name, schema, or execution options.

[AttributeUsage(AttributeTargets.Method)]
public sealed class PgOperatorAttribute : Attribute

Declares an operator using PostgreSQL’s operator punctuation syntax. C# operator declarations retain their exact implementation, including checked operators.

Inheritance: object, Attribute

Exposes a static method or C# operator declaration as a PostgreSQL function and a binary or prefix operator in the function’s schema. Add PgFunction to customize the backing function’s name, schema, or execution options.

public PgOperatorAttribute(string name)

Parameters:

name — string

The unqualified SQL operator name.

Declares an operator using PostgreSQL’s operator punctuation syntax. C# operator declarations retain their exact implementation, including checked operators.

Gets or sets the operator with reversed operands. An unqualified name uses this operator’s schema.

public string? Commutator { get; set; }

Value: string

Gets or sets whether this binary boolean operator supports hash joins. This is a semantic promise; compatible hash operator families are declared separately.

public bool Hashes { get; set; }

Value: bool

Gets or sets the dependency identifier for the operator, independently of its backing function.

public string? Id { get; set; }

Value: string

Gets or sets a join selectivity function, optionally qualified with one schema. PostgreSQL validates its signature at installation.

public string? JoinEstimator { get; set; }

Value: string

Gets or sets whether this binary boolean operator supports merge joins. This is a semantic promise; compatible B-tree operator families are declared separately.

public bool Merges { get; set; }

Value: bool

Gets the operator name. A one-parameter method defines a prefix operator.

public string Name { get; }

Value: string

Gets or sets the boolean complement operator. An unqualified name uses this operator’s schema.

public string? Negator { get; set; }

Value: string

Gets or sets declarations that must precede CREATE OPERATOR.

public string[] Requires { get; set; }

Value: string[]

Gets or sets a restriction selectivity function, optionally qualified with one schema. PostgreSQL validates its signature at installation.

public string? RestrictionEstimator { get; set; }

Value: string