descriptor

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IDZero = edgedbtypes.UUID{}

IDZero is descriptor ID 00000000-0000-0000-0000-000000000000 https://www.edgedb.com/docs/internals/protocol/typedesc#type-descriptors

Functions

This section is empty.

Types

type Descriptor

type Descriptor struct {
	Type   Type
	ID     edgedbtypes.UUID
	Fields []*Field
}

Descriptor is a type descriptor https://www.edgedb.com/docs/internals/protocol/typedesc

func Pop

func Pop(
	r *buff.Reader,
	version internal.ProtocolVersion,
) (Descriptor, error)

Pop builds a descriptor tree from a describe statement type description.

type Field

type Field struct {
	Name     string
	Desc     Descriptor
	Required bool
}

Field represents the child of a descriptor

type FieldV2 added in v0.14.1

type FieldV2 struct {
	Name     string
	Desc     V2
	Required bool
	Union    bool
}

FieldV2 represents the child of a descriptor

type Type

type Type uint8

Type represents a descriptor type.

const (
	// Set represents the set descriptor type.
	Set Type = iota

	// Object represents the object descriptor type.
	Object

	// BaseScalar represents the base scalar descriptor type.
	BaseScalar

	// Scalar represents the scalar descriptor type.
	Scalar

	// Tuple represents the tuple descriptor type.
	Tuple

	// NamedTuple represents the named tuple descriptor type.
	NamedTuple

	// Array represents the array descriptor type.
	Array

	// Enum represents the enum descriptor type.
	Enum

	// InputShape represents the input shape descriptor type.
	InputShape

	// Range represents the range descriptor type.
	Range

	// ObjectShape represents the object shape descriptor type.
	ObjectShape

	// Compound represents the compound descriptor type.
	Compound

	// MultiRange represents the multi range descriptor type.
	MultiRange
)

func (Type) String added in v0.13.0

func (i Type) String() string

type V2 added in v0.14.1

type V2 struct {
	Type          Type
	ID            edgedbtypes.UUID
	Name          string
	SchemaDefined bool
	Ancestors     []*FieldV2
	Fields        []*FieldV2
}

V2 is a type descriptor https://www.edgedb.com/docs/internals/protocol/typedesc

func PopV2 added in v0.14.1

func PopV2(
	r *buff.Reader,
	_ internal.ProtocolVersion,
) (V2, error)

PopV2 builds a descriptor tree from a describe statement type description.

Jump to

Keyboard shortcuts

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