PgSchemaAttribute
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Places a class’s generated functions in a fixed PostgreSQL schema, creating an extension-owned schema by default. Nested classes inherit the nearest declaration; a function’s Schema option overrides it.
[AttributeUsage(AttributeTargets.Class, Inherited = false)]public sealed class PgSchemaAttribute : AttributeDeclares the schema’s exact identifier, quoted by the SQL generator.
Inheritance: object, Attribute
Constructors
Section titled “Constructors”PgSchemaAttribute(string)
Section titled “PgSchemaAttribute(string)”Places a class’s generated functions in a fixed PostgreSQL schema, creating an extension-owned schema by default. Nested classes inherit the nearest declaration; a function’s Schema option overrides it.
public PgSchemaAttribute(string name)Parameters:
name — string
The nonempty schema name, at most 63 UTF-8 bytes.
Declares the schema’s exact identifier, quoted by the SQL generator.
Properties
Section titled “Properties”Create
Section titled “Create”Gets or sets whether installation creates and owns the schema. Set false to require an existing schema without adopting it.
public bool Create { get; set; }Value: bool
Gets or sets a dependency identifier for this schema declaration. Multiple classes describing the same schema may expose different identifiers for that single schema.
public string? Id { get; set; }Value: string
Gets the SQL schema identifier.
public string Name { get; }Value: string
Requires
Section titled “Requires”Gets or sets identifiers of SQL blocks or generated declarations that must precede this schema.
public string[] Requires { get; set; }Value: string[]