Documentation ¶
Index ¶
- type Dao
- type MgoDao
- func (m MgoDao[E]) All(query bson.M) ([]E, error)
- func (m MgoDao[E]) Delete(query bson.M) error
- func (m MgoDao[E]) Insert(entity *E) error
- func (m MgoDao[E]) One(query bson.M) (*E, error)
- func (m MgoDao[E]) Pager(query bson.M, sort []string, page, size int) ([]E, *models.ResultPage, error)
- func (m MgoDao[E]) Updates(id bson.ObjectId, doc E) error
- type MySQLDao
- func (receiver *MySQLDao[E]) All(entity E) ([]E, error)
- func (receiver *MySQLDao[E]) Create(entity *E) error
- func (m *MySQLDao[E]) Debug() *MySQLDao[E]
- func (receiver *MySQLDao[E]) Delete(entity E) error
- func (receiver *MySQLDao[E]) MultiCreate(entities []*E) error
- func (receiver *MySQLDao[E]) One(entity E) (*E, error)
- func (receiver *MySQLDao[E]) Pager(conn *gorm.DB, page, size int) ([]E, *models.ResultPage, error)
- func (receiver *MySQLDao[E]) Save(entity *E) error
- func (receiver *MySQLDao[E]) Updates(entity *E) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MgoDao ¶
MgoDao 注意使用前必须先将CollectionName赋值
Click to show internal directories.
Click to hide internal directories.