pgstore

package
v0.0.0-...-867429c Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkPathNodes

func WalkPathNodes(rootMessage protoreflect.MessageDescriptor, callback func(Path) error) error

WalkPathNodes visits every field in the message tree other than the root message itself, calling the callback for each.

Types

type JSONPathSpec

type JSONPathSpec []string

Like ProtoPathSpec but uses JSON field names

func ParseJSONPathSpec

func ParseJSONPathSpec(path string) JSONPathSpec

func (JSONPathSpec) String

func (jp JSONPathSpec) String() string

type NestedField

type NestedField struct {

	// The column containing the element JSONB
	RootColumn string

	// The path from the column root to the node
	Path Path
}

func (*NestedField) ProtoChild

func (nf *NestedField) ProtoChild(name protoreflect.Name) (*NestedField, error)

func (*NestedField) Selector

func (nf *NestedField) Selector(inTable string) string

type Path

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

func NewJSONPath

func NewJSONPath(message protoreflect.MessageDescriptor, fieldPath JSONPathSpec) (*Path, error)

func NewProtoPath

func NewProtoPath(message protoreflect.MessageDescriptor, fieldPath ProtoPathSpec) (*Path, error)

func (Path) Child

func (pp Path) Child(name protoreflect.Name) (*Path, error)

func (Path) DebugName

func (pp Path) DebugName() string

func (*Path) GetValue

func (pp *Path) GetValue(msg protoreflect.Message) (protoreflect.Value, error)

func (Path) IDPath

func (pp Path) IDPath() string

IDPath uniquely identifies the path within a specific root type context

func (*Path) JSONBArrowPath

func (pp *Path) JSONBArrowPath() string

func (*Path) JSONPathQuery

func (pp *Path) JSONPathQuery() string

func (Path) Leaf

func (pp Path) Leaf() protoreflect.Descriptor

func (Path) LeafField

func (pp Path) LeafField() protoreflect.FieldDescriptor

func (Path) LeafOneof

func (pp Path) LeafOneof() protoreflect.OneofDescriptor

func (Path) Root

type ProtoFieldSpec

type ProtoFieldSpec struct {
	// The column holding the data, either directly or JSONB from here using the
	// path
	ColumnName string

	// The path from the column root to the node being specified (not the path
	// of the node from a 'root node' of the table)
	Path ProtoPathSpec

	// The path from the nominal table root message to the node being specified
	PathFromRoot ProtoPathSpec
}

type ProtoPathSpec

type ProtoPathSpec []string

An element in a path from a root message to a leaf node Messages use field name strings Repeated uses index numbes as strings (1 = "1") Maps use the map keys, which are always strings in J5 land. OneOf is not included as it doesn't appear in the proto tree

func ParseProtoPathSpec

func ParseProtoPathSpec(path string) ProtoPathSpec

func (ProtoPathSpec) String

func (pp ProtoPathSpec) String() string

type Table

type Table interface {
	TableName() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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