Class NpgsqlHistoryRepository
- Assembly
- Npgsql.EntityFrameworkCore.PostgreSQL.dll
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public class NpgsqlHistoryRepository : HistoryRepository, IHistoryRepository
- Inheritance
-
NpgsqlHistoryRepository
- Implements
- Inherited Members
Constructors
NpgsqlHistoryRepository(HistoryRepositoryDependencies)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public NpgsqlHistoryRepository(HistoryRepositoryDependencies dependencies)
Parameters
dependencies
HistoryRepositoryDependencies
Properties
ExistsSql
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
protected override string ExistsSql { get; }
Property Value
LockReleaseBehavior
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override LockReleaseBehavior LockReleaseBehavior { get; }
Property Value
Methods
AcquireDatabaseLock()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override IMigrationsDatabaseLock AcquireDatabaseLock()
Returns
AcquireDatabaseLockAsync(CancellationToken)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override Task<IMigrationsDatabaseLock> AcquireDatabaseLockAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
Exists()
Always returns true for PostgreSQL - it's difficult to reliably check if the migration history table
exists or not (because user may set PG search_path
, which determines unqualified tables references when creating,
selecting). So we instead catch the "table doesn't exist" exceptions instead.
public override bool Exists()
Returns
ExistsAsync(CancellationToken)
Always returns true for PostgreSQL - it's difficult to reliably check if the migration history table
exists or not (because user may set PG search_path
, which determines unqualified tables references when creating,
selecting). So we instead catch the "table doesn't exist" exceptions instead.
public override Task<bool> ExistsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
GetAppliedMigrations()
Calls the base implementation, but catches "table not found" exceptions; we do this rather than try to detect whether the
migration table already exists (see ExistsAsync(CancellationToken) override below), since it's difficult to reliably check if the
migration history table exists or not (because user may set PG search_path
, which determines unqualified tables
references when creating, selecting).
public override IReadOnlyList<HistoryRow> GetAppliedMigrations()
Returns
GetAppliedMigrationsAsync(CancellationToken)
Calls the base implementation, but catches "table not found" exceptions; we do this rather than try to detect whether the
migration table already exists (see ExistsAsync(CancellationToken) override below), since it's difficult to reliably check if the
migration history table exists or not (because user may set PG search_path
, which determines unqualified tables
references when creating, selecting).
public override Task<IReadOnlyList<HistoryRow>> GetAppliedMigrationsAsync(CancellationToken cancellationToken = default)
Parameters
cancellationToken
CancellationToken
Returns
GetBeginIfExistsScript(string)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override string GetBeginIfExistsScript(string migrationId)
Parameters
migrationId
string
Returns
GetBeginIfNotExistsScript(string)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override string GetBeginIfNotExistsScript(string migrationId)
Parameters
migrationId
string
Returns
GetCreateCommands()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
protected override IReadOnlyList<MigrationCommand> GetCreateCommands()
Returns
GetCreateIfNotExistsScript()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override string GetCreateIfNotExistsScript()
Returns
GetEndIfScript()
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public override string GetEndIfScript()
Returns
InterpretExistsResult(object?)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
protected override bool InterpretExistsResult(object? value)
Parameters
value
object