Documentation ¶
Index ¶
- Variables
- func Create[T any](db *DB, object T, ns ...uint64) (uint64, T, error)
- func Delete[T any, R UniqueField](db *DB, uniqueField R, ns ...uint64) (uint64, T, error)
- func Get[T any, R UniqueField](db *DB, uniqueField R, ns ...uint64) (uint64, T, error)
- func Query[T any](db *DB, queryParams QueryParams, ns ...uint64) ([]uint64, []T, error)
- func Upsert[T any](db *DB, object T, ns ...uint64) (uint64, T, bool, error)
- type Config
- type ConstrainedField
- type DB
- func (db *DB) AlterSchema(ctx context.Context, sch string) error
- func (db *DB) Close()
- func (db *DB) CreateNamespace() (*Namespace, error)
- func (db *DB) DropAll(ctx context.Context) error
- func (db *DB) DropData(ctx context.Context) error
- func (db *DB) GetNamespace(nsID uint64) (*Namespace, error)
- func (db *DB) LeaseUIDs(numUIDs uint64) (*pb.AssignedIds, error)
- func (db *DB) Load(ctx context.Context, schemaPath, dataPath string) error
- func (db *DB) LoadData(inCtx context.Context, dataDir string) error
- func (db *DB) Mutate(ctx context.Context, ms []*api.Mutation) (map[string]uint64, error)
- func (db *DB) Query(ctx context.Context, q string) (*api.Response, error)
- type Filter
- type ModusDbOption
- type Namespace
- func (n *Namespace) AlterSchema(ctx context.Context, sch string) error
- func (n *Namespace) DropData(ctx context.Context) error
- func (n *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 (n *Namespace) Mutate(ctx context.Context, ms []*api.Mutation) (map[string]uint64, error)
- func (n *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 DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB is an instance of modusDB. For now, we only support one instance of modusDB per process.
func (*DB) CreateNamespace ¶
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(namespace 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.