Class NpgsqlBatch
Implements
IAsyncDisposable
Assembly: Npgsql.dll
Syntax
public class NpgsqlBatch : DbBatch, IAsyncDisposable
Constructors
|
Improve this Doc
View Source
NpgsqlBatch(NpgsqlConnection?, NpgsqlTransaction?)
Declaration
public NpgsqlBatch(NpgsqlConnection? connection = null, NpgsqlTransaction? transaction = null)
Parameters
Properties
|
Improve this Doc
View Source
BatchCommands
Declaration
public NpgsqlBatchCommandCollection BatchCommands { get; }
Property Value
|
Improve this Doc
View Source
Connection
Declaration
public NpgsqlConnection? Connection { get; set; }
Property Value
|
Improve this Doc
View Source
DbBatchCommands
Declaration
protected override DbBatchCommandCollection DbBatchCommands { get; }
Property Value
Overrides
|
Improve this Doc
View Source
DbConnection
Declaration
protected override DbConnection? DbConnection { get; set; }
Property Value
Type |
Description |
DbConnection? |
|
Overrides
|
Improve this Doc
View Source
DbTransaction
Declaration
protected override DbTransaction? DbTransaction { get; set; }
Property Value
Type |
Description |
DbTransaction? |
|
Overrides
|
Improve this Doc
View Source
EnableErrorBarriers
Controls whether to place error barriers between all batch commands within this batch. Default to false.
Declaration
public bool EnableErrorBarriers { get; set; }
Property Value
|
Improve this Doc
View Source
Timeout
Declaration
public override int Timeout { get; set; }
Property Value
Overrides
|
Improve this Doc
View Source
Transaction
Declaration
public NpgsqlTransaction? Transaction { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
Cancel()
Declaration
public override void Cancel()
Overrides
|
Improve this Doc
View Source
CreateBatchCommand()
Declaration
public NpgsqlBatchCommand CreateBatchCommand()
Returns
|
Improve this Doc
View Source
CreateDbBatchCommand()
Declaration
protected override DbBatchCommand CreateDbBatchCommand()
Returns
Overrides
|
Improve this Doc
View Source
Dispose()
Declaration
public override void Dispose()
Overrides
|
Improve this Doc
View Source
ExecuteDbDataReader(CommandBehavior)
Declaration
protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
Parameters
Type |
Name |
Description |
CommandBehavior |
behavior |
|
Returns
Type |
Description |
DbDataReader |
|
Overrides
|
Improve this Doc
View Source
ExecuteDbDataReaderAsync(CommandBehavior, CancellationToken)
Declaration
protected override Task<DbDataReader> ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
CommandBehavior |
behavior |
|
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<><DbDataReader> |
|
Overrides
|
Improve this Doc
View Source
ExecuteNonQuery()
Declaration
public override int ExecuteNonQuery()
Returns
Overrides
|
Improve this Doc
View Source
ExecuteNonQueryAsync(CancellationToken)
Declaration
public override Task<int> ExecuteNonQueryAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<><int> |
|
Overrides
|
Improve this Doc
View Source
ExecuteReader(CommandBehavior)
Declaration
public NpgsqlDataReader ExecuteReader(CommandBehavior behavior = null)
Parameters
Type |
Name |
Description |
CommandBehavior |
behavior |
|
Returns
|
Improve this Doc
View Source
ExecuteReaderAsync(CancellationToken)
Declaration
public Task<NpgsqlDataReader> ExecuteReaderAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
ExecuteReaderAsync(CommandBehavior, CancellationToken)
Declaration
public Task<NpgsqlDataReader> ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CommandBehavior |
behavior |
|
CancellationToken |
cancellationToken |
|
Returns
|
Improve this Doc
View Source
ExecuteScalar()
Declaration
public override object? ExecuteScalar()
Returns
Overrides
|
Improve this Doc
View Source
ExecuteScalarAsync(CancellationToken)
Declaration
public override Task<object?> ExecuteScalarAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
Task<><object?> |
|
Overrides
|
Improve this Doc
View Source
Prepare()
Declaration
public override void Prepare()
Overrides
|
Improve this Doc
View Source
PrepareAsync(CancellationToken)
Declaration
public override Task PrepareAsync(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
Overrides
Implements
IAsyncDisposable