public ISqlNode Visit(ISqlNode n) { if (n == null) { return(null); } if (n is ISqlSymbolScopeNode scoped) { PushSymbolTable(scoped); var result = n.Accept(this); PopSymbolTable(); return(result); } n = _currentSymbolTable?.ResolveIdentifier(n) ?? n; return(n.Accept(this)); }
internal SqlParserResult Build() { var context = new Context(_config); _node.Accept(this, context); var result = new SqlParserResult(); result.ParsedSql = context.GetRawSql().Trim(); result.DebugSql = context.GetFormattedSql().Trim(); result.DbDataParameters = context.SqlParameters.Values.ToList(); return(result); }