db

package
v0.0.0-...-e120481 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2015 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

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

Collection - Struct

func (*Collection) All

func (c *Collection) All() (interface{}, error)

All - Return all results

func (*Collection) Find

func (c *Collection) Find(options QueryOptions) (interface{}, error)

Find - Return queried results list

type QueryOptions

type QueryOptions struct {
	Amount int
	// contains filtered or unexported fields
}

QueryOptions - Search options

func NewQuery

func NewQuery() QueryOptions

NewQuery - Create a new QueryOptions

func (*QueryOptions) AddFilter

func (q *QueryOptions) AddFilter(filterKey string, filterValue string)

AddFilter - Add new filter to query

func (*QueryOptions) GetFilters

func (q *QueryOptions) GetFilters() map[string]string

GetFilters - Get map of filters in query

type Session

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

Session - Session Struct

func NewSession

func NewSession() *Session

NewSession - sessions

func (*Session) Close

func (s *Session) Close()

Close - close the session

func (*Session) Collection

func (s *Session) Collection(collectionName string, model interface{}) *Collection

Collection - get the specified collection with model

Jump to

Keyboard shortcuts

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