morm

package
v0.0.0-...-2c5f5e2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormat = "time_format"
	CreateTime = "create_time"
	UpdateTime = "update_time"
	DeleteTime = "delete_time"
)

Variables

View Source
var Bson = new(bsonConv)

Functions

func FillFieldsWithTime

func FillFieldsWithTime(m bson.M, fields []string, timeFormat []string, ts ...time.Time) bson.M

func Get

func Get(connName ...string) (*orm, error)

func HandleCreateModel

func HandleCreateModel(model Model) bson.M

func HandleDeleteData

func HandleDeleteData(model Model) bson.M

func HandleUpdateData

func HandleUpdateData(model Model, updateData interface{}) bson.M

func HandleWhereData

func HandleWhereData(model Model, whereData interface{}) bson.M

func SetPageSizeMax

func SetPageSizeMax(n int)

Types

type Model

type Model interface {
	GetCollectionName() string
}

Jump to

Keyboard shortcuts

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