Add project files.

This commit is contained in:
2025-08-18 17:11:43 +03:30
parent 807dc263be
commit e5eb10d604
3943 changed files with 223719 additions and 0 deletions
@@ -0,0 +1,14 @@
using Elsa.Sql.Client;
namespace Elsa.Sql.Contracts;
public interface ISqlClientFactory
{
/// <summary>
/// Create an instance of the registered client.
/// </summary>
/// <param name="clientName">The name of the registered client to create. This can either be clientName used during registration or the default nameof(client) itself.</param>
/// <param name="connectionString">Connection string.</param>
/// <returns></returns>
public ISqlClient CreateClient(string clientName, string connectionString);
}
@@ -0,0 +1,11 @@
namespace Elsa.Sql.Contracts;
public interface ISqlClientNamesProvider
{
/// <summary>
/// Returns a dictionary of registered clients.
/// </summary>
/// <param name="cancellationToken">A token to monitor cancellation requests.</param>
/// <returns>A <see cref="Dictionary{TKey, TValue}"/> of registered client names their <see cref="Type"/>.</returns>
Task<IReadOnlyDictionary<string, Type>> GetRegisteredSqlClientNamesAsync(CancellationToken cancellationToken);
}
@@ -0,0 +1,26 @@
using Elsa.Expressions.Models;
using Elsa.Sql.Models;
using JetBrains.Annotations;
namespace Elsa.Sql.Contracts;
/// <summary>
/// Evaluates SQL expressions.
/// </summary>
[PublicAPI]
public interface ISqlEvaluator
{
/// <summary>
/// Evaluates a SQL expression.
/// </summary>
/// <param name="expression">The expression to evaluate.</param>
/// <param name="context">The context in which the expression is evaluated.</param>
/// <param name="options">A set of options.</param>
/// <param name="cancellationToken">An optional cancellation token.</param>
/// <returns>The <see cref="EvaluatedQuery"/> result.</returns>
Task<EvaluatedQuery> EvaluateAsync(
string expression,
ExpressionExecutionContext context,
ExpressionEvaluatorOptions options,
CancellationToken cancellationToken = default);
}