Exemplo n.º 1
0
// 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,
	}
}
Exemplo n.º 2
0
// 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,
	}
}