loader

package
v0.4.36 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: MIT Imports: 7 Imported by: 0

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