OracleDBReader 1.0.5.2

dotnet add package OracleDBReader --version 1.0.5.2
                    
NuGet\Install-Package OracleDBReader -Version 1.0.5.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OracleDBReader" Version="1.0.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OracleDBReader" Version="1.0.5.2" />
                    
Directory.Packages.props
<PackageReference Include="OracleDBReader" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OracleDBReader --version 1.0.5.2
                    
#r "nuget: OracleDBReader, 1.0.5.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=OracleDBReader&version=1.0.5.2
                    
Install OracleDBReader as a Cake Addin
#tool nuget:?package=OracleDBReader&version=1.0.5.2
                    
Install OracleDBReader as a Cake Tool

OracleDBReader

NuGet Version NuGet Downloads License: Apache 2.0 .NET 8.0

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 or StreamQueryParallelAsync 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 (use using 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5.2 85 5/23/2025
1.0.5.1 96 5/23/2025
1.0.0 135 5/22/2025