value

package
v0.2.1-0...-323e3c0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ConvertsionError

func ConvertsionError(convErr error, typ reflect.Type) error

func OverflowErr

func OverflowErr(i interface{}, typ reflect.Type) error

Types

type Cell

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

func NewCell

func NewCell(colTypName string) *Cell

func (Cell) AsInterface

func (c Cell) AsInterface() (interface{}, error)

func (Cell) Bool

func (c Cell) Bool() (bool, error)

func (Cell) Float32

func (c Cell) Float32() (float32, error)

func (Cell) Float64

func (c Cell) Float64() (float64, error)

func (*Cell) GetByte

func (c *Cell) GetByte() []byte

func (Cell) Int32

func (c Cell) Int32() (int32, error)

func (Cell) Int64

func (c Cell) Int64() (int64, error)

func (Cell) IsNull

func (c Cell) IsNull() bool

func (Cell) IsValid

func (c Cell) IsValid() bool

func (Cell) Kind

func (c Cell) Kind() reflect.Kind

func (Cell) NullBool

func (c Cell) NullBool() (sql.NullBool, error)

func (Cell) NullFloat64

func (c Cell) NullFloat64() (sql.NullFloat64, error)

func (Cell) NullInt32

func (c Cell) NullInt32() (sql.NullInt32, error)

func (Cell) NullInt64

func (c Cell) NullInt64() (sql.NullInt64, error)

func (Cell) NullString

func (c Cell) NullString() (sql.NullString, error)

func (Cell) NullTime

func (c Cell) NullTime() (sql.NullTime, error)

func (*Cell) Scan

func (c *Cell) Scan(src interface{}) error

implements database/sql scan interface

func (*Cell) SetBool

func (c *Cell) SetBool(d bool)

func (*Cell) SetFloat64

func (c *Cell) SetFloat64(d float64)

func (*Cell) SetInt64

func (c *Cell) SetInt64(d int64)

func (*Cell) SetNull

func (c *Cell) SetNull()

func (*Cell) SetString

func (c *Cell) SetString(d string)

func (*Cell) SetTime

func (c *Cell) SetTime(d time.Time)

func (Cell) String

func (c Cell) String() (string, error)

func (Cell) Time

func (c Cell) Time() (time.Time, error)

func (Cell) Timestamp

func (c Cell) Timestamp() (timestamp.Timestamp, error)

func (Cell) Uid

func (c Cell) Uid() string

func (Cell) Uint32

func (c Cell) Uint32() (uint32, error)

func (Cell) Uint64

func (c Cell) Uint64() (uint64, error)

type Value

type Value int

Value represents go data types which carta supports for loading as well as what data types arrive from the sql driver

const (
	Invalid Value = iota
	Time
	Timestamp
	NullBool
	NullFloat64
	NullInt32
	NullInt64
	NullString
	NullTime
	Float64
	Float32
	Int
	Int8
	Int16
	Int32
	Uint
	Uint8
	Uint16
	Uint32
	Int64
	Uint64
	Bool
	String //  note, []uint8get converted to string, this is because mysql returns []uint8 for varchar while pg returns string
)

NOTE, carta does NOT support loading []uint8, any data that arrives from sql database as []uint8 is converted to bytes and expected field type is a string or *string

Jump to

Keyboard shortcuts

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