cwsnosql

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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]) Exist

func (r *MongoDBRepository[PKey]) Exist(ctx context.Context, filter bson.M) (bool, error)

func (*MongoDBRepository[PKey]) Find

func (r *MongoDBRepository[PKey]) Find(ctx context.Context, pkey PKey, out any) error

func (*MongoDBRepository[PKey]) FindWithFilter

func (r *MongoDBRepository[PKey]) FindWithFilter(ctx context.Context, filter bson.M, out any) error

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

func (*MongoDBRepository[PKey]) Upsert

func (r *MongoDBRepository[PKey]) Upsert(ctx context.Context, pkey PKey, doc any) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL