package value
import "github.com/ydb-platform/ydb-go-sdk/v3/internal/value"
Index ¶
- func BigEndianUint128(hi, lo uint64) (v [16]byte)
- func BoolValue(v bool) boolValue
- func DateValue(v uint32) dateValue
- func DatetimeValue(v uint32) datetimeValue
- func DecimalValue(v [16]byte, precision uint32, scale uint32) *decimalValue
- func Dict(key, value Type) (v *dictType)
- func DictValue(values ...DictValueField) *dictValue
- func DoubleValue(v float64) *doubleValue
- func DyNumberValue(v string) *dyNumberValue
- func EmptyList() emptyListType
- func FloatValue(v float32) *floatValue
- func Int16Value(v int16) int16Value
- func Int32Value(v int32) int32Value
- func Int64Value(v int64) int64Value
- func Int8Value(v int8) int8Value
- func IntervalValue(v int64) intervalValue
- func JSONDocumentValue(v string) *jsonDocumentValue
- func JSONValue(v string) *jsonValue
- func List(t Type) *listType
- func ListValue(items ...Value) *listValue
- func NullValue(t Type) *nullValue
- func Optional(t Type) *optionalType
- func OptionalValue(v Value) *optionalValue
- func StringValue(v []byte) stringValue
- func StructValue(fields ...StructValueField) *structValue
- func TimestampValue(v uint64) timestampValue
- func ToYDB(v Value, a *allocator.Allocator) *Ydb.TypedValue
- func TupleValue(values ...Value) *tupleValue
- func TypeToYDB(t Type, a *allocator.Allocator) *Ydb.Type
- func TypesEqual(a, b Type) bool
- func TzDateValue(v string) *tzDateValue
- func TzDatetimeValue(v string) *tzDatetimeValue
- func TzTimestampValue(v string) *tzTimestampValue
- func UTF8Value(v string) *utf8Value
- func UUIDValue(v [16]byte) *uuidValue
- func Uint16Value(v uint16) uint16Value
- func Uint32Value(v uint32) uint32Value
- func Uint64Value(v uint64) uint64Value
- func Uint8Value(v uint8) uint8Value
- func Variant(t Type) *variantType
- func VariantValue(v Value, idx uint32, t Type) *variantValue
- func VariantValueStruct(v Value, idx uint32) *variantValue
- func VariantValueTuple(v Value, idx uint32) *variantValue
- func Void() voidType
- func VoidValue() voidValue
- func WriteTypeStringTo(buf *bytes.Buffer, t Type)
- func YSONValue(v string) *ysonValue
- func ZeroValue(t Type) *zeroValue
- type DecimalType
- type DictValueField
- type PrimitiveType
- type StructField
- type StructType
- type StructValueField
- type TupleType
- type Type
- type Value
Functions ¶
func BigEndianUint128 ¶
BigEndianUint128 builds a big-endian uint128 value.
func BoolValue ¶
func BoolValue(v bool) boolValue
func DateValue ¶
func DateValue(v uint32) dateValue
func DatetimeValue ¶
func DatetimeValue(v uint32) datetimeValue
func DecimalValue ¶
func Dict ¶
func Dict(key, value Type) (v *dictType)
func DictValue ¶
func DictValue(values ...DictValueField) *dictValue
func DoubleValue ¶
func DoubleValue(v float64) *doubleValue
func DyNumberValue ¶
func DyNumberValue(v string) *dyNumberValue
func EmptyList ¶
func EmptyList() emptyListType
func FloatValue ¶
func FloatValue(v float32) *floatValue
func Int16Value ¶
func Int16Value(v int16) int16Value
func Int32Value ¶
func Int32Value(v int32) int32Value
func Int64Value ¶
func Int64Value(v int64) int64Value
func Int8Value ¶
func Int8Value(v int8) int8Value
func IntervalValue ¶
func IntervalValue(v int64) intervalValue
IntervalValue makes Value from given microseconds value
func JSONDocumentValue ¶
func JSONDocumentValue(v string) *jsonDocumentValue
func JSONValue ¶
func JSONValue(v string) *jsonValue
func List ¶
func List(t Type) *listType
func ListValue ¶
func ListValue(items ...Value) *listValue
func NullValue ¶
func NullValue(t Type) *nullValue
func Optional ¶
func Optional(t Type) *optionalType
func OptionalValue ¶
func OptionalValue(v Value) *optionalValue
func StringValue ¶
func StringValue(v []byte) stringValue
func StructValue ¶
func StructValue(fields ...StructValueField) *structValue
func TimestampValue ¶
func TimestampValue(v uint64) timestampValue
func ToYDB ¶
func ToYDB(v Value, a *allocator.Allocator) *Ydb.TypedValue
func TupleValue ¶
func TupleValue(values ...Value) *tupleValue
func TypeToYDB ¶
func TypesEqual ¶
func TzDateValue ¶
func TzDateValue(v string) *tzDateValue
func TzDatetimeValue ¶
func TzDatetimeValue(v string) *tzDatetimeValue
func TzTimestampValue ¶
func TzTimestampValue(v string) *tzTimestampValue
func UTF8Value ¶
func UTF8Value(v string) *utf8Value
func UUIDValue ¶
func UUIDValue(v [16]byte) *uuidValue
func Uint16Value ¶
func Uint16Value(v uint16) uint16Value
func Uint32Value ¶
func Uint32Value(v uint32) uint32Value
func Uint64Value ¶
func Uint64Value(v uint64) uint64Value
func Uint8Value ¶
func Uint8Value(v uint8) uint8Value
func Variant ¶
func Variant(t Type) *variantType
func VariantValue ¶
func VariantValueStruct ¶
func VariantValueTuple ¶
func Void ¶
func Void() voidType
func VoidValue ¶
func VoidValue() voidValue
func WriteTypeStringTo ¶
func YSONValue ¶
func YSONValue(v string) *ysonValue
func ZeroValue ¶
func ZeroValue(t Type) *zeroValue
Types ¶
type DecimalType ¶
func Decimal ¶
func Decimal(precision, scale uint32) *DecimalType
func (*DecimalType) String ¶
func (v *DecimalType) String() string
type DictValueField ¶
type PrimitiveType ¶
type PrimitiveType uint
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 )
func Primitive ¶
func Primitive(t PrimitiveType) PrimitiveType
func (PrimitiveType) String ¶
func (v PrimitiveType) String() string
type StructField ¶
func StructFields ¶
func StructFields(ms []*Ydb.StructMember) []StructField
type StructType ¶
type StructType struct {
// contains filtered or unexported fields
}
func Struct ¶
func Struct(fields ...StructField) (v *StructType)
func (*StructType) String ¶
func (v *StructType) String() string
type StructValueField ¶
type TupleType ¶
type TupleType struct {
// contains filtered or unexported fields
}
func Tuple ¶
func (*TupleType) String ¶
type Type ¶
type Type interface { String() string // contains filtered or unexported methods }
func TypeFromYDB ¶
func TypesFromYDB ¶
type Value ¶
func FromYDB ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
internal/value/allocator |
- Version
- v3.36.1
- Published
- Aug 24, 2022
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 2 minutes ago –
Tools for package owners.