FQL\Sql\Provider is the single public entry point to the FQL compiler pipeline. It exposes the same parser, evaluator, and formatter that power the fluent API, so you can pre-validate queries, pretty-print them, or lint them before executing.
Method overview
Compiling a query
Provider::compile() produces the same Query object as Query\Provider::fql(). Parse errors throw FQL\Sql\Parser\ParseException (a subclass of UnexpectedValueException) carrying the offending token and its line and column.
Pretty-printing and highlighting
format() re-emits an FQL string through the AST formatter, normalising whitespace and casing. highlight() returns an annotated string for terminal (bash) or browser (html) output.
Query and a parsed FQL string of the same query render identically — Query::__toString() routes through the same AST formatter.
Linting
Provider::lint() runs a set of static rules over the parsed AST and returns a LintReport containing zero or more LintIssue records. Each issue carries a severity (Severity::Error, Severity::Warning, Severity::Notice), a rule name, a message, and source location.
Built-in rules:
FQL\Sql\Lint\Rule interface and adding them to the linter.
Parsing single expressions
parseExpression() and parseCondition() are useful when you want to inspect or reuse the AST for one fragment without compiling a full query. They share the same parser the fluent helpers use internally — select, groupBy, orderBy, where, having, and every scalar/aggregate helper route their field arguments through parseExpression().
The
Sql\Provider facade replaces the legacy FQL\Sql\Sql and FQL\Sql\SqlLexer classes that existed before FiQueLa 3.0. Use Provider::compile() instead of instantiating those classes directly.