analyzeParsed method

AnalysisContext analyzeParsed(
  1. ParseResult result, {
  2. AnalyzeStatementOptions? stmtOptions,
})

Analyzes a parsed result statement. The AnalysisContext returned contains all information about type hints, errors, and the parsed AST.

The analyzer needs to know all the available tables to resolve references and result columns, so all known tables should be registered using registerTable before calling this method. The stmtOptions can be used to pass additional options used to analyze this statement only.

Implementation

AnalysisContext analyzeParsed(ParseResult result,
    {AnalyzeStatementOptions? stmtOptions}) {
  final node = result.rootNode;

  final context = _createContext(node, result.sql, stmtOptions);
  _analyzeContext(context);

  return context;
}