Documentation ¶
Index ¶
- Variables
- type Client
- type Column
- type DataType
- type Error
- type Option
- type Point
- type PointBuilder
- type RequestContext
- type RouteMode
- type Row
- type SQLQueryRequest
- type SQLQueryResponse
- type Value
- func NewBoolNullValue() Value
- func NewBoolValue(v bool) Value
- func NewDoubleNullValue() Value
- func NewDoubleValue(v float64) Value
- func NewFloatNullValue() Value
- func NewFloatValue(v float32) Value
- func NewInt16NullValue() Value
- func NewInt16Value(v int16) Value
- func NewInt32NullValue() Value
- func NewInt32Value(v int32) Value
- func NewInt64NullValue() Value
- func NewInt64Value(v int64) Value
- func NewInt8NullValue() Value
- func NewInt8Value(v int8) Value
- func NewStringNullValue() Value
- func NewStringValue(v string) Value
- func NewUint16NullValue() Value
- func NewUint16Value(v uint16) Value
- func NewUint32NullValue() Value
- func NewUint32Value(v uint32) Value
- func NewUint64NullValue() Value
- func NewUint64Value(v uint64) Value
- func NewUint8NullValue() Value
- func NewUint8Value(v uint8) Value
- func NewVarbinaryNullValue() Value
- func NewVarbinaryValue(v []byte) Value
- func (v Value) AnyValue() interface{}
- func (v Value) BoolValue() bool
- func (v Value) DataType() DataType
- func (v Value) DoubleValue() float64
- func (v Value) FloatValue() float32
- func (v Value) Int16Value() int16
- func (v Value) Int32Value() int32
- func (v Value) Int64Value() int64
- func (v Value) Int8Value() int8
- func (v Value) IsNull() bool
- func (v Value) StringValue() string
- func (v Value) TimestampValue() int64
- func (v Value) Uint16Value() uint16
- func (v Value) Uint32Value() uint32
- func (v Value) Uint64Value() uint64
- func (v Value) Uint8Value() uint8
- func (v Value) VarbinaryValue() []byte
- type WriteRequest
- type WriteResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoDatabaseSelected = errors.New("no database selected, you can use database in client initial options or WriteRequest/SqlQueryRequest") ErrPointEmptyTable = errors.New("point's table is not set") ErrPointEmptyTimestamp = errors.New("point's timestamp is not set") ErrPointEmptyTags = errors.New("point's tags should not be empty") ErrPointEmptyFields = errors.New("point's fields should not be empty") ErrNullRows = errors.New("null rows") ErrNullRouteTables = errors.New("null route tables") ErrNullRequestTables = errors.New("null request tables") ErrEmptyRoute = errors.New("empty route") ErrOnlyArrowSupport = errors.New("only arrow support now") ErrResponseHeaderMiss = errors.New("response header miss") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { Write(context.Context, WriteRequest) (WriteResponse, error) SQLQuery(context.Context, SQLQueryRequest) (SQLQueryResponse, error) }
type Error ¶
func (*Error) ShouldClearRoute ¶
func (*Error) ShouldRetry ¶
TODO: may retry in sdk while code is 302 or 310
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func EnableLoggerDebug ¶
func WithDefaultDatabase ¶
func WithLoggerWriter ¶
func WithRPCMaxRecvMsgSize ¶
func WithRouteMaxCacheSize ¶
type PointBuilder ¶
type PointBuilder struct {
// contains filtered or unexported fields
}
func NewPointBuilder ¶
func NewPointBuilder(table string) *PointBuilder
func (*PointBuilder) AddField ¶
func (b *PointBuilder) AddField(k string, v Value) *PointBuilder
func (*PointBuilder) AddTag ¶
func (b *PointBuilder) AddTag(k string, v Value) *PointBuilder
func (*PointBuilder) Build ¶
func (b *PointBuilder) Build() (Point, error)
func (*PointBuilder) SetTimestamp ¶
func (b *PointBuilder) SetTimestamp(timestamp int64) *PointBuilder
type RequestContext ¶
type RequestContext struct {
Database string
}
type SQLQueryRequest ¶
type SQLQueryRequest struct { ReqCtx RequestContext Tables []string SQL string }
type SQLQueryResponse ¶
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
func NewBoolNullValue ¶
func NewBoolNullValue() Value
func NewBoolValue ¶
func NewDoubleNullValue ¶
func NewDoubleNullValue() Value
func NewDoubleValue ¶
func NewFloatNullValue ¶
func NewFloatNullValue() Value
func NewFloatValue ¶
func NewInt16NullValue ¶
func NewInt16NullValue() Value
func NewInt16Value ¶
func NewInt32NullValue ¶
func NewInt32NullValue() Value
func NewInt32Value ¶
func NewInt64NullValue ¶
func NewInt64NullValue() Value
func NewInt64Value ¶
func NewInt8NullValue ¶
func NewInt8NullValue() Value
func NewInt8Value ¶
func NewStringNullValue ¶
func NewStringNullValue() Value
func NewStringValue ¶
func NewUint16NullValue ¶
func NewUint16NullValue() Value
func NewUint16Value ¶
func NewUint32NullValue ¶
func NewUint32NullValue() Value
func NewUint32Value ¶
func NewUint64NullValue ¶
func NewUint64NullValue() Value
func NewUint64Value ¶
func NewUint8NullValue ¶
func NewUint8NullValue() Value
func NewUint8Value ¶
func NewVarbinaryNullValue ¶
func NewVarbinaryNullValue() Value
func NewVarbinaryValue ¶
func (Value) DoubleValue ¶
func (Value) FloatValue ¶
func (Value) Int16Value ¶
func (Value) Int32Value ¶
func (Value) Int64Value ¶
func (Value) StringValue ¶
func (Value) TimestampValue ¶
func (Value) Uint16Value ¶
func (Value) Uint32Value ¶
func (Value) Uint64Value ¶
func (Value) Uint8Value ¶
func (Value) VarbinaryValue ¶
type WriteRequest ¶
type WriteRequest struct { ReqCtx RequestContext Points []Point }
type WriteResponse ¶
Click to show internal directories.
Click to hide internal directories.