Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func BigEndianUint128(hi, lo uint64) (v [16]byte)
 - func PrimitiveFromYDB(x *Ydb.Value) (v interface{})
 - func ToYDB(v V) *Ydb.TypedValue
 - func TypeToYDB(t T) *Ydb.Type
 - func TypesEqual(a, b T) bool
 - func WriteTypeStringTo(buf *bytes.Buffer, t T)
 - func WriteValueStringTo(buf *bytes.Buffer, v V)
 - type DecimalType
 - type DictType
 - type ListType
 - type OptionalType
 - type PrimitiveType
 - type StructField
 - type StructType
 - type StructValueProto
 - type T
 - type TupleType
 - type V
 - type Value
 - func BoolValue(v bool) Value
 - func DateValue(v uint32) Value
 - func DatetimeValue(v uint32) Value
 - func DecimalValue(t T, v [16]byte) Value
 - func DictValue(n int, it func(int) V) Value
 - func DoubleValue(v float64) Value
 - func DyNumberValue(v string) Value
 - func FloatValue(v float32) Value
 - func Int16Value(v int16) Value
 - func Int32Value(v int32) Value
 - func Int64Value(v int64) Value
 - func Int8Value(v int8) Value
 - func IntervalValue(v int64) Value
 - func JSONDocumentValue(v string) Value
 - func JSONValue(v string) Value
 - func ListValue(n int, it func(int) V) Value
 - func NullValue(t T) Value
 - func OptionalValue(v V) Value
 - func StringValue(v []byte) Value
 - func StructValue(p *StructValueProto) Value
 - func TimestampValue(v uint64) Value
 - func TupleValue(n int, it func(int) V) Value
 - func TzDateValue(v string) Value
 - func TzDatetimeValue(v string) Value
 - func TzTimestampValue(v string) Value
 - func UTF8Value(v string) Value
 - func UUIDValue(v [16]byte) Value
 - func Uint16Value(v uint16) Value
 - func Uint32Value(v uint32) Value
 - func Uint64Value(v uint64) Value
 - func Uint8Value(v uint8) Value
 - func VariantValue(x V, i uint32, t T) Value
 - func YSONValue(v string) Value
 - func ZeroValue(t T) Value
 
- type VariantType
 - type VoidType
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var VoidValue = Value{ // contains filtered or unexported fields }
Functions ¶
func BigEndianUint128 ¶
BigEndianUint128 builds a big-endian uint128 value.
func PrimitiveFromYDB ¶
PrimitiveFromYDB returns a primitive value stored in x. Currently it may return one of this types:
bool int32 uint32 int64 uint64 float32 float64 []byte string [16]byte
Or nil.
func ToYDB ¶
func ToYDB(v V) *Ydb.TypedValue
func TypesEqual ¶
func WriteTypeStringTo ¶
func WriteValueStringTo ¶
Types ¶
type DecimalType ¶
func (DecimalType) String ¶
func (d DecimalType) String() string
type ListType ¶
type ListType struct {
	T T
}
    ListType wraps proto message List TODO prepare toYDB() calls in constructors as an optimization. nolint:godox
type OptionalType ¶
type OptionalType struct {
	T T
}
    func (OptionalType) String ¶
func (opt OptionalType) String() string
type PrimitiveType ¶
type PrimitiveType int
const ( TypeUnknown PrimitiveType = iota TypeBool TypeInt8 TypeUint8 TypeInt16 TypeUint16 TypeInt32 TypeUint32 TypeInt64 TypeUint64 TypeFloat TypeDouble TypeDate TypeDatetime TypeTimestamp TypeInterval TypeTzDate TypeTzDatetime TypeTzTimestamp TypeString TypeUTF8 TypeYSON TypeJSON TypeUUID TypeJSONDocument TypeDyNumber )
Primitive TypesFromYDB known by YDB.
func (PrimitiveType) String ¶
func (t PrimitiveType) String() string
type StructField ¶
func StructFields ¶
func StructFields(ms []*Ydb.StructMember) []StructField
type StructType ¶
type StructType struct {
	Fields []StructField
}
    func (StructType) Empty ¶
func (s StructType) Empty() bool
func (StructType) Members ¶
func (s StructType) Members() []*Ydb.StructMember
func (StructType) String ¶
func (s StructType) String() string
type StructValueProto ¶
type StructValueProto struct {
	Fields []StructField
	Values []*Ydb.Value
}
    func (*StructValueProto) Add ¶
func (s *StructValueProto) Add(name string, value V)
type T ¶
type T interface {
	String() string
	// contains filtered or unexported methods
}
    func TypeFromYDB ¶
func TypesFromYDB ¶
type V ¶
type V interface {
	ToYDB() *Ydb.TypedValue
	String() string
	// contains filtered or unexported methods
}
    type Value ¶
type Value struct {
	// contains filtered or unexported fields
}
    func DatetimeValue ¶
func DecimalValue ¶
func DoubleValue ¶
func DyNumberValue ¶
func FloatValue ¶
func Int16Value ¶
func Int32Value ¶
func Int64Value ¶
func IntervalValue ¶
func JSONDocumentValue ¶
func NullValue ¶
NullValue returns NULL value of given types T.
For example, if T is Int32Type, then NullValue(Int32Type) will return value of types Optional<Int32Type> with NULL value.
Nested optional types are handled also.
func OptionalValue ¶
func StringValue ¶
func StructValue ¶
func StructValue(p *StructValueProto) Value
func TimestampValue ¶
func TzDateValue ¶
func TzDatetimeValue ¶
func TzTimestampValue ¶
func Uint16Value ¶
func Uint32Value ¶
func Uint64Value ¶
func Uint8Value ¶
func (Value) ToYDB ¶
func (v Value) ToYDB() *Ydb.TypedValue
type VariantType ¶
type VariantType struct {
	S StructType
	T TupleType
}
    func (VariantType) String ¶
func (v VariantType) String() string
 Click to show internal directories. 
   Click to hide internal directories.