sql

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BigInteger = bigIntegerType{}
View Source
var ErrInvalidType = errors.New("invalid type")
View Source
var Integer = integerType{}
View Source
var String = stringType{}
View Source
var Timestamp = timestampType{}

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	Databases []Database
}

func (Catalog) Database

func (c Catalog) Database(name string) (Database, error)

func (Catalog) Table

func (c Catalog) Table(dbName string, tableName string) (PhysicalRelation, error)

type Database

type Database interface {
	Nameable
	Relations() map[string]PhysicalRelation
}

type Expression

type Expression interface {
	Resolvable
	Type() Type
	Name() string
	Eval(Row) interface{}
	TransformUp(func(Expression) Expression) Expression
}

type Field

type Field struct {
	Name string
	Type Type
}

type MemoryRow

type MemoryRow []interface{}

func NewMemoryRow

func NewMemoryRow(fields ...interface{}) MemoryRow

func (MemoryRow) Fields

func (r MemoryRow) Fields() []interface{}

type Nameable

type Nameable interface {
	Name() string
}

type Node

type Node interface {
	Resolvable
	Transformable
	Schema() Schema
	Children() []Node
	RowIter() (RowIter, error)
}

type PhysicalRelation

type PhysicalRelation interface {
	Nameable
	Node
}

type Resolvable

type Resolvable interface {
	Resolved() bool
}

type Row

type Row interface {
	Fields() []interface{}
}

type RowIter

type RowIter interface {
	Next() (Row, error)
}

type Schema

type Schema []Field

type Transformable

type Transformable interface {
	TransformUp(func(Node) Node) Node
	TransformExpressionsUp(func(Expression) Expression) Node
}

type Type

type Type interface {
	Name() string
	InternalType() reflect.Kind
	Check(interface{}) bool
	Convert(interface{}) (interface{}, error)
	Compare(interface{}, interface{}) int
}
var Boolean Type = booleanType{}
var Float Type = floatType{}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL