func NewViewRegistry() *ViewRegistry {
	return &ViewRegistry{
		views: make(map[ViewKey]*View),
	}
}
NewViewRegistry creates an empty ViewRegistry.
package sql
import (
	"strings"
	"sync"
)
type View struct {
	name           string
	definition     Node
	textDefinition string
}
func NewView(name string, definition Node, textDefinition string) *View {
	return &View{name, definition, textDefinition}
}
func (v *View) Name() string {
	return v.name
}
func (v *View) Definition() Node {
	return v.definition
}
func (v *View) TextDefinition() string {
	return v.textDefinition
}
type ViewKey struct {
	dbName, viewName string
}
func NewViewKey(databaseName, viewName string) ViewKey {
	return ViewKey{strings.ToLower(databaseName), strings.ToLower(viewName)}
}
type ViewRegistry struct {
	mutex sync.RWMutex
	views map[ViewKey]*View
}