Documentation
¶
Index ¶
- func ToValue[T any](m Meta, inner T) *version.Value[T]
- type Collection
- func (c *Collection) ArchiveOne(ctx context.Context, filter bson.M, archived bool) error
- func (c *Collection) Client() *mongox.Collection
- func (c *Collection) Count(ctx context.Context, filter any, q version.Query) (int64, error)
- func (c *Collection) CountAggregation(ctx context.Context, pipeline []any, q version.Query) (int64, error)
- func (c *Collection) DeleteRef(ctx context.Context, ids []string, ref version.Ref) error
- func (c *Collection) Empty(ctx context.Context) error
- func (c *Collection) Find(ctx context.Context, filter any, q version.Query, consumer mongox.Consumer) error
- func (c *Collection) FindOne(ctx context.Context, filter any, q version.Query, consumer mongox.Consumer) error
- func (c *Collection) Indexes() []mongox.Index
- func (c *Collection) IsArchived(ctx context.Context, filter any) (bool, error)
- func (c *Collection) Paginate(ctx context.Context, filter any, q version.Query, s *usecasex.Sort, ...) (*usecasex.PageInfo, error)
- func (c *Collection) PaginateAggregation(ctx context.Context, pipeline []any, q version.Query, s *usecasex.Sort, ...) (*usecasex.PageInfo, error)
- func (c *Collection) RemoveOne(ctx context.Context, filter any) error
- func (c *Collection) SaveAll(ctx context.Context, ids []string, docs []any, parents []*version.VersionOrRef) error
- func (c *Collection) SaveMany(ctx context.Context, ids []string, docs []any) error
- func (c *Collection) SaveOne(ctx context.Context, id string, d any, parent *version.VersionOrRef) error
- func (c *Collection) Timestamp(ctx context.Context, filter any, q version.Query) (time.Time, error)
- func (c *Collection) UpdateRef(ctx context.Context, id string, ref version.Ref, dest *version.VersionOrRef) error
- type Document
- type Meta
- type MetadataDocument
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func NewCollection ¶
func NewCollection(client *mongox.Collection) *Collection
func (*Collection) ArchiveOne ¶
func (*Collection) Client ¶
func (c *Collection) Client() *mongox.Collection
func (*Collection) CountAggregation ¶
func (*Collection) Indexes ¶
func (c *Collection) Indexes() []mongox.Index
func (*Collection) IsArchived ¶
func (*Collection) PaginateAggregation ¶
func (*Collection) RemoveOne ¶
func (c *Collection) RemoveOne(ctx context.Context, filter any) error
func (*Collection) SaveAll ¶
func (c *Collection) SaveAll(ctx context.Context, ids []string, docs []any, parents []*version.VersionOrRef) error
func (*Collection) SaveOne ¶
func (c *Collection) SaveOne(ctx context.Context, id string, d any, parent *version.VersionOrRef) error
type Meta ¶
type MetadataDocument ¶
Click to show internal directories.
Click to hide internal directories.