Documentation
¶
Index ¶
- Variables
- func Aggregate(ctx context.Context, database, collection string, pipeline []bson.M, ...) error
- func AggregateByPage(ctx context.Context, database, collection, countField string, ...) error
- func CountDocuments(ctx context.Context, database, collection string, ...) (int64, error)
- func DeleteById(ctx context.Context, database, collection string, id interface{}) error
- func DeleteMany(ctx context.Context, database, collection string, ...) (int64, error)
- func DeleteOne(ctx context.Context, database, collection string, ...) (int64, error)
- func EstimatedDocumentCount(ctx context.Context, database, collection string) (int64, error)
- func Find(ctx context.Context, database, collection string, ...) error
- func FindById(ctx context.Context, database, collection string, id, result interface{}) error
- func FindByIds(ctx context.Context, database, collection string, ids, result interface{}) error
- func FindByPage(ctx context.Context, database, collection string, paging *db.Paging, ...) error
- func FindOne(ctx context.Context, database, collection string, ...) error
- func Insert(ctx context.Context, database string, document interface{}) (string, error)
- func Inserts(ctx context.Context, database string, documents []interface{}) ([]string, error)
- func UpdateById(ctx context.Context, database, collection string, id, update interface{}, ...) error
- func UpdateMany(ctx context.Context, database, collection string, ...) error
- func UpdateOne(ctx context.Context, database, collection string, ...) error
- type AppDao
- type AudioDao
- type ChatDao
- type CorpDao
- type IMongoDB
- type ImageDao
- type KeyDao
- type MidjourneyDao
- type ModelAgentDao
- type ModelDao
- type MongoDB
- func (m *MongoDB[T]) Aggregate(ctx context.Context, pipeline []bson.M, result interface{}) error
- func (m *MongoDB[T]) AggregateByPage(ctx context.Context, countField string, paging *db.Paging, ...) error
- func (m *MongoDB[T]) CountDocuments(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteById(ctx context.Context, id interface{}) error
- func (m *MongoDB[T]) DeleteMany(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) DeleteOne(ctx context.Context, filter map[string]interface{}) (int64, error)
- func (m *MongoDB[T]) EstimatedDocumentCount(ctx context.Context) (int64, error)
- func (m *MongoDB[T]) Find(ctx context.Context, filter map[string]interface{}, sortFields ...string) ([]*T, error)
- func (m *MongoDB[T]) FindById(ctx context.Context, id interface{}) (*T, error)
- func (m *MongoDB[T]) FindByIds(ctx context.Context, ids interface{}) ([]*T, error)
- func (m *MongoDB[T]) FindByPage(ctx context.Context, paging *db.Paging, filter map[string]interface{}, ...) ([]*T, error)
- func (m *MongoDB[T]) FindOne(ctx context.Context, filter map[string]interface{}, sortFields ...string) (*T, error)
- func (m *MongoDB[T]) Insert(ctx context.Context, document interface{}) (string, error)
- func (m *MongoDB[T]) Inserts(ctx context.Context, documents []interface{}) ([]string, error)
- func (m *MongoDB[T]) UpdateById(ctx context.Context, id, update interface{}, isUpsert ...bool) error
- func (m *MongoDB[T]) UpdateMany(ctx context.Context, filter map[string]interface{}, update interface{}, ...) error
- func (m *MongoDB[T]) UpdateOne(ctx context.Context, filter map[string]interface{}, update interface{}, ...) error
- type SysConfigDao
- type UserDao
Constants ¶
This section is empty.
Variables ¶
View Source
var App = NewAppDao()
View Source
var Audio = NewAudioDao()
View Source
var Chat = NewChatDao()
View Source
var Corp = NewCorpDao()
View Source
var Image = NewImageDao()
View Source
var Key = NewKeyDao()
View Source
var Midjourney = NewMidjourneyDao()
View Source
var Model = NewModelDao()
View Source
var ModelAgent = NewModelAgentDao()
View Source
var SysConfig = NewSysConfigDao()
View Source
var User = NewUserDao()
Functions ¶
func AggregateByPage ¶
func CountDocuments ¶
func DeleteById ¶
func DeleteMany ¶
func EstimatedDocumentCount ¶
func FindByPage ¶
func UpdateById ¶
func UpdateMany ¶
Types ¶
type AudioDao ¶ added in v0.5.0
func NewAudioDao ¶ added in v0.5.0
type ChatDao ¶
func NewChatDao ¶
type CorpDao ¶ added in v0.3.0
func NewCorpDao ¶ added in v0.3.0
type ImageDao ¶ added in v0.4.0
func NewImageDao ¶ added in v0.4.0
type MidjourneyDao ¶ added in v0.4.0
type MidjourneyDao struct { *MongoDB[entity.Midjourney] }
func NewMidjourneyDao ¶ added in v0.4.0
func NewMidjourneyDao(database ...string) *MidjourneyDao
type ModelAgentDao ¶
type ModelAgentDao struct { *MongoDB[entity.ModelAgent] }
func NewModelAgentDao ¶
func NewModelAgentDao(database ...string) *ModelAgentDao
type ModelDao ¶
func NewModelDao ¶
type MongoDB ¶
func NewMongoDB ¶
func (*MongoDB[T]) AggregateByPage ¶
func (*MongoDB[T]) CountDocuments ¶
func (*MongoDB[T]) DeleteById ¶
func (*MongoDB[T]) DeleteMany ¶
func (*MongoDB[T]) EstimatedDocumentCount ¶
func (*MongoDB[T]) FindByPage ¶
func (*MongoDB[T]) UpdateById ¶
func (*MongoDB[T]) UpdateMany ¶
type SysConfigDao ¶ added in v1.3.0
func NewSysConfigDao ¶ added in v1.3.0
func NewSysConfigDao(database ...string) *SysConfigDao
Click to show internal directories.
Click to hide internal directories.