SpanFlow.Connectors.Database
1.0.0
dotnet add package SpanFlow.Connectors.Database --version 1.0.0
NuGet\Install-Package SpanFlow.Connectors.Database -Version 1.0.0
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="SpanFlow.Connectors.Database" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpanFlow.Connectors.Database" Version="1.0.0" />
<PackageReference Include="SpanFlow.Connectors.Database" />
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 SpanFlow.Connectors.Database --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SpanFlow.Connectors.Database, 1.0.0"
#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.
#:package SpanFlow.Connectors.Database@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpanFlow.Connectors.Database&version=1.0.0
#tool nuget:?package=SpanFlow.Connectors.Database&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SpanFlow.Connectors.Database
One adapter interface over PostgreSQL, SQL Server, MySQL/MariaDB and SQLite. It comes from SpanFlow, where it runs every database step of a pipeline.
IDbProviderAdapter, one per database: opens a connection, quotes identifiers, lists tables, columns and foreign keys, and builds upserts and paging clauses in that database's own SQL.DbProviderRegistrypicks an adapter by name (postgres,sqlserver,mysql,sqlite). It can also wrap every adapter it hands out, for example to refuse servers your host doesn't allow.QueryAdvisor.Inspect(sql)reviews a query before it runs: it flagsSELECT *and aSELECTwith no row limit, and suggests the fix in the right dialect (LIMIT,TOPorFETCH FIRST).SqlFingerprintgives a query a canonical form, so two saved queries written differently are recognised as the same one.
using SpanFlow.Connectors.Database;
var registry = new DbProviderRegistry([new PostgresAdapter(), new SqlServerAdapter(), new MySqlAdapter(), new SqliteAdapter()]);
var sqlite = registry.Get("sqlite");
await using var connection = sqlite.CreateConnection("Data Source=app.db");
await connection.OpenAsync();
foreach (var table in await sqlite.ListTablesAsync(connection, CancellationToken.None))
{
var columns = await sqlite.ListColumnsAsync(connection, table.QualifiedName, CancellationToken.None);
Console.WriteLine($"{table.QualifiedName}: {string.Join(", ", columns.Select(c => c.Name))}");
}
foreach (var advice in QueryAdvisor.Inspect("SELECT * FROM orders"))
{
Console.WriteLine($"{advice.Severity}: {advice.Message} {advice.Suggestion}");
}
Targets .NET 8, 9 and 10. MIT licensed.
| 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 is compatible. 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 is compatible. 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.
-
net10.0
- Microsoft.Data.SqlClient (>= 7.0.3)
- Microsoft.Data.Sqlite (>= 10.0.12)
- MySqlConnector (>= 2.6.2)
- Npgsql (>= 10.0.3)
- SpanFlow.Expressions (>= 1.0.0)
-
net8.0
- Microsoft.Data.SqlClient (>= 7.0.3)
- Microsoft.Data.Sqlite (>= 10.0.12)
- MySqlConnector (>= 2.6.2)
- Npgsql (>= 10.0.3)
- SpanFlow.Expressions (>= 1.0.0)
-
net9.0
- Microsoft.Data.SqlClient (>= 7.0.3)
- Microsoft.Data.Sqlite (>= 10.0.12)
- MySqlConnector (>= 2.6.2)
- Npgsql (>= 10.0.3)
- SpanFlow.Expressions (>= 1.0.0)
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.0 | 79 | 11/9/2026 |