types

package
v0.0.0-...-267bd09 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2016 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Boolean

type Boolean struct{}

Boolean is a type specification, see the Factory interface

func (Boolean) Name

func (b Boolean) Name() string

type Date

type Date struct{}

Date is a type specification, see the Factory interface

func (Date) Name

func (d Date) Name() string

type DateTime

type DateTime struct{}

DateTime is a type specification, see the Factory interface

func (DateTime) Name

func (d DateTime) Name() string

type Factory

type Factory interface {
	// Type returns a concrete type as implemented by a particular engine.
	// It takes a type specification object (spec) which is used to
	// determine the concrete type by the implementor.
	Type(spec TypeSpec) (Type, error)
}

type Integer

type Integer struct {
	Big bool
}

Integer is a type specification, see the Factory interface or each dialect factory to know how it will be implemented in your sql dialect

func (Integer) Name

func (i Integer) Name() string

type JSON

type JSON struct{}

JSON is a type specification representing JSON data, see Factory interface

func (JSON) Name

func (j JSON) Name() string

type NotImplemented

type NotImplemented struct {
	EngineName string
	TypeName   string
}

func (NotImplemented) Error

func (e NotImplemented) Error() string

type Numeric

type Numeric struct{}

Numeric is a type specification, see the Factory interface

func (Numeric) Name

func (n Numeric) Name() string

type Serial

type Serial struct {
	Big bool
}

Serial is a type specification for an integer AUTO INCREMENT. See each dialect factory to know the specifics of how this will be treated (ie: postgres -> serial, sqlite -> int AUTO INCREMENT)

func (Serial) Name

func (s Serial) Name() string

type Text

type Text struct{}

Text is a type specification, see the Factory interface

func (Text) Name

func (t Text) Name() string

type Type

type Type interface {
	String() string
}

Type represents a concrete type, it provides a String method that returns the name of the type that will appear in SQL statements.

type TypeSpec

type TypeSpec interface {
	Name() string
}

TypeSpec is a wrapper around defined around the empty interface that represents a type specification, which can be any of any concrete type

type UUID

type UUID struct{}

UUID is a type specification, see the Factory interface

func (UUID) Name

func (u UUID) Name() string

type VarChar

type VarChar struct {
	MaxSize int
}

VarChar is a type specification, see the Factory interface

func (VarChar) Name

func (v VarChar) Name() string

Jump to

Keyboard shortcuts

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