mid

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2017 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyBatchIds

func ApplyBatchIds(c *mgo.Collection, name string, amount int) (id int, err error)

批量申请一段id

func AutoInc

func AutoInc(c *mgo.Collection, name string) (id int, err error)

使collection 为 name 的 id 自增 1 并返回当前 id 的值

func SetFieldName

func SetFieldName(id, collection string)

如果不设置,则用默认设置

Types

type Field

type Field struct {
	Id         string
	Collection string
}

Jump to

Keyboard shortcuts

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