mongodb

package
v0.0.0-...-305b025 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2020 License: MIT Imports: 10 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
}

DB struct of monge database

func GetDB

func GetDB() *DB

GetDB get unique database pointer

func (*DB) Connect

func (d *DB) Connect() error

Connect to default database

func (*DB) Insert

func (d *DB) Insert(c string, data bson.M) error

Insert insert data into collection c

func (*DB) Read

func (d *DB) Read(c string, query bson.M) ([]byte, error)

Read - db.c.find(query) -> return data "ARRAY" of json format , error

func (*DB) SaveTagInfo

func (d *DB) SaveTagInfo(data bson.M)

func (*DB) SaveTagPosition

func (d *DB) SaveTagPosition(data bson.M)

Jump to

Keyboard shortcuts

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