xk6_mongodb

package module
v0.0.0-...-b03e0a0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

xk6-mongodb

K6 extension for performance test on MongoDB by GeckosLab

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Client *mongo.Client
}

func (*Connection) Close

func (connection *Connection) Close() error

func (*Connection) DeleteMany

func (connection *Connection) DeleteMany(dbName string, collName string, filter interface{}) error

func (*Connection) DeleteOne

func (connection *Connection) DeleteOne(dbName string, collName string, filter interface{}) error

func (*Connection) Find

func (connection *Connection) Find(dbName string, collName string, filter interface{}) error

func (*Connection) FindAll

func (connection *Connection) FindAll(dbName string, collName string) error

func (*Connection) FindOne

func (connection *Connection) FindOne(dbName string, collName string, filter interface{}) error

func (*Connection) Insert

func (connection *Connection) Insert(dbName string, collName string, doc interface{}) error

func (*Connection) InsertMany

func (connection *Connection) InsertMany(dbName string, collName string, docs []interface{}) error

func (*Connection) UpdateMany

func (connection *Connection) UpdateMany(dbName string, collName string, filter interface{}, update interface{}) error

func (*Connection) UpdateOne

func (connection *Connection) UpdateOne(dbName string, collName string, filter interface{}, update interface{}) error

func (*Connection) Upsert

func (connection *Connection) Upsert(dbName string, collName string, filter interface{}, update interface{}) error

type MongoDb

type MongoDb struct{}

func (*MongoDb) Connect

func (*MongoDb) Connect(url string) *Connection

func (*MongoDb) NewId

func (*MongoDb) NewId() mongoPrimitive.ObjectID

func (*MongoDb) NewIdFromHex

func (*MongoDb) NewIdFromHex(hex string) mongoPrimitive.ObjectID

Jump to

Keyboard shortcuts

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