Skip to content

PgAggregateAttribute

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Declares a PostgreSQL aggregate from a class or struct implementing compiler-checked aggregate capabilities.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, Inherited = false)]
public sealed class PgAggregateAttribute : Attribute

Inheritance: object, Attribute

public PgAggregateAttribute()

Gets or sets declarations that must follow this aggregate in installation SQL.

public string[] Before { get; set; }

Value: string[]

Gets or sets whether the native final function receives extra SQL NULL slots describing the aggregate input types. These slots resolve SQL types and are not passed to the managed final capability.

public bool FinalExtra { get; set; }

Value: bool

Gets or sets the final function’s state modification contract, or the PostgreSQL aggregate-kind default.

public PgAggregateFinalModify FinalModify { get; set; }

Value: PgAggregateFinalModify

Gets or sets whether installation SQL is emitted for the aggregate’s CREATE AGGREGATE declaration. The default is true. False retains all support callbacks, their independent SQL policies and the dependency identifier. Cannot be false when Sql contains a replacement, including an empty string.

public bool GenerateSql { get; set; }

Value: bool

Gets or sets the case-sensitive installation dependency identifier.

public string? Id { get; set; }

Value: string

Gets or sets the initial state as PostgreSQL input text. Null means SQL NULL.

public string? InitialCondition { get; set; }

Value: string

Gets or sets whether this is a normal, ordered-set, or hypothetical-set aggregate.

public PgAggregateKind Kind { get; set; }

Value: PgAggregateKind

Gets or sets whether the native moving final function receives extra SQL NULL slots describing the aggregate input types. These slots resolve SQL types and are not passed to the managed moving final capability.

public bool MovingFinalExtra { get; set; }

Value: bool

Gets or sets the moving final function’s state modification contract.

public PgAggregateFinalModify MovingFinalModify { get; set; }

Value: PgAggregateFinalModify

Gets or sets the moving state initial value as PostgreSQL input text. Null means SQL NULL.

public string? MovingInitialCondition { get; set; }

Value: string

Gets or sets the estimated moving transition state size in bytes, or zero for the default.

public int MovingStateSize { get; set; }

Value: int

Gets or sets the SQL aggregate name, defaulting to the container name in snake_case.

public string? Name { get; set; }

Value: string

Gets or sets the aggregate’s parallel execution contract, defaulting to Unsafe.

public PgParallelSafety ParallelSafety { get; set; }

Value: PgParallelSafety

Gets or sets declarations that must precede this aggregate in installation SQL.

public string[] Requires { get; set; }

Value: string[]

Gets or sets a fixed existing SQL schema, overriding the enclosing PgSchema declaration.

public string? Schema { get; set; }

Value: string

Gets or sets the optionally schema-qualified sort operator used by PostgreSQL’s aggregate optimization.

public string? SortOperator { get; set; }

Value: string

Gets or sets literal installation SQL replacing this aggregate’s CREATE AGGREGATE declaration. Null preserves generated SQL; empty text emits no statements for this declaration.

public string? Sql { get; set; }

Value: string

@MODULE_PATHNAME@ becomes MODULE_PATHNAME. Support functions retain their own PgFunction SQL controls. Replacement SQL must use helpers with compatible argument, state, result and NULL contracts.

Gets or sets whether the literal Sql replacement permits moving the extension to another schema. The default is false. This option applies only to non-null Sql; fixed schemas and other non-relocatable declarations can still prevent relocation.

public bool SqlRelocatable { get; set; }

Value: bool

Gets or sets the estimated transition state size in bytes, or zero to use PostgreSQL’s default.

public int StateSize { get; set; }

Value: int