Skip to content
Documentation

ISqlStorageProvider Interface

Root interface for SQL-based storage providers, supporting execution of parameterless SQL statements.

public interface ISqlStorageProvider : HAKOM.Persistence.Core.Net.Api.Storage.IStorageProvider

Derived
↳ ISqlStorageProvider<TParameter,TParameterFactory,TReader>
↳ ISqlStorageProvider<TReader>
↳ SqlStorageProvider<TConnection,TCommand,TNativeParameter,TReader,TParameter,TParameterFactory>

Implements IStorageProvider

Follows the Try/Result pattern: TryExecute(string, CancellationToken) returns a Result<TValue> and never throws, while Execute(string, CancellationToken) is the throwing convenience wrapper.

ISqlStorageProvider.Execute(string, CancellationToken) Method

Section titled “ISqlStorageProvider.Execute(string, CancellationToken) Method”

Executes the specified SQL statement and returns the number of affected rows.

System.Threading.Tasks.Task<int> Execute(string sql, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

sql System.String

The SQL statement to execute.

cancellationToken System.Threading.CancellationToken

Propagates notification that the operation should be canceled.

System.Threading.Tasks.Task<System.Int32>
The number of rows affected by the statement.

ISqlStorageProvider.TryExecute(string, CancellationToken) Method

Section titled “ISqlStorageProvider.TryExecute(string, CancellationToken) Method”

Attempts to execute the specified SQL statement and returns a Result<TValue> containing the number of affected rows or an error.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<int>> TryExecute(string sql, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

sql System.String

The SQL statement to execute.

cancellationToken System.Threading.CancellationToken

Propagates notification that the operation should be canceled.

System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result<System.Int32>>
A Result<TValue> with the number of affected rows on success, or an error on failure.

© 2026 Volue.Version v0.6.38017 November 2026