Documentation ¶
Index ¶
- Constants
- Variables
- func Drop(collName string) error
- func RestfulAPICount(collName string, filter bson.M) (int64, error)
- func RestfulAPIDeleteMany(collName string, filter bson.M, argOpt ...interface{}) error
- func RestfulAPIDeleteOne(collName string, filter bson.M, argOpt ...interface{}) error
- func RestfulAPIGetMany(collName string, filter bson.M, argOpt ...interface{}) ([]map[string]interface{}, error)
- func RestfulAPIGetOne(collName string, filter bson.M, argOpt ...interface{}) (result map[string]interface{}, err error)
- func RestfulAPIJSONPatch(collName string, filter bson.M, patchJSON []byte, argOpt ...interface{}) error
- func RestfulAPIJSONPatchExtend(collName string, filter bson.M, patchJSON []byte, dataName string, ...) error
- func RestfulAPIMergePatch(collName string, filter bson.M, patchData map[string]interface{}, ...) error
- func RestfulAPIPost(collName string, filter bson.M, postData map[string]interface{}, ...) (bool, error)
- func RestfulAPIPostMany(collName string, filter bson.M, postDataArray []interface{}) error
- func RestfulAPIPullOne(collName string, filter bson.M, putData map[string]interface{}, ...) error
- func RestfulAPIPutMany(collName string, filterArray []bson.M, putDataArray []map[string]interface{}, ...) error
- func RestfulAPIPutOne(collName string, filter bson.M, putData map[string]interface{}, ...) (bool, error)
- func RestfulAPIPutOneNotUpdate(collName string, filter bson.M, putData map[string]interface{}, ...) (bool, error)
- func SetMongoDB(setdbName string, url string) error
Constants ¶
View Source
const ( COLLATION_STRENGTH_IGNORE_DIACRITICS_AND_CASE int = iota + 1 COLLATION_STRENGTH_IGNORE_CASE COLLATION_STRENGTH_DEFAULT )
Variables ¶
View Source
var (
Client *mongo.Client = nil
)
Functions ¶
func RestfulAPIDeleteMany ¶
func RestfulAPIDeleteOne ¶
func RestfulAPIGetMany ¶
func RestfulAPIGetOne ¶
func RestfulAPIJSONPatch ¶
func RestfulAPIMergePatch ¶
func RestfulAPIPost ¶
func RestfulAPIPostMany ¶
func RestfulAPIPullOne ¶
func RestfulAPIPutMany ¶
func RestfulAPIPutOne ¶
func RestfulAPIPutOne(collName string, filter bson.M, putData map[string]interface{}, argOpt ...interface{}) ( bool, error, )
if no error happened, return true means data existed and false means data not existed
func RestfulAPIPutOneNotUpdate ¶
func RestfulAPIPutOneNotUpdate( collName string, filter bson.M, putData map[string]interface{}, argOpt ...interface{}, ) ( bool, error, )
if no error happened, return true means data existed (not updated) and false means data not existed
func SetMongoDB ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.