mongox

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client contains mongo.Client

func Connect

func Connect(ctx context.Context, uri string) (*Client, error)

Connect creates a new Client and then initializes it using the Connect method.

func (*Client) Database

func (c *Client) Database(db string) *Database

Database returns database

type Collection

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

Collection contains mongo.Collection

func (*Collection) Find

func (c *Collection) Find(filter interface{}) *Session

Find finds docs by given filter

type Database

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

Database contains mongo.Database

func (*Database) Collection

func (d *Database) Collection(collection string) *Collection

Collection returns database

type Session

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

Session -

func (*Session) Decode

func (s *Session) Decode(result interface{}) error

Decode returns all docs

func (*Session) Limit

func (s *Session) Limit(limit int64) *Session

Limit sets sorting

func (*Session) Project

func (s *Session) Project(project interface{}) *Session

Project sets sorting

func (*Session) Skip

func (s *Session) Skip(skip int64) *Session

Skip sets sorting

func (*Session) Sort

func (s *Session) Sort(sort interface{}) *Session

Sort sets sorting

Jump to

Keyboard shortcuts

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