Documentation ¶
Index ¶
- type Connection
- func (connection *Connection) Close() error
- func (connection *Connection) DeleteMany(dbName string, collName string, filter interface{}) error
- func (connection *Connection) DeleteOne(dbName string, collName string, filter interface{}) error
- func (connection *Connection) Find(dbName string, collName string, filter interface{}) error
- func (connection *Connection) FindAll(dbName string, collName string) error
- func (connection *Connection) FindOne(dbName string, collName string, filter interface{}) error
- func (connection *Connection) Insert(dbName string, collName string, doc interface{}) error
- func (connection *Connection) InsertMany(dbName string, collName string, docs []interface{}) error
- func (connection *Connection) UpdateMany(dbName string, collName string, filter interface{}, update interface{}) error
- func (connection *Connection) UpdateOne(dbName string, collName string, filter interface{}, update interface{}) error
- func (connection *Connection) Upsert(dbName string, collName string, filter interface{}, update interface{}) error
- type MongoDb
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
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
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
Click to show internal directories.
Click to hide internal directories.