// resetContexts (re-)initializes the structures // needed for expression handling. func (p *planner) resetContexts() { // Need to reset the parser because it cannot be reused between // batches. p.parser = parser.Parser{} p.semaCtx = parser.MakeSemaContext() p.semaCtx.Location = &p.session.Location p.evalCtx = parser.EvalContext{ Location: &p.session.Location, } }
// resetContexts (re-)initializes the structures // needed for expression handling. func (p *planner) resetContexts() { // Need to reset the parser because it cannot be reused between // batches. p.parser = parser.Parser{} p.semaCtx = parser.MakeSemaContext() p.semaCtx.Location = &p.session.Location p.semaCtx.SearchPath = p.session.SearchPath p.evalCtx = parser.EvalContext{ Location: &p.session.Location, Database: p.session.Database, SearchPath: p.session.SearchPath, Planner: p, } }