namespace ZB.MOM.WW.OtOpcUa.Driver.Sql.Contracts;

/// <summary>Which ADO.NET provider/dialect backs a Sql driver instance. v1 constructs only SqlServer.</summary>
public enum SqlProvider
{
    /// <summary>Microsoft SQL Server via <c>Microsoft.Data.SqlClient</c> — the only provider v1 constructs.</summary>
    SqlServer,

    /// <summary>PostgreSQL (Npgsql) — reserved for P2; not constructed in v1.</summary>
    Postgres,

    /// <summary>MySQL / MariaDB — reserved; not constructed in v1.</summary>
    MySql,

    /// <summary>Generic ODBC — reserved for P2; not constructed in v1.</summary>
    Odbc,

    /// <summary>Oracle — reserved; not constructed in v1.</summary>
    Oracle,
}

/// <summary>Tag→value mapping model. v1 ships KeyValue + WideRow; Query is deferred (design §5.4 / P3).</summary>
public enum SqlTagModel
{
    /// <summary>
    ///     Key-value (EAV) table: one row per tag, selected by <c>keyColumn = keyValue</c>, value read from
    ///     <c>valueColumn</c>.
    /// </summary>
    KeyValue,

    /// <summary>
    ///     Wide row: one row holds many signals as columns; the tag names its <c>columnName</c> and the row is
    ///     picked by a row selector (a <c>whereColumn</c>/<c>whereValue</c> pair, or newest-by-timestamp).
    /// </summary>
    WideRow,

    /// <summary>Named arbitrary-SELECT query (design §5.4). <b>Deferred to P3 — not accepted by v1's parser.</b></summary>
    Query,
}
