Documentation
¶
Index ¶
- Variables
- func Create[T any](ctx context.Context, engine *Engine, object T, nsId ...uint64) (uint64, T, error)
- func Delete[T any, R UniqueField](ctx context.Context, engine *Engine, uniqueField R, nsId ...uint64) (uint64, T, error)
- func Get[T any, R UniqueField](ctx context.Context, engine *Engine, uniqueField R, nsId ...uint64) (uint64, T, error)
- func Query[T any](ctx context.Context, engine *Engine, queryParams QueryParams, nsId ...uint64) ([]uint64, []T, error)
- func Upsert[T any](ctx context.Context, engine *Engine, object T, nsId ...uint64) (uint64, T, bool, error)
- type Config
- type ConstrainedField
- type Engine
- func (engine *Engine) Close()
- func (engine *Engine) CreateNamespace() (*Namespace, error)
- func (engine *Engine) DropAll(ctx context.Context) error
- func (engine *Engine) GetDefaultNamespace() *Namespace
- func (engine *Engine) GetNamespace(nsID uint64) (*Namespace, error)
- func (ns *Engine) LeaseUIDs(numUIDs uint64) (*pb.AssignedIds, error)
- func (engine *Engine) Load(ctx context.Context, schemaPath, dataPath string) error
- func (engine *Engine) LoadData(inCtx context.Context, dataDir string) error
- type Filter
- type ModusDbOption
- type Namespace
- func (ns *Namespace) AlterSchema(ctx context.Context, sch string) error
- func (ns *Namespace) DropData(ctx context.Context) error
- func (ns *Namespace) ID() uint64
- func (n *Namespace) Load(ctx context.Context, schemaPath, dataPath string) error
- func (n *Namespace) LoadData(inCtx context.Context, dataDir string) error
- func (ns *Namespace) Mutate(ctx context.Context, ms []*api.Mutation) (map[string]uint64, error)
- func (ns *Namespace) Query(ctx context.Context, query string) (*api.Response, error)
- type Pagination
- type QueryParams
- type Sorting
- type StringPredicate
- type UniqueField
- type VectorPredicate
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func NewDefaultConfig ¶
func (Config) WithLimitNormalizeNode ¶
type ConstrainedField ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine is an instance of modusDB. For now, we only support one instance of modusDB per process.
func (*Engine) CreateNamespace ¶
func (*Engine) GetDefaultNamespace ¶
type Filter ¶
type Filter struct { Field string String StringPredicate Vector VectorPredicate And *Filter Or *Filter Not *Filter }
type ModusDbOption ¶
type ModusDbOption func(*modusDbOptions)
func WithNamespace ¶
func WithNamespace(ns uint64) ModusDbOption
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace is one of the namespaces in modusDB.
func (*Namespace) AlterSchema ¶
type Pagination ¶
type QueryParams ¶
type QueryParams struct { Filter *Filter Pagination *Pagination Sorting *Sorting }
type StringPredicate ¶
type UniqueField ¶
type UniqueField interface { uint64 | ConstrainedField }
type VectorPredicate ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.