using System.Text.Json;
namespace Bit.SeederApi.Execution;
///
/// Executor for dynamically resolving and executing queries by name.
/// This is an infrastructure component that orchestrates query execution,
/// not a domain-level query.
///
public interface IQueryExecutor
{
///
/// Executes a query with the given query name and arguments.
/// Queries are read-only and do not track entities or create seed IDs.
///
/// The name of the query (e.g., "EmergencyAccessInviteQuery")
/// Optional JSON arguments to pass to the query's Execute method
/// The result of the query execution
/// Thrown when the query is not found
/// Thrown when there's an error executing the query
object Execute(string queryName, JsonElement? arguments);
}