C# Class Tortuga.Chain.PostgreSqlDataSource

Class PostgreSqlDataSource.
Inheritance: PostgreSqlDataSourceBase, IRootDataSource
Afficher le fichier Open project: docevaad/Chain Class Usage Examples

Private Properties

Свойство Type Description
CreateConnection Npgsql.NpgsqlConnection
CreateConnectionAsync Task
IRootDataSource System.Data.Common.DbConnection
IRootDataSource IOpenDataSource
IRootDataSource ITransactionalDataSource
IRootDataSource Task
IRootDataSource Task
PostgreSqlDataSource Npgsql
WithSettings PostgreSqlDataSource

Méthodes publiques

Méthode Description
BeginTransaction ( IsolationLevel isolationLevel = null, bool forwardEvents = true ) : PostgreSqlTransactionalDataSource

Begins the transaction.

BeginTransactionAsync ( IsolationLevel isolationLevel = null, bool forwardEvents = true ) : Task

Begins the transaction.

CreateFromConfig ( string connectionName ) : PostgreSqlDataSource

Creates a new connection using the connection string in the app.config file.

PostgreSqlDataSource ( NpgsqlConnectionStringBuilder connectionBuilder, PostgreSqlDataSourceSettings settings = null ) : Npgsql

Initializes a new instance of the PostgreSqlDataSource class.

PostgreSqlDataSource ( string name, NpgsqlConnectionStringBuilder connectionBuilder, PostgreSqlDataSourceSettings settings = null ) : Npgsql

Initializes a new instance of the PostgreSqlDataSource class.

PostgreSqlDataSource ( string connectionString, PostgreSqlDataSourceSettings settings = null ) : Npgsql

Initializes a new instance of the PostgreSqlDataSource class.

PostgreSqlDataSource ( string name, string connectionString, PostgreSqlDataSourceSettings settings = null ) : Npgsql

Initializes a new instance of the PostgreSqlDataSource class.

TestConnection ( ) : void

Tests the connection.

TestConnectionAsync ( ) : Task

Tests the connection asynchronously.

WithCache ( ICacheAdapter cache ) : PostgreSqlDataSource

Craetes a new data source with the provided cache.

WithRules ( ) : PostgreSqlDataSource

Creates a new data source with additional audit rules.

WithRules ( IEnumerable additionalRules ) : PostgreSqlDataSource

Creates a new data source with additional audit rules.

WithUser ( object userValue ) : PostgreSqlDataSource

Creates a new data source with the indicated user.

This is used in conjunction with audit rules.

Méthodes protégées

Méthode Description
Execute ( NpgsqlParameter>.CommandExecutionToken executionToken, CommandImplementation implementation, object state ) : int?

Executes the specified operation.

Execute ( NpgsqlTransaction>.OperationExecutionToken executionToken, NpgsqlTransaction>.OperationImplementation implementation, object state ) : int?

Executes the specified operation.

