relation

package
v0.0.0-...-576298e Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrColumnNotFound = "column not found in table: %s"
)

Error messages

Variables

View Source
var StarSelector = Selector(func(r Row) Relation {
	return Relation(r)
})

StarSelector is used to retrieve the entire Row as a Relation

Functions

func MakeOffsets

func MakeOffsets(
	cols column.Columns, names ...column.Name,
) (column.Offsets, error)

MakeOffsets takes Columns and a set of Name and returns the Offsets needed to retrieve the specified Names

Types

type Relation

type Relation []value.Value

Relation describes a set of associated Values

type Row

type Row Relation

Row is a storage-level Relation

type Selector

type Selector func(Row) Relation

Selector is a function that takes a Row and returns a Relation

func MakeNamedSelector

func MakeNamedSelector(
	cols column.Columns, names ...column.Name,
) (Selector, error)

MakeNamedSelector takes a Columns and a set of Name and returns a Selector that can be used to convert a Row to the desired Relation

func MakeOffsetSelector

func MakeOffsetSelector(offsets ...column.Offset) Selector

MakeOffsetSelector returns a Selector based on the specified Offsets

Jump to

Keyboard shortcuts

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