mongo

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2025 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 MongoCommandDriver

type MongoCommandDriver struct {
	ConnectionTimeout time.Duration
	// contains filtered or unexported fields
}

func (*MongoCommandDriver) Close

func (m *MongoCommandDriver) Close() error

func (*MongoCommandDriver) Connect

func (m *MongoCommandDriver) Connect(connectionString string) error

func (*MongoCommandDriver) Create

func (m *MongoCommandDriver) Create(collection string, data interface{}) error

func (*MongoCommandDriver) Delete

func (m *MongoCommandDriver) Delete(collection string, filter interface{}) error

func (*MongoCommandDriver) SetCommandDatabase added in v1.2.1

func (m *MongoCommandDriver) SetCommandDatabase(databaseName string)

func (*MongoCommandDriver) Update

func (m *MongoCommandDriver) Update(collection string, filter interface{}, update interface{}) error

type MongoQueryDriver

type MongoQueryDriver struct {
	ConnectionTimeout time.Duration
	// contains filtered or unexported fields
}

func (*MongoQueryDriver) Close

func (m *MongoQueryDriver) Close() error

func (*MongoQueryDriver) Connect

func (m *MongoQueryDriver) Connect(connectionString string) error

func (*MongoQueryDriver) Read

func (m *MongoQueryDriver) Read(collection string, filter interface{}) (interface{}, error)

func (*MongoQueryDriver) SetClient added in v1.3.0

func (m *MongoQueryDriver) SetClient(client *mongo.Client)

New method to set the client directly for tests

func (*MongoQueryDriver) SetDatabaseName added in v1.3.0

func (m *MongoQueryDriver) SetDatabaseName(name string)

New method to set the database name for tests

func (*MongoQueryDriver) SetQueryDatabase added in v1.2.1

func (m *MongoQueryDriver) SetQueryDatabase(databaseName string)

Jump to

Keyboard shortcuts

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