mongoutil

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2021 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bulk

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

Bulk is used for massive inserts

func NewBulk

func NewBulk(c *mgo.Collection, size int) *Bulk

NewBulk returns a new bulk for collection with size

func (*Bulk) Flush

func (bk *Bulk) Flush() error

Flush bulk

func (*Bulk) Insert

func (bk *Bulk) Insert(doc interface{}) error

Insert a doc in the bulk

Jump to

Keyboard shortcuts

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