mgoid

package
v0.0.0-...-28dba10 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2016 License: Apache-2.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 IncID

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

IncID 增量ID

func NewIncID

func NewIncID(db *mgo.Database) *IncID

NewIncID 创建IncID的实例

func NewIncIDWithDB

func NewIncIDWithDB(db *mgo.Database, cName string) *IncID

NewIncIDWithDB 创建IncID的实例

func NewIncIDWithSession

func NewIncIDWithSession(session *mgo.Session, db *mgo.Database, cName string) *IncID

NewIncIDWithSession 创建IncID的实例

func NewIncIDWithURL

func NewIncIDWithURL(url, dbName string) (*IncID, error)

NewIncIDWithURL 创建IncID的实例

func NewIncIDWithURLC

func NewIncIDWithURLC(url, dbName, cName string) (*IncID, error)

NewIncIDWithURLC 创建IncID的实例

func (*IncID) Close

func (i *IncID) Close()

func (*IncID) GenerateID

func (i *IncID) GenerateID(name string) (id int64, err error)

GenerateID 生成自增ID

Jump to

Keyboard shortcuts

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