Skip to content

PgSqlTypeAttribute

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Binds a raw PgDatum parameter or result to a PostgreSQL type.

[AttributeUsage(AttributeTargets.Parameter|AttributeTargets.ReturnValue, AllowMultiple = true)]
public sealed class PgSqlTypeAttribute : Attribute

Names identify existing types; use PgSql dependencies to create extension-defined types first. Ankus validates the returned datum’s exact type and storage lifetime.

Inheritance: object, Attribute

Binds a raw PgDatum parameter or result to a PostgreSQL type.

public PgSqlTypeAttribute(string name)

Parameters:

name — string

The case-sensitive type name without SQL quoting or a schema prefix.

Names identify existing types; use PgSql dependencies to create extension-defined types first. Ankus validates the returned datum’s exact type and storage lifetime.

Gets or sets the SQL TABLE output column to bind when the method returns several raw values.

public string? Column { get; set; }

Value: string

Gets or sets the exact C# tuple element to bind within a typed aggregate argument group. Omit for a scalar parameter or return value; Column selects TABLE outputs separately.

public string? Element { get; set; }

Value: string

Gets or sets whether the datum represents an array of the named type.

public bool IsArray { get; set; }

Value: bool

Gets the PostgreSQL type identifier.

public string Name { get; }

Value: string

Gets or sets a fixed schema, or null to resolve the type through the installation search path.

public string? Schema { get; set; }

Value: string