Documentation ¶
Index ¶
- type MongoDBRepository
- func (r *MongoDBRepository[PKey]) AddValuesToSet(ctx context.Context, pkey PKey, key string, values ...any) (*mongo.UpdateResult, error)
- func (r *MongoDBRepository[PKey]) CreateSimpleUniqueAscendingIndex(ctx context.Context) error
- func (r *MongoDBRepository[PKey]) Delete(ctx context.Context, pkey PKey) error
- func (r *MongoDBRepository[PKey]) Exist(ctx context.Context, filter bson.M) (bool, error)
- func (r *MongoDBRepository[PKey]) Find(ctx context.Context, pkey PKey, out any) error
- func (r *MongoDBRepository[PKey]) FindWithFilter(ctx context.Context, filter bson.M, out any) error
- func (r *MongoDBRepository[PKey]) GetCollection(ctx context.Context) (*mongo.Collection, error)
- func (r *MongoDBRepository[PKey]) PullValuesFromSet(ctx context.Context, pkey PKey, key string, values ...any) (*mongo.UpdateResult, error)
- func (r *MongoDBRepository[PKey]) ToLazyMongoRepository() *cwslazymongo.LazyMongoRepository
- func (r *MongoDBRepository[PKey]) Upsert(ctx context.Context, pkey PKey, doc any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDBRepository ¶
type MongoDBRepository[PKey any] struct { Url string DbName string CollectionName string // contains filtered or unexported fields }
func (*MongoDBRepository[PKey]) AddValuesToSet ¶
func (r *MongoDBRepository[PKey]) AddValuesToSet(ctx context.Context, pkey PKey, key string, values ...any) (*mongo.UpdateResult, error)
func (*MongoDBRepository[PKey]) CreateSimpleUniqueAscendingIndex ¶
func (r *MongoDBRepository[PKey]) CreateSimpleUniqueAscendingIndex(ctx context.Context) error
func (*MongoDBRepository[PKey]) Delete ¶
func (r *MongoDBRepository[PKey]) Delete(ctx context.Context, pkey PKey) error
func (*MongoDBRepository[PKey]) Find ¶
func (r *MongoDBRepository[PKey]) Find(ctx context.Context, pkey PKey, out any) error
func (*MongoDBRepository[PKey]) FindWithFilter ¶
func (*MongoDBRepository[PKey]) GetCollection ¶
func (r *MongoDBRepository[PKey]) GetCollection(ctx context.Context) (*mongo.Collection, error)
func (*MongoDBRepository[PKey]) PullValuesFromSet ¶
func (r *MongoDBRepository[PKey]) PullValuesFromSet(ctx context.Context, pkey PKey, key string, values ...any) (*mongo.UpdateResult, error)
func (*MongoDBRepository[PKey]) ToLazyMongoRepository ¶
func (r *MongoDBRepository[PKey]) ToLazyMongoRepository() *cwslazymongo.LazyMongoRepository
Click to show internal directories.
Click to hide internal directories.