/// <inheritdoc/> protected override async Task <SqlDriver> CreateDriverAsync( string connectionString, SqlDriverConfiguration configuration, CancellationToken token) { var connection = new OracleConnection(connectionString); await using (connection.ConfigureAwait(false)) { await connection.OpenAsync(token).ConfigureAwait(false); await SqlHelper.ExecuteInitializationSqlAsync(connection, configuration, token).ConfigureAwait(false); var version = string.IsNullOrEmpty(configuration.ForcedServerVersion) ? ParseVersion(connection.ServerVersion) : new Version(configuration.ForcedServerVersion); var defaultSchema = await GetDefaultSchemaAsync(connection, token : token).ConfigureAwait(false); return(CreateDriverInstance(connectionString, version, defaultSchema)); } }
/// <inheritdoc/> protected override async Task <SqlDriver> CreateDriverAsync( string connectionString, SqlDriverConfiguration configuration, CancellationToken token) { var connection = new OracleConnection(connectionString); await using (connection.ConfigureAwait(false)) { if (configuration.DbConnectionAccessors.Count > 0) { await OpenConnectionWithNotification(connection, configuration, true, token).ConfigureAwait(false); } else { await OpenConnectionFast(connection, configuration, true, token).ConfigureAwait(false); } var version = string.IsNullOrEmpty(configuration.ForcedServerVersion) ? ParseVersion(connection.ServerVersion) : new Version(configuration.ForcedServerVersion); var defaultSchema = await GetDefaultSchemaAsync(connection, token : token).ConfigureAwait(false); return(CreateDriverInstance(connectionString, version, defaultSchema)); } }