Skip to content

Commit eee30d6

Browse files
committed
New docs.
1 parent 205c126 commit eee30d6

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* [Time zones](docs/time-zones.md)
1212
* [DECFLOAT datatype](docs/decfloat.md)
1313
* [INT128 datatype](docs/int128.md)
14+
* [Batching](docs/batching.md)
1415

1516
## Packages
1617

@@ -41,4 +42,4 @@
4142
### 3rd party code
4243

4344
* For zlib compression the provider uses pieces from [DotNetZip](http://dotnetzip.codeplex.com/) library.
44-
* For RC4 encryption the provider uses pieces from [Bouncy Castle](https://www.bouncycastle.org/csharp/index.html) library.
45+
* For RC4 encryption the provider uses pieces from [Bouncy Castle](https://www.bouncycastle.org/csharp/index.html) library.

docs/batching.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Batching
2+
3+
Batching is supported for Firebird 4 (and above). The work is handled by `FbBatchCommand` class. It has similar API surface as `FbCommand`. The usage should feel familiar.
4+
5+
### Specifics
6+
7+
Calling the `ExecuteNonQuery`/`ExecuteNonQueryAsync` does not throw an exception, should the exception happen on server while processing the data. Instead the returned `FbBatchNonQueryResult` object should be used to check the status. The `EnsureSuccess` method or `AllSuccess` property can be used for global check. Further enumeration gives detailed information.
8+
9+
Properties `MultiError`, `ReturnRecordsAffected` and `BatchBufferSize` allow for behavior fine-tuning (these represent `TAG_MULTIERROR`, `TAG_RECORD_COUNTS` and `TAG_BUFFER_BYTES_SIZE` in BPB).
10+
11+
When dealing with huge batches of possible unlimited size, it's good to use `ComputeCurrentBatchSize`/`ComputeCurrentBatchSizeAsync` to make sure the batch is not over `BatchBufferSize`. However calling `ComputeCurrentBatchSize`/`ComputeCurrentBatchSizeAsync` is not cheap and should be handled accordingly.
12+
13+
### Limitations
14+
15+
At the moment batching is not supported for Firebird Embedded. The progress is tracked [here](https://github.com/FirebirdSQL/NETProvider/issues/1022).
16+
17+
Using (real) blobs as values is not supported. Regular `byte[]`, `string`, etc. values and the implicit conversions work just fine. The progress is tracked [here](https://github.com/FirebirdSQL/NETProvider/issues/1038).
18+
19+
### Examples
20+
21+
Examples can be found in `FbBatchCommandTests`.

0 commit comments

Comments
 (0)