cockroach: github.com/cockroachdb/cockroach/pkg/col/coltypes Index | Files

package coltypes

import "github.com/cockroachdb/cockroach/pkg/col/coltypes"

Index

Package Files

t_string.go types.go

Variables

var AllTypes []T

AllTypes is slice of all exec types.

var CompatibleTypes map[T][]T

CompatibleTypes maps a type to a slice of types that can be used with that type in a binary expression.

var FloatTypes = []T{Float64}

FloatTypes is a slice containing all float types.

var IntTypes = []T{Int16, Int32, Int64}

IntTypes is a slice containing all int types.

var NumberTypes = []T{Int16, Int32, Int64, Float64, Decimal}

NumberTypes is a slice containing all numeric types.

type T Uses

type T int

T represents an exec physical type - a bytes representation of a particular column type.

const (
    // Bool is a column of type bool
    Bool T   = iota
    // Bytes is a column of type []byte
    Bytes
    // Decimal is a column of type apd.Decimal
    Decimal
    // Int16 is a column of type int16
    Int16
    // Int32 is a column of type int32
    Int32
    // Int64 is a column of type int64
    Int64
    // Float64 is a column of type float64
    Float64

    // Unhandled is a temporary value that represents an unhandled type.
    // TODO(jordan): this should be replaced by a panic once all types are
    // handled.
    Unhandled
)

go:generate stringer -type=T

func FromGoType Uses

func FromGoType(v interface{}) T

FromGoType returns the type for a Go value, if applicable. Shouldn't be used at runtime.

func (T) AppendSlice Uses

func (t T) AppendSlice(target, src, destIdx, srcStartIdx, srcEndIdx string) string

AppendSlice is a function that should only be used in templates.

func (T) AppendVal Uses

func (t T) AppendVal(target, v string) string

AppendVal is a function that should only be used in templates.

func (T) CopySlice Uses

func (t T) CopySlice(target, src, destIdx, srcStartIdx, srcEndIdx string) string

CopySlice is a function that should only be used in templates.

func (T) CopyVal Uses

func (t T) CopyVal(dest, src string) string

CopyVal is a function that should only be used in templates.

func (T) Get Uses

func (t T) Get(target, i string) string

Get is a function that should only be used in templates.

func (T) GoTypeName Uses

func (t T) GoTypeName() string

GoTypeName returns the stringified Go type for an exec type.

func (T) GoTypeSliceName Uses

func (t T) GoTypeSliceName() string

GoTypeSliceName returns how a slice of the receiver type is represented.

func (T) Len Uses

func (t T) Len(target string) string

Len is a function that should only be used in templates.

func (T) Range Uses

func (t T) Range(loopVariableIdent string, target string) string

Range is a function that should only be used in templates.

func (T) Set Uses

func (t T) Set(target, i, new string) string

Set is a function that should only be used in templates.

func (T) Slice Uses

func (t T) Slice(target, start, end string) string

Slice is a function that should only be used in templates.

func (T) String Uses

func (i T) String() string

func (T) Zero Uses

func (t T) Zero(target string) string

Zero is a function that should only be used in templates.

Package coltypes imports 5 packages (graph) and is imported by 33 packages. Updated 2019-09-18. Refresh now. Tools for package owners.