query

package module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field struct {
	Name   string
	Getter func(interface{}) (value interface{}, isNull bool)
}

type Processor

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

func NewProcessor

func NewProcessor(db Queryable) Processor

func (Processor) Build

func (p Processor) Build(query string) (*Query, error)

type Query

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

func (Query) Run

func (q Query) Run() []interface{}

func (Query) Stream added in v0.2.0

func (q Query) Stream(f StreamFunc)

type Queryable

type Queryable interface {
	Fields() []Field
	Iter() iter.Iter
}

type StreamFunc added in v0.2.0

type StreamFunc = func(interface{}) bool

Directories

Path Synopsis
Package iter implements an iterator interface as used by query.
Package iter implements an iterator interface as used by query.

Jump to

Keyboard shortcuts

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