lql

package module
v0.0.0-...-4b80f19 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

README

lql

Just toying around. Beware, you could encouter some stupid ideas :)

Next step: Putting Relation in its own package Aggregation operations

To think about: Blob and variable string Putting relations into page + persistance (realize I'll have to rewrite everythings) Index and B-tree

Documentation

Index

Constants

View Source
const (
	// Load relationDst, csv_pathfile
	Load opCode = iota + 1
	// Print relationSrc
	Print
	// Join relationDst, relationSrc1, relationSrc2
	Join
	// Rename relationDst, relationSrc, attrOld, attrNew
	Rename
	// Project relationDst, relationSrc, attr1, attr2, ..., attrN
	Project
	// Restrict relationDst, relationSrc
	Restrict

	// Pushv typ, value
	Pushv
	// Pusha attr
	Pusha

	// OpEq typ
	OpEq
	// OpGT typ
	OpGT

	// OpAnd
	OpAnd
	// OpOr
	OpOr

	// OpAdd typ
	OpAdd
	// OpMult typ
	OpMult
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Attr

type Attr struct {
	Name string
	Typ  typer.Typ
}

func (Attr) Equals

func (a Attr) Equals(a2 Attr) bool

type Body

type Body []Tuple
type Header []Attr

func (Header) AttrByName

func (h Header) AttrByName(name string) (attr Attr, pos int, err error)

func (Header) Copy

func (h Header) Copy() Header

func (Header) Len

func (h Header) Len() int

func (Header) Pos

func (h Header) Pos(a Attr) (int, error)

type Machine

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

func NewMachine

func NewMachine() *Machine

func (*Machine) Execute

func (m *Machine) Execute(line string) (info string, err error)

type Relation

type Relation struct {
	H Header
	B Body
}

func NewRelation

func NewRelation(attrs []Attr) *Relation

func (*Relation) Add

func (r *Relation) Add(tuple Tuple)

func (*Relation) NewTuple

func (r *Relation) NewTuple(values []string) (Tuple, error)

func (Relation) String

func (r Relation) String() string

type Tuple

type Tuple []byte

func (Tuple) Copy

func (t Tuple) Copy() Tuple

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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