ExecuteAsync ( NpgsqlParameter>.CommandExecutionToken executionToken, CommandImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task

execute as an asynchronous operation.

ExecuteAsync ( NpgsqlTransaction>.OperationExecutionToken executionToken, NpgsqlTransaction>.OperationImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task

execute as an asynchronous operation.

Private Methods

Méthode Description
CreateConnection ( ) : NpgsqlConnection
CreateConnectionAsync ( CancellationToken cancellationToken = default(CancellationToken) ) : Task
IRootDataSource ( ) : DbConnection
IRootDataSource ( DbConnection connection, DbTransaction transaction ) : IOpenDataSource
IRootDataSource ( ) : ITransactionalDataSource
IRootDataSource ( ) : Task
IRootDataSource ( ) : Task
PostgreSqlDataSource ( string name, NpgsqlConnectionStringBuilder connectionBuilder, PostgreSqlDataSourceSettings settings, PostgreSqlMetadataCache databaseMetadata, ICacheAdapter cache, object>.ConcurrentDictionary extensionCache ) : Npgsql
WithSettings ( PostgreSqlDataSourceSettings settings ) : PostgreSqlDataSource

Method Details

BeginTransaction() public méthode

Begins the transaction.
public BeginTransaction ( IsolationLevel isolationLevel = null, bool forwardEvents = true ) : PostgreSqlTransactionalDataSource
isolationLevel IsolationLevel The isolation level.
forwardEvents bool if set to true [forward events].
Résultat PostgreSqlTransactionalDataSource

BeginTransactionAsync() public méthode

Begins the transaction.
public BeginTransactionAsync ( IsolationLevel isolationLevel = null, bool forwardEvents = true ) : Task
isolationLevel IsolationLevel The isolation level.
forwardEvents bool if set to true [forward events].
Résultat Task

CreateFromConfig() public static méthode

Creates a new connection using the connection string in the app.config file.
public static CreateFromConfig ( string connectionName ) : PostgreSqlDataSource
connectionName string
Résultat PostgreSqlDataSource

Execute() protected méthode

Executes the specified operation.
executionToken;executionToken is null. /// or /// implementation;implementation is null.
protected Execute ( NpgsqlParameter>.CommandExecutionToken executionToken, CommandImplementation implementation, object state ) : int?
executionToken NpgsqlParameter>.CommandExecutionToken The execution token.
implementation CommandImplementation The implementation that handles processing the result of the command.
state object User supplied state.
Résultat int?

Execute() protected méthode

Executes the specified operation.
/// executionToken;executionToken is null. /// or /// implementation;implementation is null. ///
protected Execute ( NpgsqlTransaction>.OperationExecutionToken executionToken, NpgsqlTransaction>.OperationImplementation implementation, object state ) : int?
executionToken NpgsqlTransaction>.OperationExecutionToken The execution token.
implementation NpgsqlTransaction>.OperationImplementation The implementation.
state object The state.
Résultat int?

ExecuteAsync() protected méthode

execute as an asynchronous operation.
/// executionToken;executionToken is null. /// or /// implementation;implementation is null. ///
protected ExecuteAsync ( NpgsqlParameter>.CommandExecutionToken executionToken, CommandImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task
executionToken NpgsqlParameter>.CommandExecutionToken The execution token.
implementation CommandImplementationAsync The implementation that handles processing the result of the command.
cancellationToken System.Threading.CancellationToken The cancellation token.
state object User supplied state.
Résultat Task

ExecuteAsync() protected méthode

execute as an asynchronous operation.
/// executionToken;executionToken is null. /// or /// implementation;implementation is null. ///
protected ExecuteAsync ( NpgsqlTransaction>.OperationExecutionToken executionToken, NpgsqlTransaction>.OperationImplementationAsync implementation, CancellationToken cancellationToken, object state ) : Task
executionToken NpgsqlTransaction>.OperationExecutionToken The execution token.
implementation NpgsqlTransaction>.OperationImplementationAsync The implementation.
cancellationToken System.Threading.CancellationToken The cancellation token.
state object The state.
Résultat Task

PostgreSqlDataSource() public méthode

Initializes a new instance of the PostgreSqlDataSource class.
public PostgreSqlDataSource ( NpgsqlConnectionStringBuilder connectionBuilder, PostgreSqlDataSourceSettings settings = null ) : Npgsql
connectionBuilder Npgsql.NpgsqlConnectionStringBuilder The connection builder.
settings PostgreSqlDataSourceSettings The settings.
Résultat Npgsql

PostgreSqlDataSource() public méthode

Initializes a new instance of the PostgreSqlDataSource class.
public PostgreSqlDataSource ( string name, NpgsqlConnectionStringBuilder connectionBuilder, PostgreSqlDataSourceSettings settings = null ) : Npgsql
name string The name.
connectionBuilder Npgsql.NpgsqlConnectionStringBuilder The connection builder.
settings PostgreSqlDataSourceSettings The settings.
Résultat Npgsql

PostgreSqlDataSource() public méthode

Initializes a new instance of the PostgreSqlDataSource class.
public PostgreSqlDataSource ( string connectionString, PostgreSqlDataSourceSettings settings = null ) : Npgsql
connectionString string The connection string.
settings PostgreSqlDataSourceSettings The settings.
Résultat Npgsql

PostgreSqlDataSource() public méthode

Initializes a new instance of the PostgreSqlDataSource class.
connectionString is null or empty.;connectionString
public PostgreSqlDataSource ( string name, string connectionString, PostgreSqlDataSourceSettings settings = null ) : Npgsql
name string The name.
connectionString string The connection string.
settings PostgreSqlDataSourceSettings The settings.
Résultat Npgsql

TestConnection() public méthode

Tests the connection.
public TestConnection ( ) : void
Résultat void

TestConnectionAsync() public méthode

Tests the connection asynchronously.
public TestConnectionAsync ( ) : Task
Résultat Task

WithCache() public méthode

Craetes a new data source with the provided cache.
public WithCache ( ICacheAdapter cache ) : PostgreSqlDataSource
cache ICacheAdapter The cache.
Résultat PostgreSqlDataSource

WithRules() public méthode

Creates a new data source with additional audit rules.
public WithRules ( ) : PostgreSqlDataSource
Résultat PostgreSqlDataSource

WithRules() public méthode

Creates a new data source with additional audit rules.
public WithRules ( IEnumerable additionalRules ) : PostgreSqlDataSource
additionalRules IEnumerable The additional rules.
Résultat PostgreSqlDataSource

WithUser() public méthode

Creates a new data source with the indicated user.
This is used in conjunction with audit rules.
public WithUser ( object userValue ) : PostgreSqlDataSource
userValue object The user value.
Résultat PostgreSqlDataSource