db

package
v0.0.0-...-549cef6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2014 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 DB

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

func Connect

func Connect() (*DB, error)

func New

func New(host string) (*DB, error)

func (*DB) C

func (db *DB) C(name string) *mgo.Collection

func (*DB) Close

func (db *DB) Close()

func (*DB) DB

func (db *DB) DB() *mgo.Database

func (*DB) DropC

func (db *DB) DropC(name string) error

func (*DB) EnsureIndexKey

func (db *DB) EnsureIndexKey(colName string, keys ...string) error

func (*DB) EnsureUniqueIndexKey

func (db *DB) EnsureUniqueIndexKey(colName string, keys ...string) error

func (*DB) Upsert

func (db *DB) Upsert(name string, q Query, v interface{}) (updated bool, err error)

type Query

type Query bson.M

Jump to

Keyboard shortcuts

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