Documentation ¶
Index ¶
- func Count(collection string, db *mgo.Database) (int, error)
- func CountBySelector(collection string, selector interface{}, db *mgo.Database) (int, error)
- func DeleteDocument(documentID bson.ObjectId, collection string, db *mgo.Database) error
- func DeleteDocumentsBySelector(collection string, selector interface{}, db *mgo.Database) (int, error)
- func GetDocument(document Document, collection string, db *mgo.Database) error
- func GetDocumentByID(document Document, collection string, id string, db *mgo.Database) error
- func GetDocumentBySelector(document Document, collection string, selector interface{}, db *mgo.Database) error
- func GetDocumentBySelectorAndSort(document Document, collection string, selector interface{}, sort []string, ...) error
- func GetDocumentBySort(document Document, collection string, sort []string, db *mgo.Database) error
- func GetDocuments(result interface{}, collection string, db *mgo.Database) error
- func GetDocumentsBySelector(result interface{}, collection string, selector interface{}, db *mgo.Database) error
- func GetDocumentsBySelectorAndSort(result interface{}, collection string, selector interface{}, sort []string, ...) error
- func GetDocumentsBySelectorAndSortWithFieldsOffsetAndLimit(result interface{}, collection string, selector interface{}, fields bson.M, ...) error
- func GetDocumentsBySelectorAndSortWithOffsetAndLimit(result interface{}, collection string, selector interface{}, sort []string, ...) error
- func GetDocumentsBySelectorWithFields(result interface{}, collection string, selector interface{}, fields bson.M, ...) error
- func GetDocumentsBySelectorWithOffsetAndLimit(result interface{}, collection string, selector interface{}, offset, limit int, ...) error
- func GetDocumentsBySort(result interface{}, collection string, sort []string, db *mgo.Database) error
- func GetDocumentsBySortWithOffsetAndLimit(result interface{}, collection string, sort []string, offset, limit int, ...) error
- func GetDocumentsWithOffsetAndLimit(result interface{}, collection string, offset, limit int, db *mgo.Database) error
- func PipeAll(result interface{}, collection string, pipeline interface{}, db *mgo.Database) error
- func PipeOne(result interface{}, collection string, pipeline interface{}, db *mgo.Database) error
- func SaveDocument(document Document, collection string, db *mgo.Database) (string, error)
- func UpdateDocument(documentID bson.ObjectId, collection string, update interface{}, ...) error
- func UpdateDocumentsBySelector(collection string, selector interface{}, update interface{}, db *mgo.Database) (int, error)
- func UpsertDocumentBySelector(collection string, selector interface{}, update interface{}, db *mgo.Database) (int, error)
- type Document
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountBySelector ¶
CountBySelector : returns the count of documents from a collection
func DeleteDocument ¶
DeleteDocument : deletes a document from a collection.
func DeleteDocumentsBySelector ¶
func DeleteDocumentsBySelector(collection string, selector interface{}, db *mgo.Database) (int, error)
DeleteDocumentsBySelector : deletes documents into a collection.
func GetDocument ¶
GetDocument : returns a document from a collection
func GetDocumentByID ¶
GetDocumentByID : returns a document from a collection.
func GetDocumentBySelector ¶
func GetDocumentBySelector(document Document, collection string, selector interface{}, db *mgo.Database) error
GetDocumentBySelector : returns a document from a collection
func GetDocumentBySelectorAndSort ¶
func GetDocumentBySelectorAndSort(document Document, collection string, selector interface{}, sort []string, db *mgo.Database) error
GetDocumentBySelectorAndSort : returns a document from a collection
func GetDocumentBySort ¶
GetDocumentBySort : returns a document from a collection
func GetDocuments ¶
GetDocuments : returns the documents from a collection
func GetDocumentsBySelector ¶
func GetDocumentsBySelector(result interface{}, collection string, selector interface{}, db *mgo.Database) error
GetDocumentsBySelector : returns the documents from a collection
func GetDocumentsBySelectorAndSort ¶
func GetDocumentsBySelectorAndSort(result interface{}, collection string, selector interface{}, sort []string, db *mgo.Database) error
GetDocumentsBySelectorAndSort : returns the documents from a collection
func GetDocumentsBySelectorAndSortWithFieldsOffsetAndLimit ¶ added in v0.1.1
func GetDocumentsBySelectorAndSortWithFieldsOffsetAndLimit(result interface{}, collection string, selector interface{}, fields bson.M, sort []string, offset, limit int, db *mgo.Database) error
GetDocumentsBySelectorAndSortWithFieldsOffsetAndLimit : returns the documents from a collection
func GetDocumentsBySelectorAndSortWithOffsetAndLimit ¶
func GetDocumentsBySelectorAndSortWithOffsetAndLimit(result interface{}, collection string, selector interface{}, sort []string, offset, limit int, db *mgo.Database) error
GetDocumentsBySelectorAndSortWithOffsetAndLimit : returns the documents from a collection
func GetDocumentsBySelectorWithFields ¶ added in v0.1.1
func GetDocumentsBySelectorWithFields(result interface{}, collection string, selector interface{}, fields bson.M, db *mgo.Database) error
GetDocumentsBySelectorWithFields : returns the documents from a collection
func GetDocumentsBySelectorWithOffsetAndLimit ¶
func GetDocumentsBySelectorWithOffsetAndLimit(result interface{}, collection string, selector interface{}, offset, limit int, db *mgo.Database) error
GetDocumentsBySelectorWithOffsetAndLimit : returns the documents from a collection
func GetDocumentsBySort ¶
func GetDocumentsBySort(result interface{}, collection string, sort []string, db *mgo.Database) error
GetDocumentsBySort : returns the documents from a collection
func GetDocumentsBySortWithOffsetAndLimit ¶
func GetDocumentsBySortWithOffsetAndLimit(result interface{}, collection string, sort []string, offset, limit int, db *mgo.Database) error
GetDocumentsBySortWithOffsetAndLimit : returns the documents from a collection
func GetDocumentsWithOffsetAndLimit ¶
func GetDocumentsWithOffsetAndLimit(result interface{}, collection string, offset, limit int, db *mgo.Database) error
GetDocumentsWithOffsetAndLimit : returns the documents from a collection
func SaveDocument ¶
SaveDocument : inserts a document into a collection.
func UpdateDocument ¶
func UpdateDocument(documentID bson.ObjectId, collection string, update interface{}, db *mgo.Database) error
UpdateDocument : updates a document into a collection.