/// Provides eSQL text Parsing and Compilation services.
/// </summary>
/// <remarks>
/// This class exposes services that perform syntactic and semantic analysis of eSQL commands.
/// The syntactic validation ensures the given command conforms to eSQL formal grammar. The semantic analysis will
/// perform (list not exhaustive): type resolution and validation, ensure semantic and scoping rules, etc.
/// The services exposed by this class are:
/// <list>
/// <item>Translation from eSQL text commands to valid <see cref="DbCommandTree"/>s</item>
/// <item>Translation from eSQL text commands to valid <see cref="DbExpression"/>s</item>
/// </list>
/// Queries can be formulated in O-Space, C-Space and S-Space and the services exposed by this class are agnostic of the especific typespace or
/// metadata instance passed as required parameter in the semantic analysis by the perspective parameter. It is assumed that the perspective and
/// metadata was properly initialized.
/// Provided that the command is syntacticaly correct and meaningful within the given typespace, the result will be a valid <see cref="DbCommandTree"/> or
/// <see cref="DbExpression"/> otherwise EntityException will be thrown indicating the reason(s) why the given command cannot be accepted.
/// It is also possible that MetadataException and MappingException be thrown if mapping or metadata related problems are encountered during compilation.
/// </remarks>
/// <list>
/// <item><seealso cref="ParserOptions"/></item>
/// <item><seealso cref="DbCommandTree"/></item>
/// <item><seealso cref="DbExpression"/></item>
/// </list>
internalstaticclassCqlQuery
{
/// <summary>
/// Compiles an eSQL command producing a validated <see cref="DbCommandTree"/>.
/// <returns>The query expression tree produced by parsing the given query command.</returns>
/// <exception cref="System.Data.EntityException">Thrown when Syntatic or Semantic rules are violated and the query expression cannot be accepted</exception>
/// <exception cref="System.Data.MetadataException">Thrown when metadata related service requests fail</exception>
/// <exception cref="System.Data.MappingException">Thrown when mapping related service requests fail</exception>
/// <returns>a parse result with a valid command tree</returns>
/// <remarks>Parameters name/types must be bound before invoking this method</remarks>
/// <exception cref="System.Data.EntityException">Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted.</exception>
/// <exception cref="System.Data.MetadataException">Thrown as inner exception of a EntityException when metadata related service requests fail.</exception>
/// <exception cref="System.Data.MappingException">Thrown as inner exception of a EntityException when mapping related service requests fail.</exception>
/// <remarks>Parameters name/types must be bound before invoking this method</remarks>
/// <exception cref="System.Data.EntityException">Thrown when Syntatic or Semantic rules are violated and the query cannot be accepted.</exception>
/// <exception cref="System.Data.MetadataException">Thrown as inner exception of a EntityException when metadata related service requests fail.</exception>
/// <exception cref="System.Data.MappingException">Thrown as inner exception of a EntityException when mapping related service requests fail.</exception>