PgTestAttribute
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Declares a synchronous, zero-SQL-argument test that runs inside PostgreSQL. Native entry points are emitted only when AnkusIncludeTests is enabled.
[AttributeUsage(AttributeTargets.Method)]public sealed class PgTestAttribute : AttributeInheritance: object, Attribute
Constructors
Section titled “Constructors”PgTestAttribute()
Section titled “PgTestAttribute()”public PgTestAttribute()Properties
Section titled “Properties”Gets or sets the positive finite planner cost of the test function. The default is one.
public double Cost { get; set; }Value: double
ExpectedError
Section titled “ExpectedError”Gets or sets the exact PostgreSQL primary error message expected from the test, or null for success.
public string? ExpectedError { get; set; }Value: string
IgnoreReason
Section titled “IgnoreReason”Gets or sets a reason for the host test framework to report this test as ignored.
public string? IgnoreReason { get; set; }Value: string
ParallelSafety
Section titled “ParallelSafety”Gets or sets whether PostgreSQL may run the test function in parallel queries. The default is Unsafe.
public PgParallelSafety ParallelSafety { get; set; }Value: PgParallelSafety
SearchPath
Section titled “SearchPath”Gets or sets an ordered schema search path scoped to this test; null preserves the caller’s path. Use ExtensionSchema for the schema selected during CREATE EXTENSION.
public string[]? SearchPath { get; set; }Value: string[]
SecurityDefiner
Section titled “SecurityDefiner”Gets or sets whether the test function runs with its owner’s privileges instead of the caller’s.
public bool SecurityDefiner { get; set; }Value: bool
Volatility
Section titled “Volatility”Gets or sets the test function’s volatility, as pgrx’s #[pg_test] passes #[pg_extern] options
through. The default is Volatile.
public PgVolatility Volatility { get; set; }Value: PgVolatility