PgParameterAttribute
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Overrides a generated SQL parameter’s name or supplies a SQL default expression. Defaults apply to SQL calls; direct C# calls retain the method’s ordinary optional-argument behavior.
[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)]public sealed class PgParameterAttribute : AttributeInheritance: object, Attribute
Constructors
Section titled “Constructors”PgParameterAttribute()
Section titled “PgParameterAttribute()”public PgParameterAttribute()Properties
Section titled “Properties”Default
Section titled “Default”Gets or sets a trusted SQL default expression, overriding any C# optional default. PostgreSQL validates the expression during extension installation.
public string? Default { get; set; }Value: string
Element
Section titled “Element”Gets or sets the C# tuple element selected within a typed aggregate argument group. Omit for an ordinary scalar parameter; each tuple element is selected by its exact managed name.
public string? Element { get; set; }Value: string
Gets or sets the exact quoted SQL argument name. The default is the C# parameter name converted to snake_case.
public string? Name { get; set; }Value: string
Variadic
Section titled “Variadic”Gets or sets whether an aggregate’s trailing array input collects variadic SQL arguments. Ordinary functions declare variadic inputs with the C# params modifier.
public bool Variadic { get; set; }Value: bool