{"repo":"qiniu/qmgo","free":true,"listed":false,"github":"https://github.com/qiniu/qmgo","clone":"git clone https://github.com/qiniu/qmgo.git","description":"Qmgo - The Go driver for MongoDB. It‘s based on official mongo-go-driver but easier to use like Mgo.","language":"Go","stars":1356,"topics":["mongodb","go","mgo","mongo-go-driver","mongodb-database","database","driver","mongodb-driver"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"Qmgo English 简体中文 Qmgo is a Go driver for MongoDB . It is based on MongoDB official driver, but easier to use like mgo (such as the chain call). - Qmgo allows users to use the new features of MongoDB in a more elegant way. - Qmgo is the first choice for migrating from mgo to the new MongoDB driver with minimal code changes. Requirements - Go 1.10 and above. - MongoDB 2.6 and above. Features - CRUD to documents, with all official supported options - Sort、limit、count、select、distinct - Transactions - Hooks - Automatically default and custom fields - Predefine operator keys - Aggregate、indexes operation、cursor - Validation tags - Plugin Installation - Use go mod to automatically install dependencies by import github.com/qiniu/qmgo Or - Use go get github.com/qiniu/qmgo Usage - Start import and create a new connection If your connection points to a fixed database and collection, recommend using the following way to initialize the connection. All operations can be based on cli : The following examples will be based on cli , if you use the first way for initialization, replace cli with client 、 db or coll Make sure to defer a call to Disconnect after instantiating your client: - Create index Before doing the operation, we first initialize some data: Create index - Insert a document - Find a document - Delete documents - Insert multiple data - Search all, sort and limit - Count - Update - Select - Aggregate - Support All mongoDB Options when create connection - Transactions The super ","default_branch":null,"files":null,"tree":[],"storefront":"/r/qiniu","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/qiniu/qmgo/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}