package
0.0.0-20240809180353-945e34d7fa1e
Repository: https://github.com/phil-inc/pmongo.git
Documentation: pkg.go.dev

# Functions

Will return the only connection by name or if your app is connected to single mongodb.
Will return connection by db name from connection map.
Get creates new database connection.
NewDBRef creates a new MongoDB database reference (DBRef) for a given collection name and object ID.
NewObjectID generates a new MongoDB ObjectID.
Functions handling Mongo Driver ObjectID */ObjectID returns objectID from interface.
RefID extracts the hexadecimal representation of an ObjectID from a DBRef, if present.
Will return the only db secondary connection.
Since we all pool of connection per db in db map.
Setup the MongoDB connection based on passed in config.
Set up mongodb with provided vargs of configs.
StringID returns the hexadecimal string representation of an ID.
StringIDsToObjectIDs converts a slice of hexadecimal string IDs into a slice of primitive.ObjectID.

# Variables

ErrNoDocumentsFound is an error returned when no documents are found in a MongoDB result.

# Structs

BaseData represents the basic fields that can be embedded in MongoDB documents.
CursorOptions represents options for querying a database cursor.
DB represents database connection which holds reference to global client and configuration for that database.
DBConfig represents the configuration parameters needed for a MongoDB connection.
DBConnection pmongo connection wrapper.
DBRef represents a MongoDB database reference.

# Interfaces

Document interface implemented by structs that needs to be persisted.

# Type aliases

Q query representation to hide bson.M type to single file.