MigrationError

Classes > Nimblesite.DataProvider.Migration.Core > MigrationError

Migration error with message and optional inner exception.

public sealed record MigrationError : IEquatable<MigrationError>

Constructors

MigrationError

public MigrationError(string Message, Exception? InnerException = null)

Migration error with message and optional inner exception.

Parameter Type Description
Message String Error message
InnerException Exception Optional inner exception

Properties

Message

public string Message { get; init; }

Error message

InnerException

public Exception? InnerException { get; init; }

Optional inner exception

Methods

FromMessage(string)

public static MigrationError FromMessage(string message)

Creates a migration error from a message.

Parameters:

Name Type Description
message String

Returns: MigrationError

FromException(Exception)

public static MigrationError FromException(Exception ex)

Creates a migration error from an exception.

Parameters:

Name Type Description
ex Exception

Returns: MigrationError

ToString()

public override string ToString()

Returns a string that represents the current object.

Returns: String - A string that represents the current object.

RlsEmptyPredicate(string)

public static MigrationError RlsEmptyPredicate(string policyName)

MIG-E-RLS-EMPTY-PREDICATE — policy has SELECT/UPDATE/DELETE operations but UsingLql is missing.

Parameters:

Name Type Description
policyName String

Returns: MigrationError

RlsEmptyCheck(string)

public static MigrationError RlsEmptyCheck(string policyName)

MIG-E-RLS-EMPTY-CHECK — policy has INSERT/UPDATE operations but WithCheckLql is missing.

Parameters:

Name Type Description
policyName String

Returns: MigrationError

RlsLqlParse(string, string)

public static MigrationError RlsLqlParse(string policyName, string detail)

MIG-E-RLS-LQL-PARSE — LQL predicate failed to parse.

Parameters:

Name Type Description
policyName String
detail String

Returns: MigrationError

RlsLqlTranspile(string, string)

public static MigrationError RlsLqlTranspile(string policyName, string detail)

MIG-E-RLS-LQL-TRANSPILE — LQL predicate transpilation failed.

Parameters:

Name Type Description
policyName String
detail String

Returns: MigrationError

RlsMssqlUnsupported()

public static MigrationError RlsMssqlUnsupported()

MIG-E-RLS-MSSQL-UNSUPPORTED — SQL Server RLS attempted before Nimblesite.DataProvider.Migration.SqlServer ships.

Returns: MigrationError

RlsRawSqlUnsupportedOnPlatform(string, string)

public static MigrationError RlsRawSqlUnsupportedOnPlatform(string platform, string policyName)

MIG-E-RLS-RAW-SQL-UNSUPPORTED-ON-PLATFORM — raw-SQL escape hatch (UsingSql/WithCheckSql) declared on a non-Postgres platform. Implements GitHub issue #36.

Parameters:

Name Type Description
platform String
policyName String

Returns: MigrationError

RlsForceUnsupportedOnPlatform(string, string)

public static MigrationError RlsForceUnsupportedOnPlatform(string platform, string tableName)

MIG-E-RLS-FORCE-UNSUPPORTED-ON-PLATFORMforced: true declared on a non-Postgres platform. Implements GitHub issue #37.

Parameters:

Name Type Description
platform String
tableName String

Returns: MigrationError