lpostgres

package
v0.4.27 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(cfg []byte) (*database.PostgresParams, error)

func NewLoader

func NewLoader(ctx context.Context, logger util.Logger) func(key string, cfg []byte) (loader.Loader, error)

Types

type Loader

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

func (*Loader) Add

func (l *Loader) Add(ctx context.Context, m *model.Model, changes util.ValueMap) ([]any, error)

func (*Loader) Connection

func (l *Loader) Connection(_ context.Context) (any, error)

func (*Loader) Count

func (l *Loader) Count(ctx context.Context, m *model.Model) (int, error)

func (*Loader) Default

func (l *Loader) Default(_ context.Context, m *model.Model) ([]any, error)

func (*Loader) Get

func (l *Loader) Get(ctx context.Context, m *model.Model, ids []any) (*result.Result, error)

func (*Loader) List

func (l *Loader) List(ctx context.Context, m *model.Model, opts *filter.Options) (*result.Result, error)

func (*Loader) Query

func (l *Loader) Query(ctx context.Context, enums model.Models, sql string) (*result.Result, error)

func (*Loader) Remove

func (l *Loader) Remove(ctx context.Context, m *model.Model, fields []string, values []any, expected int) (int, error)

func (*Loader) Save

func (l *Loader) Save(ctx context.Context, m *model.Model, ids []any, changes util.ValueMap) ([]any, error)

func (*Loader) Schema

func (l *Loader) Schema(ctx context.Context) (*schema.Schema, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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