FireboltNetSDK 1.0.0-alpha
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
<PackageReference Include="FireboltNetSDK" Version="1.0.0-alpha" />
paket add FireboltNetSDK --version 1.0.0-alpha
#r "nuget: FireboltNetSDK, 1.0.0-alpha"
// 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
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 | Versions 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. |
-
net6.0
- Microsoft.AspNetCore.Cryptography.KeyDerivation (>= 6.0.10)
- Microsoft.AspNetCore.WebUtilities (>= 2.2.0)
- Microsoft.CodeAnalysis.CSharp (>= 4.2.0)
- Newtonsoft.Json (>= 13.0.1)
- NodaTime (>= 3.1.6)
- NUnit (>= 3.13.3)
- NUnit3TestAdapter (>= 4.2.1)
- Portable.BouncyCastle (>= 1.9.0)
- SimpleCrypto.NetCore (>= 1.0.0)
- System.Data.Common (>= 4.3.0)
- System.Data.SqlClient (>= 4.8.5)
- Uno.UI (>= 4.5.14)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release of a Firebolt .NET sdk. Supported features
- Authentication
- SQL Query execution
- SET statement support