Skip to content

PgSqlAttribute

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Includes trusted SQL text in the extension installation script with explicit dependency ordering.

[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class PgSqlAttribute : Attribute

Declares a named SQL block. Empty SQL is a valid dependency anchor. Authored SQL text, including line endings inside quoted values, is preserved.

Inheritance: object, Attribute

Includes trusted SQL text in the extension installation script with explicit dependency ordering.

public PgSqlAttribute(string name, string sql)

Parameters:

name — string

The unique, case-sensitive dependency identifier.

sql — string

The complete SQL statements, including their terminators.

Declares a named SQL block. Empty SQL is a valid dependency anchor. Authored SQL text, including line endings inside quoted values, is preserved.

Gets or sets identifiers of declarations that must run after this block.

public string[] Before { get; set; }

Value: string[]

Gets the block’s dependency identifier.

public string Name { get; }

Value: string

Gets or sets whether this block runs first, last, or according to its explicit dependencies.

public PgSqlOrder Order { get; set; }

Value: PgSqlOrder

Gets or sets whether every object and reference in this block permits extension schema relocation. The default is false because arbitrary SQL may refer to fixed schemas.

public bool Relocatable { get; set; }

Value: bool

Gets or sets identifiers of declarations that must run before this block.

public string[] Requires { get; set; }

Value: string[]

Gets the SQL text, which PostgreSQL validates and executes during installation.

public string Sql { get; }

Value: string