mongo

package module
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewObjectId

func NewObjectId(v interface{}) *objectId

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) Close

func (m *Client) Close()

func (*Client) Connect

func (m *Client) Connect(url string, db string, collection string) error

func (*Client) CreateCollection

func (m *Client) CreateCollection() error

func (*Client) DeleteById

func (m *Client) DeleteById(objectId string) error

func (*Client) DeleteBySlug

func (m *Client) DeleteBySlug(slug string, v interface{}) error

func (*Client) DropCollection

func (m *Client) DropCollection() error

func (*Client) FindAll

func (m *Client) FindAll(v interface{}) error

func (*Client) FindById

func (m *Client) FindById(objectId string, v interface{}) error

func (*Client) FindByValue

func (m *Client) FindByValue(q interface{}, v interface{}) error

func (*Client) FindByValueSorted

func (m *Client) FindByValueSorted(q interface{}, v interface{}, fields ...string) error

func (*Client) FindGroup

func (m *Client) FindGroup(q interface{}, groupPipe bson.M, sortPipe bson.M, v interface{}) error

func (*Client) FindRedact

func (m *Client) FindRedact(q interface{}, redactPipe bson.M, sortPipe bson.M, v interface{}) error

func (*Client) Insert

func (m *Client) Insert(v interface{}) error

func (*Client) ReadByID

func (m *Client) ReadByID(objectId string, v interface{}) error

func (*Client) ReadBySlug

func (m *Client) ReadBySlug(slug string, v interface{}) error

func (*Client) ReadByValue

func (m *Client) ReadByValue(v interface{}) error

func (*Client) ReadByValueFiltered

func (m *Client) ReadByValueFiltered(f interface{}, v interface{}) error

func (*Client) ReadRaw

func (m *Client) ReadRaw(q bson.M, v interface{}) error

func (*Client) Update

func (m *Client) Update(v interface{}) error

func (*Client) UpdateRaw

func (m *Client) UpdateRaw(q bson.M) error

func (*Client) UpdateRawFiltered

func (m *Client) UpdateRawFiltered(f bson.M, q bson.M) error

Jump to

Keyboard shortcuts

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