IDatabaseMethods ​
Namespace: MJCZone.DapperMatic.Interfaces
Assembly: MJCZone.DapperMatic
Summary ​
Defines methods for interacting with a database.
Inheritance ​
Implemented Interfaces:
- IDatabaseTableMethods
- IDatabaseColumnMethods
- IDatabaseIndexMethods
- IDatabaseCheckConstraintMethods
- IDatabaseDefaultConstraintMethods
- IDatabasePrimaryKeyConstraintMethods
- IDatabaseUniqueConstraintMethods
- IDatabaseForeignKeyConstraintMethods
- IDatabaseSchemaMethods
- IDatabaseViewMethods
abstract
public
Note: This is an interface that defines a contract. Look for implementing classes in the same or related namespaces.
Contents ​
Methods (5) | Properties (3)
Methods ​
SupportsCheckConstraintsAsync ​
Determines whether the database supports check constraints.
Task<bool> SupportsCheckConstraintsAsync(IDbConnection db, IDbTransaction tx, CancellationToken cancellationToken)
Parameters ​
- db (IDbConnection) - The database connection.
- tx (IDbTransaction) - The database transaction.
- cancellationToken (CancellationToken) - The cancellation token.
Returns ​
Type: Task<bool>
A task that represents the asynchronous operation. The task result contains a boolean indicating support for check constraints.
SupportsOrderedKeysInConstraintsAsync ​
Determines whether the database supports ordered keys in constraints.
Task<bool> SupportsOrderedKeysInConstraintsAsync(IDbConnection db, IDbTransaction tx, CancellationToken cancellationToken)
Parameters ​
- db (IDbConnection) - The database connection.
- tx (IDbTransaction) - The database transaction.
- cancellationToken (CancellationToken) - The cancellation token.
Returns ​
Type: Task<bool>
A task that represents the asynchronous operation. The task result contains a boolean indicating support for ordered keys in constraints.
GetDatabaseVersionAsync ​
Gets the version of the database.
Task<Version> GetDatabaseVersionAsync(IDbConnection db, IDbTransaction tx, CancellationToken cancellationToken)
Parameters ​
- db (IDbConnection) - The database connection.
- tx (IDbTransaction) - The database transaction.
- cancellationToken (CancellationToken) - The cancellation token.
Returns ​
Type: Task<Version>
A task that represents the asynchronous operation. The task result contains the database version.
GetDotnetTypeFromSqlType ​
Gets the .NET type descriptor from the SQL type.
DotnetTypeDescriptor GetDotnetTypeFromSqlType(string sqlType)
Parameters ​
- sqlType (string) - The SQL type.
Returns ​
Type: DotnetTypeDescriptor
The .NET type descriptor.
GetSqlTypeFromDotnetType ​
Gets the SQL type from the .NET type descriptor.
string GetSqlTypeFromDotnetType(DotnetTypeDescriptor descriptor)
Parameters ​
- descriptor (DotnetTypeDescriptor) - The .NET type descriptor.
Returns ​
Type: string
The SQL type.
Properties ​
ProviderType ​
Gets the type of the database provider.
Type: DbProviderType
ProviderTypeMap ​
Gets the provider type map.
Type: IDbProviderTypeMap
SupportsSchemas ​
Gets a value indicating whether the database supports schemas.
Type: bool