-
✅ Parameterized query binding fixed (Issue #336): named-parameter binding is token-aware, so parameter names that are prefixes of others (e.g.
@tvs@tid) no longer corrupt the SQL. -
✅ Server parameter pass-through fixed (Issue #337):
request.Parametersare forwarded on gRPC, the binary (PostgreSQL) protocol and WebSocket. -
✅ ULID encoding is now standards-compliant: ULIDs follow the official Crockford Base32 spec and are interchangeable with Python/Java/Go implementations.
-
✅ NuGet dependencies updated to their latest stable versions.
-
✅ Aligned package metadata and version references to the synchronized 1.9.5 release line.
-
✅ Release automation now publishes all packable SharpCoreDB packages in CI/CD.
-
✅ Full ADO.NET Compliance - Standard interfaces
-
✅ Connection Pooling - Efficient resource management
-
✅ Async Support - Non-blocking operations
-
✅ Parameterized Queries - Safe from SQL injection
-
✅ Transactions - ACID compliance
-
✅ Schema Discovery - GetSchema() support
-
✅ AES-256-GCM Encryption - At rest
-
✅ SIMD Acceleration - Analytics queries
-
✅ Phase 9 Analytics - COUNT, AVG, STDDEV, PERCENTILE, window functions
-
✅ Cross-Platform - Windows, Linux, macOS
- Package version standardized to
v1.9.5 - Documentation refreshed to align with current provider behavior
- Inherits core metadata durability and parser reliability fixes
dotnet add package SharpCoreDB.Data.Provider --version 2.0.0.0Requirements: .NET 10.0+
using SharpCoreDB.Data;
const string connectionString = "Data Source=./myapp.db;Password=SecurePassword!";
using var connection = new SharpCoreDBConnection(connectionString);
await connection.OpenAsync();
// Create command
using var command = connection.CreateCommand();
command.CommandText = "SELECT * FROM users WHERE age > @minAge";
command.Parameters.AddWithValue("@minAge", 18);
// Execute
using var reader = await command.ExecuteReaderAsync();
while (await reader.ReadAsync())
{
Console.WriteLine($"User: {reader["name"]}");
}// Get factory
var factory = DbProviderFactories.GetFactory("SharpCoreDB");
// Create connection
using var connection = factory.CreateConnection();
connection.ConnectionString = "Data Source=./app.db;Password=secure!";
await connection.OpenAsync();services.AddSharpCoreDBDataProvider("Data Source=./app.db;Password=secure!");
// Inject DbConnection factory
public class UserRepository
{
private readonly DbConnection _connection;
public UserRepository(SharpCoreDBConnectionFactory factory)
{
_connection = factory.CreateConnection();
}
}- Full ADO.NET compatibility (
DbConnection,DbCommand,DbDataReader) - Async operations, transactions, and parameterized queries
- Connection pooling and schema discovery support
- Uses SharpCoreDB encryption and performance capabilities
| Method | Purpose |
|---|---|
OpenAsync() |
Open connection |
CloseAsync() |
Close connection |
BeginTransactionAsync() |
Start transaction |
CreateCommand() |
Create command |
GetSchemaAsync(collection) |
Get schema information |
ChangeDatabase(name) |
Switch database |
| Method | Purpose |
|---|---|
ExecuteNonQueryAsync() |
Execute INSERT/UPDATE/DELETE |
ExecuteScalarAsync() |
Get first cell result |
ExecuteReaderAsync() |
Get data reader |
PrepareAsync() |
Prepare command (optional) |
| Method | Purpose |
|---|---|
ReadAsync() |
Advance to next row |
GetValue(ordinal) |
Get value by index |
GetFieldValue<T>(ordinal) |
Get typed value |
IsDBNull(ordinal) |
Check for NULL |
GetOrdinal(name) |
Get column index by name |
public class UserRepository
{
private readonly string _connectionString;
public UserRepository(string connectionString)
{
_connectionString = connectionString;
}
public async Task<User> GetUserAsync(int id)
{
using var connection = new SharpCoreDBConnection(_connectionString);
await connection.OpenAsync();
using var command = connection.CreateCommand();
command.CommandText = "SELECT * FROM users WHERE id = @id";
command.Parameters.AddWithValue("@id", id);
using var reader = await command.ExecuteReaderAsync();
if (await reader.ReadAsync())
{
return new User
{
Id = (int)reader["id"],
Name = (string)reader["name"],
Age = (int)reader["age"]
};
}
return null;
}
}public async Task<DataSet> GetUserDataSetAsync()
{
using var connection = new SharpCoreDBConnection(_connectionString);
await connection.OpenAsync();
using var adapter = new DbDataAdapter
{
SelectCommand = connection.CreateCommand()
{
CommandText = "SELECT id, name, age FROM users"
}
};
var dataSet = new DataSet();
await adapter.FillAsync(dataSet);
return dataSet;
}- Use Connection Pooling - Default pool size of 5
- Parameterized Queries - Prevent SQL injection and reuse plans
- Batch Operations - Use DbDataAdapter for bulk changes
- Async All The Way - Use ...Async() methods
- Close Readers - Use
usingstatements
- Core SharpCoreDB - Database engine
- Extensions - Dapper, repositories
- Entity Framework Core - EF Core provider
- Manual - Complete guide
MIT License - See LICENSE
Last Updated: April 26, 2026 | Version 1.9.5
