mongodb

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DatabaseUri  string `json:"databaseUri"`
	DatabaseName string `json:"databaseName"`
}

type DeleteMongodb

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

func NewDeleteMongodb

func NewDeleteMongodb(adapter *MongodbAdapter) *DeleteMongodb

func (*DeleteMongodb) Condition

func (d *DeleteMongodb) Condition(name string, value any) adapters.Delete

func (*DeleteMongodb) Exec

func (d *DeleteMongodb) Exec(ctx context.Context) error

func (*DeleteMongodb) Model

func (d *DeleteMongodb) Model(model any) adapters.Delete

type FindMongodb

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

func NewFindMongodb

func NewFindMongodb(a *MongodbAdapter) *FindMongodb

func (*FindMongodb) Condition

func (f *FindMongodb) Condition(name string, value any) adapters.Find

func (*FindMongodb) Exec

func (f *FindMongodb) Exec(ctx context.Context) error

func (*FindMongodb) Model

func (f *FindMongodb) Model(model any) adapters.Find

type InsertMongodb

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

func NewInsertMongodb

func NewInsertMongodb(adapter *MongodbAdapter) *InsertMongodb

func (*InsertMongodb) Exec

func (*InsertMongodb) Model

func (i *InsertMongodb) Model(model any) adapters.Insert

type MongodbAdapter

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

func NewMongodbAdapter

func NewMongodbAdapter(cfg *Config) (*MongodbAdapter, error)

func (*MongodbAdapter) Disconnect

func (m *MongodbAdapter) Disconnect() error

func (*MongodbAdapter) GetInstance

func (m *MongodbAdapter) GetInstance() any

func (*MongodbAdapter) NewDelete

func (m *MongodbAdapter) NewDelete() adapters.Delete

func (*MongodbAdapter) NewFind

func (m *MongodbAdapter) NewFind() adapters.Find

func (*MongodbAdapter) NewInsert

func (m *MongodbAdapter) NewInsert() adapters.Insert

func (*MongodbAdapter) NewSelect

func (m *MongodbAdapter) NewSelect() adapters.Select

func (*MongodbAdapter) NewUpdate

func (m *MongodbAdapter) NewUpdate() adapters.Update

type Select

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

func NewSelect

func NewSelect(adapter *MongodbAdapter) *Select

func (*Select) Condition

func (s *Select) Condition(name string, value any) adapters.Select

func (*Select) Count

func (s *Select) Count(ctx context.Context) (int64, error)

func (*Select) Exec

func (s *Select) Exec(ctx context.Context) error

func (*Select) GreaterThan

func (s *Select) GreaterThan(name string, value any) adapters.Select

func (*Select) GreaterThanEqual

func (s *Select) GreaterThanEqual(name string, value any) adapters.Select

func (*Select) In

func (s *Select) In(name string, value any) adapters.Select

func (*Select) LessThan

func (s *Select) LessThan(name string, value any) adapters.Select

func (*Select) LessThanEqual

func (s *Select) LessThanEqual(name string, value any) adapters.Select

func (*Select) Model

func (s *Select) Model(model any) adapters.Select

func (*Select) NotEqual

func (s *Select) NotEqual(name string, value any) adapters.Select

func (*Select) OrderBy

func (s *Select) OrderBy(name string, order string) adapters.Select

type UpdateMongodb

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

func NewUpdateMongodb

func NewUpdateMongodb(adapter *MongodbAdapter) *UpdateMongodb

func (*UpdateMongodb) Condition

func (u *UpdateMongodb) Condition(name string, value any) adapters.Update

func (*UpdateMongodb) Exec

func (u *UpdateMongodb) Exec(ctx context.Context) error

func (*UpdateMongodb) Model

func (u *UpdateMongodb) Model(model any) adapters.Update

func (*UpdateMongodb) Set

func (u *UpdateMongodb) Set(name string, value any) adapters.Update

Jump to

Keyboard shortcuts

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