mid

package
v0.0.0-...-b1ea8ad Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2020 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