util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DEFAULT_DATABASE_NAME string
View Source
var DEFAULT_DATABASE_URI string

Functions

func CloseConnection

func CloseConnection()

關閉數據庫連綫 FIXME: 存在空指針問題

func DeleteMany added in v0.0.2

func DeleteMany(filter bson.D) int64

func DeleteOne deprecated added in v0.0.2

func DeleteOne(filter bson.D) bool

Deprecated: use DeleteMany() instead.

func GetMany added in v0.0.2

func GetMany(filter bson.D) []bson.M

func GetOne added in v0.0.2

func GetOne(filter bson.D) bson.M

func InsertOne added in v0.0.2

func InsertOne(data bson.D) primitive.ObjectID

func OpenConnection

func OpenConnection(collectionName string)

開啓數據庫連綫

func UpdateMany added in v0.0.2

func UpdateMany(filter bson.D, data bson.D) int64

func UpdateOne deprecated added in v0.0.2

func UpdateOne(filter bson.D, data bson.D) bool

Deprecated: use UpdateMany() instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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