database

package
v0.0.0-...-ba27ea9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeBoolean   = "BOOLEAN"
	TypeInteger   = "INTEGER"
	TypeBigInt    = "BIGINT"
	TypeFloat     = "FLOAT"
	TypeDecimal   = "DECIMAL"
	TypeDate      = "DATE"
	TypeTime      = "TIME"
	TypeTimestamp = "TIMESTAMP"
	TypeString    = "STRING"
)

Variables

View Source
var (
	ErrAlreadyExists = errors.New("already exists")
)

Functions

This section is empty.

Types

type BuiltinType

type BuiltinType struct {
	// contains filtered or unexported fields
}

func NewTypeBigInt

func NewTypeBigInt() *BuiltinType

func NewTypeBoolean

func NewTypeBoolean() *BuiltinType

func NewTypeDate

func NewTypeDate() *BuiltinType

func NewTypeDecimal

func NewTypeDecimal() *BuiltinType

func NewTypeFloat

func NewTypeFloat() *BuiltinType

func NewTypeInteger

func NewTypeInteger() *BuiltinType

func NewTypeString

func NewTypeString() *BuiltinType

func NewTypeTime

func NewTypeTime() *BuiltinType

func NewTypeTimestamp

func NewTypeTimestamp() *BuiltinType

func (BuiltinType) Name

func (t BuiltinType) Name() string

type Column

type Column struct {
	// contains filtered or unexported fields
}

func NewColumn

func NewColumn(name string, _type Type) (Column, error)

func (Column) Name

func (column Column) Name() string

func (Column) Type

func (column Column) Type() Type

type Definition

type Definition struct {
	// contains filtered or unexported fields
}

func NewDefinition

func NewDefinition(defaultSchema string) Definition

func (*Definition) CreateSchema

func (def *Definition) CreateSchema(name string) (*Schema, error)

func (Definition) DefaultSchema

func (def Definition) DefaultSchema() *Schema

func (Definition) Schema

func (def Definition) Schema(name string) *Schema

func (Definition) Schemas

func (def Definition) Schemas() []*Schema

type Schema

type Schema struct {
	// contains filtered or unexported fields
}

func (*Schema) CreateTable

func (schema *Schema) CreateTable(name string) (*Table, error)

func (Schema) Name

func (schema Schema) Name() string

func (Schema) Table

func (schema Schema) Table(name string) *Table

func (Schema) Tables

func (schema Schema) Tables() []*Table

type Table

type Table struct {
	// contains filtered or unexported fields
}

func (*Table) AddColumn

func (table *Table) AddColumn(column Column) error

func (Table) Column

func (table Table) Column(name string) *Column

func (Table) Columns

func (table Table) Columns() []*Column

func (Table) Name

func (table Table) Name() string

type Type

type Type interface {
	// contains filtered or unexported methods
}

Directories

Path Synopsis
parser

Jump to

Keyboard shortcuts

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