types

package
v3.95.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Equal

func Equal(a, b Type) bool

func FromProtobuf added in v3.93.3

func FromProtobuf(pb *Ydb.Type) *protobufType

func TypeToYDB

func TypeToYDB(t Type, a *allocator.Allocator) *Ydb.Type

Types

type Decimal

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

func NewDecimal

func NewDecimal(precision, scale uint32) *Decimal

func (*Decimal) Name

func (v *Decimal) Name() string

func (*Decimal) Precision

func (v *Decimal) Precision() uint32

func (*Decimal) Scale

func (v *Decimal) Scale() uint32

func (*Decimal) String

func (v *Decimal) String() string

func (*Decimal) ToYDB

func (v *Decimal) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*Decimal) Yql

func (v *Decimal) Yql() string

type Dict

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

func NewDict

func NewDict(key, value Type) (v *Dict)

func (*Dict) KeyType

func (v *Dict) KeyType() Type

func (*Dict) String

func (v *Dict) String() string

func (*Dict) ToYDB

func (v *Dict) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*Dict) ValueType

func (v *Dict) ValueType() Type

func (*Dict) Yql

func (v *Dict) Yql() string

type EmptyDict

type EmptyDict struct{}

func EmptySet

func EmptySet() EmptyDict

func NewEmptyDict

func NewEmptyDict() EmptyDict

func (EmptyDict) String

func (v EmptyDict) String() string

func (EmptyDict) ToYDB

func (EmptyDict) ToYDB(a *allocator.Allocator) *Ydb.Type

func (EmptyDict) Yql

func (v EmptyDict) Yql() string

type EmptyList

type EmptyList struct{}

func NewEmptyList

func NewEmptyList() EmptyList

func (EmptyList) String

func (v EmptyList) String() string

func (EmptyList) ToYDB

func (EmptyList) ToYDB(a *allocator.Allocator) *Ydb.Type

func (EmptyList) Yql

func (v EmptyList) Yql() string

type List

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

func NewList

func NewList(t Type) *List

func (*List) ItemType

func (v *List) ItemType() Type

func (*List) String

func (v *List) String() string

func (*List) ToYDB

func (v *List) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*List) Yql

func (v *List) Yql() string

type Null

type Null struct{}

func NewNull

func NewNull() Null

func (Null) String

func (v Null) String() string

func (Null) ToYDB

func (Null) ToYDB(*allocator.Allocator) *Ydb.Type

func (Null) Yql

func (v Null) Yql() string

type Optional

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

func NewOptional

func NewOptional(t Type) Optional

func (Optional) InnerType

func (v Optional) InnerType() Type

func (Optional) IsOptional

func (v Optional) IsOptional()

func (Optional) String

func (v Optional) String() string

func (Optional) ToYDB

func (v Optional) ToYDB(a *allocator.Allocator) *Ydb.Type

func (Optional) Yql

func (v Optional) Yql() string

type PgType added in v3.58.0

type PgType struct {
	OID uint32
}

func (PgType) String added in v3.58.0

func (v PgType) String() string

func (PgType) ToYDB added in v3.58.0

func (v PgType) ToYDB(a *allocator.Allocator) *Ydb.Type

func (PgType) Yql added in v3.58.0

func (v PgType) Yql() string

type Primitive

type Primitive uint
const (
	Unknown Primitive = iota
	Bool
	Int8
	Uint8
	Int16
	Uint16
	Int32
	Uint32
	Int64
	Uint64
	Float
	Double
	Date
	Datetime
	Timestamp
	Interval
	TzDate
	TzDatetime
	TzTimestamp
	Bytes
	Text
	YSON
	JSON
	UUID
	JSONDocument
	DyNumber
)

func (Primitive) String

func (v Primitive) String() string

func (Primitive) ToYDB

func (v Primitive) ToYDB(*allocator.Allocator) *Ydb.Type

func (Primitive) Yql

func (v Primitive) Yql() string

type Set

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

func NewSet

func NewSet(t Type) *Set

func (*Set) ItemType

func (v *Set) ItemType() Type

func (*Set) String

func (v *Set) String() string

func (*Set) ToYDB

func (v *Set) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*Set) Yql

func (v *Set) Yql() string

type Struct

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

func NewStruct

func NewStruct(fields ...StructField) (v *Struct)

func (*Struct) Field

func (v *Struct) Field(i int) StructField

func (*Struct) Fields

func (v *Struct) Fields() []StructField

func (*Struct) String

func (v *Struct) String() string

func (*Struct) ToYDB

func (v *Struct) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*Struct) Yql

func (v *Struct) Yql() string

type StructField

type StructField struct {
	Name string
	T    Type
}

func StructFields

func StructFields(ms []*Ydb.StructMember) []StructField

type Tuple

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

func NewTuple

func NewTuple(items ...Type) (v *Tuple)

func (*Tuple) InnerTypes

func (v *Tuple) InnerTypes() []Type

func (*Tuple) ItemType

func (v *Tuple) ItemType(i int) Type

func (*Tuple) String

func (v *Tuple) String() string

func (*Tuple) ToYDB

func (v *Tuple) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*Tuple) Yql

func (v *Tuple) Yql() string

type Type

type Type interface {
	Yql() string
	String() string

	ToYDB(a *allocator.Allocator) *Ydb.Type
	// contains filtered or unexported methods
}

func FromYDB

func FromYDB(es []*Ydb.Type) []Type

func TypeFromYDB

func TypeFromYDB(x *Ydb.Type) Type

type VariantStruct

type VariantStruct struct {
	*Struct
}

func NewVariantStruct

func NewVariantStruct(fields ...StructField) *VariantStruct

func (*VariantStruct) ToYDB

func (v *VariantStruct) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*VariantStruct) Yql

func (v *VariantStruct) Yql() string

type VariantTuple

type VariantTuple struct {
	*Tuple
}

func NewVariantTuple

func NewVariantTuple(items ...Type) *VariantTuple

func (*VariantTuple) ToYDB

func (v *VariantTuple) ToYDB(a *allocator.Allocator) *Ydb.Type

func (*VariantTuple) Yql

func (v *VariantTuple) Yql() string

type Void

type Void struct{}

func NewVoid

func NewVoid() Void

func (Void) String

func (v Void) String() string

func (Void) ToYDB

func (Void) ToYDB(*allocator.Allocator) *Ydb.Type

func (Void) Yql

func (v Void) Yql() string

Jump to

Keyboard shortcuts

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