Documentation ¶
Index ¶
- Constants
- type MongoDao
- func (m *MongoDao) DeleteById(tableName string, id interface{}) error
- func (m *MongoDao) InsertRow(tableName string, colNames []string, colValues []interface{}) error
- func (m *MongoDao) InsertRows(tableName string, colNames []string, colsValues ...[]interface{}) error
- func (m *MongoDao) SelectAll(tableName string, query *mongo.Query) ([]bson.M, error)
- func (m *MongoDao) SelectById(tableName string, id interface{}) (bson.M, error)
- func (m *MongoDao) SelectByIds(tableName string, ids ...interface{}) ([]bson.M, error)
- func (m *MongoDao) SelectCount(tableName string, selector interface{}) (int, error)
- func (m *MongoDao) SelectOne(tableName string, query *mongo.Query) (bson.M, error)
- func (m *MongoDao) UpdateById(tableName string, id interface{}, updater map[string]interface{}) error
- type MongoExecResult
Constants ¶
View Source
const ( MONGO_COND_EQUAL = "$eq" MONGO_COND_NOT_EQUAL = "$ne" MONGO_COND_LESS = "$lt" MONGO_COND_LESS_EQUAL = "$lte" MONGO_COND_GREATER = "$gt" MONGO_COND_GREATER_EQUAL = "$gte" MONGO_COND_IN = "$in" MONGO_COND_NOT_IN = "$nin" MONGO_COND_REGEX = "$regex" MONGO_COND_OPTIONS = "$options" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoDao ¶
func NewMongoDao ¶
func (*MongoDao) DeleteById ¶
func (*MongoDao) InsertRows ¶
func (*MongoDao) SelectById ¶
func (*MongoDao) SelectByIds ¶
func (*MongoDao) SelectCount ¶
type MongoExecResult ¶
type MongoExecResult struct {
Err error
}
Click to show internal directories.
Click to hide internal directories.