Documentation ¶
Index ¶
- Constants
- Variables
- func IsDataEqual(d1 Data, d2 Data) bool
- type Array
- func (a *Array) Append(data ...interface{}) error
- func (a *Array) Index(i int) Data
- func (a *Array) Len() int
- func (a *Array) SafeAppend(data ...interface{}) error
- func (a *Array) Scan(value interface{}) error
- func (a *Array) SetType(typ *datatype.ArrayType)
- func (a *Array) Sql() string
- func (a *Array) String() string
- func (a *Array) ToSlice() []Data
- func (a *Array) Type() datatype.DataType
- func (a *Array) TypeInfer() (datatype.DataType, error)
- func (a *Array) UnSafeAppend(data ...Data)
- type BigInt
- type Binary
- type Bool
- type Char
- type CharOverflowError
- type Data
- type Date
- type DateTime
- type Decimal
- type Double
- type Float
- type Int
- type IntervalDayTime
- func (i IntervalDayTime) Days() int32
- func (i IntervalDayTime) Hours() int32
- func (i IntervalDayTime) MillisecondsFraction() int32
- func (i IntervalDayTime) Minutes() int32
- func (i IntervalDayTime) NanosFraction() int32
- func (i *IntervalDayTime) Scan(value interface{}) error
- func (i IntervalDayTime) Seconds() int64
- func (i IntervalDayTime) SecondsFraction() int32
- func (i IntervalDayTime) Sql() string
- func (i IntervalDayTime) String() string
- func (i IntervalDayTime) Type() datatype.DataType
- type IntervalYearMonth
- type Map
- func (m *Map) SafeSet(keyI Data, valueI Data) error
- func (m *Map) Scan(value interface{}) error
- func (m *Map) Set(keyI interface{}, valueI interface{}) error
- func (m *Map) Sql() string
- func (m *Map) String() string
- func (m *Map) ToGoMap() map[Data]Data
- func (m *Map) Type() datatype.DataType
- func (m *Map) TypeInfer() (datatype.DataType, error)
- type NullData
- type Record
- type SmallInt
- type String
- type Struct
- func (s *Struct) Fields() []StructField
- func (s *Struct) FillGoStruct(i interface{}) error
- func (s *Struct) GetField(fieldName string) Data
- func (s *Struct) SafeSetField(fieldName string, i interface{}) error
- func (s *Struct) Scan(value interface{}) error
- func (s *Struct) SetField(fieldName string, a interface{}) error
- func (s *Struct) Sql() string
- func (s *Struct) String() string
- func (s *Struct) Type() datatype.DataType
- func (s *Struct) TypeInfer() (datatype.DataType, error)
- type StructField
- type Timestamp
- type TinyInt
- type VarChar
Constants ¶
View Source
const ( DateFormat = "2006-01-02" DateTimeFormat = "2006-01-02 15:04:05" TimeStampFormat = "2006-01-02 15:04:05.000" )
Variables ¶
View Source
var InvalidDecimalErr = errors.New("invalid decimal")
View Source
var Null = NullData{}
Functions ¶
func IsDataEqual ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
func ArrayFromSlice ¶
func NewArrayWithType ¶
func (*Array) SafeAppend ¶
func (*Array) UnSafeAppend ¶
type CharOverflowError ¶
type CharOverflowError struct {
// contains filtered or unexported fields
}
func NewCharOverflowError ¶
func NewCharOverflowError(maxLen, realLen int) CharOverflowError
func (CharOverflowError) Error ¶
func (c CharOverflowError) Error() string
type Data ¶
func TryConvertGoToOdpsData ¶
type DateTime ¶
func NewDateTime ¶
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
func DecimalFromStr ¶
func NewDecimal ¶
type IntervalDayTime ¶
type IntervalDayTime struct {
// contains filtered or unexported fields
}
func NewIntervalDayTime ¶
func NewIntervalDayTime(totalSeconds int64, nanos int32) IntervalDayTime
func (IntervalDayTime) Days ¶
func (i IntervalDayTime) Days() int32
func (IntervalDayTime) Hours ¶
func (i IntervalDayTime) Hours() int32
func (IntervalDayTime) MillisecondsFraction ¶
func (i IntervalDayTime) MillisecondsFraction() int32
func (IntervalDayTime) Minutes ¶
func (i IntervalDayTime) Minutes() int32
func (IntervalDayTime) NanosFraction ¶
func (i IntervalDayTime) NanosFraction() int32
func (*IntervalDayTime) Scan ¶
func (i *IntervalDayTime) Scan(value interface{}) error
func (IntervalDayTime) Seconds ¶
func (i IntervalDayTime) Seconds() int64
func (IntervalDayTime) SecondsFraction ¶
func (i IntervalDayTime) SecondsFraction() int32
func (IntervalDayTime) Sql ¶
func (i IntervalDayTime) Sql() string
func (IntervalDayTime) String ¶
func (i IntervalDayTime) String() string
func (IntervalDayTime) Type ¶
func (i IntervalDayTime) Type() datatype.DataType
type IntervalYearMonth ¶
type IntervalYearMonth int32
func (*IntervalYearMonth) Scan ¶
func (i *IntervalYearMonth) Scan(value interface{}) error
func (IntervalYearMonth) Sql ¶
func (i IntervalYearMonth) Sql() string
func (IntervalYearMonth) String ¶
func (i IntervalYearMonth) String() string
func (IntervalYearMonth) Type ¶
func (i IntervalYearMonth) Type() datatype.DataType
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func MapFromGoMap ¶
func NewMapWithType ¶
type Struct ¶
type Struct struct {
// contains filtered or unexported fields
}
Struct 这里用slice而不用map,是要保持Field顺序
func NewStructWithTyp ¶
func NewStructWithTyp(typ *datatype.StructType) *Struct
func StructFromGoStruct ¶
func (*Struct) Fields ¶
func (s *Struct) Fields() []StructField
func (*Struct) FillGoStruct ¶
func (*Struct) SafeSetField ¶
type StructField ¶
func NewStructField ¶
func NewStructField(name string, value Data) StructField
type Timestamp ¶
func NewTimestamp ¶
Click to show internal directories.
Click to hide internal directories.