﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Embalming.NUnit.Database.SqlBuilders
{
    /// <summary>
    /// ISqlBuilder is an interface to absorb specifications of different SQLs by DB.
    /// </summary>
    public interface ISqlBuilder
    {
        /// <summary>
        /// Build SQL to find the number of records in the table of rawTableName that satisfy rawCriteria.
        /// </summary>
        /// <param name="placeholderBuilder">Placeholder generation rules.</param>
        /// <param name="rawTableName">Target table name.</param>
        /// <param name="rawCriteria">Where clause criteria.</param>
        /// <returns>Record counting SQL.</returns>
        string BuildCount(Func<string, string> placeholderBuilder, string rawTableName, IDictionary<string, object> rawCriteria);
    }
}
