upperio

package
v1.0.1-0...-8e9dff6 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2018 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Conds

func Conds(cs store.Conds) interface{}

Conds Translate the store.Conds interface into upperio flavor conditions representation

func NewResult

func NewResult(fn func() (db.Result, error)) store.Result

func NewSource

func NewSource(adapter string, connURL db.ConnectionURL) store.Source

NewSource create store.Source from

func Sort

func Sort(q store.Query) (res []interface{})

Sort take a store query and returns upperio Sort usable parameter

Types

type Conn

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

Conn implements store.Conn

func (*Conn) Close

func (conn *Conn) Close()

Close implements store.Conn.Close()

func (*Conn) Raw

func (conn *Conn) Raw() interface{}

Raw implements store.Conn.Raw()

type Result

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

Result implements store.Result

func (*Result) All

func (res *Result) All(el interface{}) (err error)

All fetches all results within the result set and dumps them into the given pointer to slice of maps or structs

func (*Result) Close

func (res *Result) Close() error

Close closes the result set

func (*Result) Count

func (res *Result) Count() (count uint64, err error)

Count returns the count of items of the given query

func (*Result) Raw

func (res *Result) Raw() (interface{}, error)

Raw returns the underlying database result variable

type Source

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

Source is the upperio implementation of store.Source

func (*Source) Open

func (src *Source) Open() (s store.Conn, err error)

Open implements store.Source

Jump to

Keyboard shortcuts

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