sql

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2016 License: MIT Imports: 7 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 Null = nullType{}
View Source
var String = stringType{}
View Source
var TimestampWithTimezone = timestampWithTimeZoneType{}

TimestampWithTimezone is a timestamp with timezone.

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) (Table, error)

type Database

type Database interface {
	Nameable
	Tables() map[string]Table
}

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 Resolvable

type Resolvable interface {
	Resolved() bool
}

type Row

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

func NodeToRows added in v0.2.0

func NodeToRows(n Node) ([]Row, error)

func RowIterToRows added in v0.2.0

func RowIterToRows(i RowIter) ([]Row, error)

type RowIter

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

type Schema

type Schema []Field

func (Schema) CheckRow added in v0.2.0

func (s Schema) CheckRow(row Row) error

type Table added in v0.1.0

type Table interface {
	Nameable
	Node
}

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{}

type UnresolvedDatabase added in v0.1.0

type UnresolvedDatabase struct{}

func (*UnresolvedDatabase) Name added in v0.1.0

func (d *UnresolvedDatabase) Name() string

func (*UnresolvedDatabase) Tables added in v0.1.0

func (d *UnresolvedDatabase) Tables() map[string]Table

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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