Documentation ¶
Index ¶
- Constants
- func BleveQueryToMongoFilters(queryString string, insensitive bool, fieldTransformer func(string) string) (filters []bson.E, err error)
- func NewDAO(ctx context.Context, driver string, dsn string, prefix string) (dao.DAO, error)
- func NewIndexer(ctx context.Context, dao dao.DAO) (dao.IndexDAO, error)
- type CollStats
- type Collation
- type Collection
- type DAO
- type Handler
- type IndexDAO
- type Indexer
- func (i *Indexer) Close(ctx context.Context) error
- func (i *Indexer) DeleteMany(ctx context.Context, query interface{}) (int32, error)
- func (i *Indexer) DeleteOne(ctx context.Context, data interface{}) error
- func (i *Indexer) FindMany(ctx context.Context, query interface{}, offset, limit int32, sortFields string, ...) (chan interface{}, error)
- func (i *Indexer) Flush(ctx context.Context) error
- func (i *Indexer) Init(ctx context.Context, cfg configx.Values) error
- func (i *Indexer) InsertOne(ctx context.Context, data interface{}) error
- func (i *Indexer) Resync(ctx context.Context, logger func(string)) error
- func (i *Indexer) SetCodex(c dao.IndexCodex)
- func (i *Indexer) SetCollection(c string)
- func (i *Indexer) Truncate(ctx context.Context, max int64, logger func(string)) error
- type Model
Constants ¶
View Source
const Driver = "mongodb"
Variables ¶
This section is empty.
Functions ¶
func BleveQueryToMongoFilters ¶
func BleveQueryToMongoFilters(queryString string, insensitive bool, fieldTransformer func(string) string) (filters []bson.E, err error)
BleveQueryToMongoFilters parses a Blevesearch query string to a slice of bson primitives
Types ¶
type Collection ¶
type Handler ¶
Handler for the main functions of the DAO
func (*Handler) Collection ¶ added in v4.0.1
func (h *Handler) Collection(name string) *mongo.Collection
Collection returns a usable *mongo.Collection
type Indexer ¶
type Indexer struct { DAO // contains filtered or unexported fields }
func (*Indexer) DeleteMany ¶
func (*Indexer) SetCodex ¶
func (i *Indexer) SetCodex(c dao.IndexCodex)
func (*Indexer) SetCollection ¶
Click to show internal directories.
Click to hide internal directories.