typed_mongo

package module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: MIT Imports: 7 Imported by: 0

README

typed-mongo

mongo with types

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Find

func Find[T any](ctx context.Context, c *mongo.Collection, filter typed.Filter, opts ...*options.FindOptions) ([]*T, error)

func FindOne

func FindOne[T any](ctx context.Context, c *mongo.Collection, filter typed.Filter, opts ...*options.FindOneOptions) (*T, error)

func FindOneAndUpdate

func FindOneAndUpdate[T any](ctx context.Context, c *mongo.Collection, m *typed.FindOneAndUpdate, opts ...*options.FindOneAndUpdateOptions) (*T, error)

func InsertMany added in v0.0.4

func InsertMany[T any](ctx context.Context, c *mongo.Collection, docs []*T) ([]primitive.ObjectID, error)

func InsertOne

func InsertOne[T any](ctx context.Context, c *mongo.Collection, doc T) (primitive.ObjectID, error)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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