types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2017 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	True  = &internalTrue
	False = &internalFalse
)

Provide a nullable boolean for Boolean type default values

Functions

func BigInt

func BigInt() numeric

func Boolean

func Boolean() (t boolean)

Boolean creats a new BOOLEAN datatype

func Char

func Char(n int) character

func Character

func Character(n int) (t character)

func Date

func Date() datetime

func Datetime

func Datetime() datetime

func Decimal

func Decimal(precision, scale int) numeric

func Double

func Double() numeric

func Float

func Float() numeric

func Integer

func Integer() numeric

func Numeric

func Numeric(precision, scale int) numeric

func Real

func Real() numeric

func SmallInt

func SmallInt() numeric

func Text

func Text() (t character)

func Timestamp

func Timestamp() datetime

func Varchar

func Varchar(limit ...int) (t character)

Varchar creates a new VARCHAR. Limit will be set if an argument is given - all subsequent arguments will be ignored

Types

type BaseType

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

BaseType is foundational datatype that includes fields that nearly all datatypes implement

func Base

func Base(name string) BaseType

Base creates a new BaseType

func (BaseType) Create

func (base BaseType) Create(d dialect.Dialect) (string, error)

Create generates the

func (*BaseType) NotNull

func (base *BaseType) NotNull()

NotNull sets the BaseType to NOT NULL

func (BaseType) Options

func (base BaseType) Options() (compiled []string)

Options returns the BaseTYPE options as a slice of strings

func (*BaseType) Unique

func (base *BaseType) Unique()

Unique sets the BaseType to UNIQUE

type Type

type Type interface {
	Create(dialect.Dialect) (string, error)
}

Jump to

Keyboard shortcuts

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