Documentation
¶
Index ¶
- type Client
- type Coll
- type DB
- type MongoClient
- type MongoColl
- func (s *MongoColl) CreateIndexes(nameCols ...string) error
- func (s *MongoColl) DeleteByID(id string) error
- func (s *MongoColl) Insert(records []interface{}) ([]string, error)
- func (s *MongoColl) Query(filter interface{}, results interface{}, sortMap ...map[string]interface{}) error
- func (s *MongoColl) Query2chan(filter interface{}, records chan map[string]interface{}, ...) error
- func (s *MongoColl) UpdateByID(id string, update map[string]interface{}) error
- type MongoDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coll ¶
type Coll interface { Query(filter interface{}, records interface{}, sortMap ...map[string]interface{}) error // query by filter Query2chan(filter interface{}, recordChan chan map[string]interface{}, sortMap ...map[string]interface{}) error Insert(records []interface{}) ([]string, error) // insert DeleteByID(id string) error UpdateByID(id string, update map[string]interface{}) error CreateIndexes(nameCols ...string) error }
type DB ¶
type MongoClient ¶
type MongoClient struct {
// contains filtered or unexported fields
}
func NewMongoClient ¶
func NewMongoClient(uri string) (*MongoClient, error)
type MongoColl ¶
type MongoColl struct {
// contains filtered or unexported fields
}
func (*MongoColl) CreateIndexes ¶
func (*MongoColl) Query2chan ¶
type MongoDB ¶
type MongoDB struct {
// contains filtered or unexported fields
}
func (*MongoDB) RemoveCollById ¶
Click to show internal directories.
Click to hide internal directories.