database

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func NewBuilder

func NewBuilder(cli *mongo.Client, name string) *Builder

func (*Builder) BSONOptions

func (b *Builder) BSONOptions(opts *options.BSONOptions) *Builder

BSONOptions configures optional BSON marshaling and unmarshaling behavior.

func (*Builder) Build

func (b *Builder) Build() *Database

func (*Builder) ReadConcern

func (b *Builder) ReadConcern(rc *readconcern.ReadConcern) *Builder

ReadConcern sets the value for the ReadConcern field.

func (*Builder) ReadPreference

func (b *Builder) ReadPreference(rp *readpref.ReadPref) *Builder

ReadPreference sets the value for the ReadPreference field.

func (*Builder) Registry

func (b *Builder) Registry(r *bsoncodec.Registry) *Builder

Registry sets the value for the Registry field.

func (*Builder) WriteConcern

func (b *Builder) WriteConcern(wc *writeconcern.WriteConcern) *Builder

WriteConcern sets the value for the WriteConcern field.

type Database

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

func New

func New(primary, defaultReadpref *mongo.Database) *Database

func (*Database) Aggregate

func (*Database) Collection

func (d *Database) Collection(name string) *collection.Builder

func (*Database) Raw

func (d *Database) Raw() *mongo.Database

Jump to

Keyboard shortcuts

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