ldb

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(ctx context.Context, db *database.Service, m *model.Model, changes util.ValueMap, logger util.Logger) ([]any, error)

func Count

func Count(ctx context.Context, db *database.Service, m *model.Model, logger util.Logger) (int, error)

func Get

func Get(ctx context.Context, db *database.Service, m *model.Model, ids []any, logger util.Logger) (*result.Result, error)

func List

func List(ctx context.Context, db *database.Service, m *model.Model, opts *filter.Options, logger util.Logger) (*result.Result, error)

func ParseResult

func ParseResult(
	title string, count int, q string, timing *result.Timing, rows *sqlx.Rows, enums model.Models, logger util.Logger,
) (*result.Result, error)

func ParseResultFields

func ParseResultFields(title string, count int, q string, timing *result.Timing, fields field.Fields, rows *sqlx.Rows) (*result.Result, error)

func Query

func Query(ctx context.Context, db *database.Service, sql string, enums model.Models, logger util.Logger) (*result.Result, error)

func Remove

func Remove(ctx context.Context, db *database.Service, m *model.Model, fields []string, values []any, expected int, logger util.Logger) (int, error)

func Save

func Save(
	ctx context.Context, db *database.Service, m *model.Model, ids []any, changes util.ValueMap, logger util.Logger,
) ([]any, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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