Documentation ¶
Index ¶
- func Create[D any](document base.IBaseDocument) *D
- func CreateAndSerialize[D any, S any](document base.IBaseDocument) *S
- func DeleteMany[D any](filter any, opts ...*options.DeleteOptions) (*int64, error)
- func Find[D any](filters any, opts ...*options.FindOptions) []D
- func FindAll[D any](opts ...*options.FindOptions) []D
- func FindAllAndSerialize[D any, S any](opts ...*options.FindOptions) []S
- func FindAndSerialize[D any, S any](filters any, opts ...*options.FindOptions) []S
- func FindOne[D any](filters any, opts ...*options.FindOneOptions) *D
- func FindOneAndSerialize[D any, S any](filters any, opts ...*options.FindOneOptions) *S
- func Get[D any](id primitive.ObjectID) *D
- func Remove[D any](document base.IBaseDocument) *D
- func RemoveByID[D any](id primitive.ObjectID) bool
- func Update[D any](document base.IBaseDocument, update any, opts ...*options.UpdateOptions) (*D, error)
- func UpdateMany[D any](filter any, update any, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Create ¶
func Create[D any](document base.IBaseDocument) *D
func CreateAndSerialize ¶
func CreateAndSerialize[D any, S any](document base.IBaseDocument) *S
func DeleteMany ¶
func FindAll ¶
func FindAll[D any](opts ...*options.FindOptions) []D
func FindAllAndSerialize ¶
func FindAllAndSerialize[D any, S any](opts ...*options.FindOptions) []S
func FindAndSerialize ¶
func FindAndSerialize[D any, S any](filters any, opts ...*options.FindOptions) []S
func FindOneAndSerialize ¶
func FindOneAndSerialize[D any, S any](filters any, opts ...*options.FindOneOptions) *S
func Remove ¶
func Remove[D any](document base.IBaseDocument) *D
func Update ¶
func Update[D any](document base.IBaseDocument, update any, opts ...*options.UpdateOptions) (*D, error)
func UpdateMany ¶
func UpdateMany[D any](filter any, update any, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.