OracleDBReader 1.0.5.2
dotnet add package OracleDBReader --version 1.0.5.2
NuGet\Install-Package OracleDBReader -Version 1.0.5.2
<PackageReference Include="OracleDBReader" Version="1.0.5.2" />
<PackageVersion Include="OracleDBReader" Version="1.0.5.2" />
<PackageReference Include="OracleDBReader" />
paket add OracleDBReader --version 1.0.5.2
#r "nuget: OracleDBReader, 1.0.5.2"
#addin nuget:?package=OracleDBReader&version=1.0.5.2
#tool nuget:?package=OracleDBReader&version=1.0.5.2
OracleDBReader
OracleDBReader is a high-performance, easy-to-use .NET 8 library for efficiently streaming large Oracle database result sets as JSON. It supports asynchronous and parallel row processing, making it ideal for ETL, data integration, and analytics scenarios where memory efficiency and scalability are critical.
Features
- Stream Oracle query results as JSON without loading all data into memory
- Async and parallel row processing for high throughput
- Optimized for large result sets and production ETL/data pipelines
- Simple API for integration in .NET 8 projects
- Supports cancellation tokens for responsive applications
- Open source under the Apache 2.0 license
Installation
Install from NuGet.org:
dotnet add package OracleDBReader
Quick Start
Query entire result as JSON
using var dbReader = new OracleDBReader();
string json = await dbReader.QueryToJsonAsync(dataSource, username, password, sqlQuery);
Stream each row as JSON
using var dbReader = new OracleDBReader();
await foreach (var jsonRow in dbReader.StreamQueryAsJsonAsync(dataSource, username, password, sqlQuery))
{
// Process each JSON row
}
Parallel row processing
using var dbReader = new OracleDBReader();
await dbReader.StreamQueryParallelAsync(
dataSource, username, password, sqlQuery,
async row =>
{
// Process row (Dictionary<string, object?>)
},
maxDegreeOfParallelism: 8
);
API Reference
OracleDBReader
class
Task<string> QueryToJsonAsync(...)
Executes a query and returns the entire result set as a JSON string. The result is wrapped in a table object with the name "Table"
.
IAsyncEnumerable<string> StreamQueryAsJsonAsync(...)
Streams each row as a JSON string (with table name "Table"
). Suitable for processing or exporting very large result sets row-by-row.
Task StreamQueryParallelAsync(...)
Streams and processes rows in parallel using the provided callback. Allows you to specify the maximum degree of parallelism for high-throughput ETL scenarios.
Best Practices
- Use
StreamQueryAsJsonAsync
orStreamQueryParallelAsync
for large result sets to avoid high memory usage. - Always use
CancellationToken
in production for responsive cancellation. - Secure your database credentials and avoid hardcoding them in source code.
- Dispose of the
OracleDBReader
instance after use (useusing var ...
). - For best performance, tune
maxDegreeOfParallelism
based on your workload and system resources.
Build & Release
This project uses GitHub Actions for CI/CD. The workflow automatically builds, tests, packs, and publishes NuGet and symbol packages when a new tag matching v*.*.*
is pushed.
Requirements
Local Build & Test
# Restore dependencies
dotnet restore OracleDBReader.sln
# Build in Release mode
dotnet build --configuration Release --no-restore
# Run tests
dotnet test --configuration Release --no-build --verbosity normal
# Pack NuGet and symbol packages
dotnet pack --configuration Release --no-build --output ./artifacts /p:IncludeSymbols=true /p:SymbolPackageFormat=snupkg
Release & NuGet Publishing
- On every push of a tag like
v1.2.3
, the workflow:- Builds and tests the solution
- Packs NuGet and symbol packages
- Uploads artifacts
- Creates a GitHub Release with the packages attached
- Publishes to NuGet.org
See .github/workflows/release.yml
for details.
License
Apache 2.0
Repository
https://github.com/Mohamed-Elnahla/OracleDBReader
NuGet Package Metadata
This README is included in the NuGet package and provides usage, API reference, and best practices for OracleDBReader. For the latest updates, visit the GitHub repository or NuGet.org.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Oracle.ManagedDataAccess (>= 23.8.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.