Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionCursor ¶
type CollectionCursor struct { Context context.Context Collection *mongo.Collection }
func (*CollectionCursor) FindOne ¶
func (cursor *CollectionCursor) FindOne(filter any, data any, opts ...*options.FindOneOptions) error
func (*CollectionCursor) Insert ¶
func (cursor *CollectionCursor) Insert(data ...any) error
type MongoClient ¶
type MongoClient struct { Client *mongo.Client Context context.Context Database *mongo.Database LoadedCollections map[string]*CollectionCursor }
func Connect ¶
func Connect(options *options.ClientOptions, database string) (*MongoClient, error)
Constructor
func (*MongoClient) Collection ¶
func (client *MongoClient) Collection(name string, opts ...*options.CollectionOptions) *CollectionCursor
Standard methods
func (*MongoClient) Disconnect ¶
func (client *MongoClient) Disconnect() error
func (*MongoClient) UnloadCollection ¶ added in v1.3.0
func (client *MongoClient) UnloadCollection(name string) bool
Click to show internal directories.
Click to hide internal directories.