executor

package
v0.0.1-beta1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpFindOne    = "findOne"
	OpFind       = "find"
	OpUpdateOne  = "updateOne"
	OpUpdateMany = "updateMany"
	OpDeleteOne  = "deleteOne"
	OpDeleteMany = "deleteMany"
	OpInsertOne  = "insertOne"
	OpInsertMany = "insertMany"
	OpCreate     = "create"
	OpDrop       = "drop"
	OpCount      = "count"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

type Executor interface {
	Run() (*MongoResponse, errors.Error)
	WithFilter(filter map[string]interface{}) Executor
	WithSet(data map[string]interface{}) Executor
	WithDocuments(documents []map[string]interface{}) Executor
	WithFindList(limit int) Executor
}

func New

func New(ctx context.Context, operation string, database, collection string,
	opts *options.ClientOptions) (Executor, errors.Error)

type MongoResponse

type MongoResponse struct {
	Type     string
	Element  map[string]interface{}
	Elements []map[string]interface{}
}

Jump to

Keyboard shortcuts

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