FireboltNetSDK 1.0.0-alpha

This is a prerelease version of FireboltNetSDK.
There is a newer version of this package available.
See the version list below for details.
dotnet add package FireboltNetSDK --version 1.0.0-alpha
NuGet\Install-Package FireboltNetSDK -Version 1.0.0-alpha
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="FireboltNetSDK" Version="1.0.0-alpha" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FireboltNetSDK --version 1.0.0-alpha
#r "nuget: FireboltNetSDK, 1.0.0-alpha"
#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.
// Install FireboltNetSDK as a Cake Addin
#addin nuget:?package=FireboltNetSDK&version=1.0.0-alpha&prerelease

// Install FireboltNetSDK as a Cake Tool
#tool nuget:?package=FireboltNetSDK&version=1.0.0-alpha&prerelease

firebolt-net-sdk

License Nuget Build Unit tests Code quality checks

This is an implementation of .NET Core driver(.NET 6) for Firebolt DB in a form of ADO.NET DbProvider API. Supports all latest .NET frameworks and all platforms.

This project is developed under Visual Studio 2022. Earlier versions of Visual Studio are not supported.

Installing the Package

Packages can be directly downloaded from nuget.org.

It can also be downloaded using Visual Studio UI (Tools > NuGet Package Manager > Manage NuGet Packages for Solution and search for "Firebolt")

Alternatively, packages can also be downloaded using Package Manager Console:

PM> Install-Package FireboltNetSDK

Examples

The following examples demonstrate how to connect and interact with Firebolt database using this driver:

Creating a connection string
// Name of your Firebolt account
string account = "my_firebolt_account";
// Client credentials, that you want to use to connect
string clientId = "my_client_id";
string clientSecret = "my_client_secret";
// Name of database and engine to connect to (Optional)
string database = "my_database_name";
string engine = "my_engine_name";

// Construct a connection string using defined parameter
string conn_string = $"account={account};clientid={clientId};clientsecret={clientSecret};database={database};engine={engine}";
Creating and closing a connection
using FireboltDotNetSdk.Client;

// Create a new connection using generated connection string
using var conn = new FireboltConnection(conn_string);
// Open a connection
conn.Open();

// Execute SQL, fetch data, ...

// Close the connection after all operations are done
conn.Close();
Executing a SQL command
// First you would need to create a cursor
var cursor = conn.CreateCursor();

// Execute a SQL query and get a response object
var resp = cursor.Execute("SELECT * FROM my_table");

// Get the amount of rows returned
Console.WriteLine($"Fetched {resp.Rows} rows")

// Get column names and types
var columns = String.Join(", ", resp.Meta.Select(x => $"{x.Name}({x.Type})"));
Console.WriteLine($"Result columns: {columns}");

// Fetch the data from response object
foreach (var row in resp.Data) {
    Console.WriteLine(String.Join(",", row));
}

Execute command with SET parameter

var cursor = conn.CreateCursor();
cursor.Execute("SET time_zone=America/New_York");

var resp = cursor.Execute("SELECT '2000-01-01 12:00:00.123456 Europe/Berlin'::timestamptz as t");

// 2000-01-01 06:00:00.123456-05
Console.WriteLine(resp.Data[0][0]);
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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.1.1 58 5/14/2024
1.1.0 96 4/30/2024
1.0.0 93 2/5/2024
1.0.0-alpha 179 11/3/2023
0.2.0 232 3/3/2023
0.1.0 239 1/20/2023
0.0.1 274 8/19/2022

Initial release of a Firebolt .NET sdk. Supported features
- Authentication
- SQL Query execution
- SET statement support