database

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewMongoDBRepository

func NewMongoDBRepository(timeout time.Duration, databaseName string, opts ...*options.ClientOptions) (*Repository, error)

func (*Repository) Aggregate

func (r *Repository) Aggregate(collectionName string, pipeline interface{}, results interface{}) error

func (*Repository) Count

func (r *Repository) Count(collectionName string, filter interface{}) (int64, error)

func (*Repository) Create

func (r *Repository) Create(collectionName string, _ string, entity interface{}) error

func (*Repository) Delete

func (r *Repository) Delete(collectionName string, filter interface{}) error

func (*Repository) DeleteByID added in v0.5.0

func (r *Repository) DeleteByID(collectionName string, id string) error

func (*Repository) Disconnect

func (r *Repository) Disconnect()

func (*Repository) Find

func (r *Repository) Find(collectionName string, filter interface{}, pageSize int, pageNumber int, results interface{}, sortParams ...string) error

func (*Repository) FindByID

func (r *Repository) FindByID(collectionName string, id string, entity interface{}) error

func (*Repository) GetName

func (r *Repository) GetName() string

func (*Repository) NewBucket

func (r *Repository) NewBucket() (*gridfs.Bucket, error)

func (*Repository) UpdateByID added in v0.5.0

func (r *Repository) UpdateByID(collectionName string, id string, entity interface{}) error

Jump to

Keyboard shortcuts

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