loader

package
v0.6.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	Schema(ctx context.Context) (*schema.Schema, error)

	Connection(ctx context.Context) (any, error)
	List(ctx context.Context, m *model.Model, opts *filter.Options) (*result.Result, error)
	Count(ctx context.Context, m *model.Model) (int, error)
	Get(ctx context.Context, m *model.Model, ids []any) (*result.Result, error)
	Query(ctx context.Context, enums model.Models, sql string) (*result.Result, error)
	Add(ctx context.Context, m *model.Model, changes util.ValueMap) ([]any, error)
	Save(ctx context.Context, m *model.Model, ids []any, changes util.ValueMap) ([]any, error)
	Remove(ctx context.Context, m *model.Model, fields []string, values []any, expected int) (int, error)
	Default(ctx context.Context, m *model.Model) ([]any, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService() *Service

func (*Service) Clear

func (s *Service) Clear()

func (*Service) Get

func (s *Service) Get(origin schema.Origin, key string, cfg []byte) (Loader, error)

func (*Service) Set

func (s *Service) Set(o schema.Origin, f loaderFn)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL