Documentation ¶
Index ¶
- func BleveQueryToMongoFilters(queryString string, insensitive bool, fieldTransformer func(string) string) (filters []bson.E, err error)
- func OpenPool(ctx context.Context, uu string) (storage.Storage, error)
- type CollStats
- type Collation
- type Collection
- type Database
- type Indexer
- func (i *Indexer) Close(ctx context.Context) error
- func (i *Indexer) CloseAndDrop(ctx context.Context) error
- func (i *Indexer) Count(ctx context.Context, query interface{}) (int, 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) GetCodex() indexer.IndexCodex
- func (i *Indexer) Init(ctx context.Context, cfg configx.Values) error
- func (i *Indexer) InsertOne(ctx context.Context, data interface{}) error
- func (i *Indexer) NewBatch(ctx context.Context, opts ...indexer.BatchOption) (indexer.Batch, error)
- func (i *Indexer) Resync(ctx context.Context, logger func(string)) error
- func (i *Indexer) Search(ctx context.Context, query interface{}, out any) error
- func (i *Indexer) SetCodex(c indexer.IndexCodex)
- func (i *Indexer) SetCollection(c string)
- func (i *Indexer) Stats(ctx context.Context) map[string]interface{}
- func (i *Indexer) Truncate(ctx context.Context, max int64, logger func(string)) error
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Database ¶
Database type wraps the *mongo.Database to prepend prefix to collection names
func (*Database) CloseAndDrop ¶
CloseAndDrop implements storage.Dropper interface
func (*Database) Collection ¶
func (d *Database) Collection(name string, opts ...*options.CollectionOptions) *mongo.Collection
Collection overrides collection name by appending prefix
func (*Database) CreateCollection ¶
func (d *Database) CreateCollection(ctx context.Context, name string, opts ...*options.CreateCollectionOptions) error
CreateCollection overrides name by appending prefix
type Indexer ¶
type Indexer struct { *Database // contains filtered or unexported fields }
func (*Indexer) CloseAndDrop ¶
CloseAndDrop implements storage.Dropper interface
func (*Indexer) DeleteMany ¶
func (*Indexer) GetCodex ¶
func (i *Indexer) GetCodex() indexer.IndexCodex
func (*Indexer) SetCodex ¶
func (i *Indexer) SetCodex(c indexer.IndexCodex)
func (*Indexer) SetCollection ¶
Click to show internal directories.
Click to hide internal directories.