ldb

package
v0.1.41 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: MIT Imports: 14 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 *zap.SugaredLogger) ([]interface{}, error)

func Count

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

func Get

func Get(ctx context.Context, db *database.Service, m *model.Model, ids []interface{}, logger *zap.SugaredLogger) (*result.Result, error)

func List

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

func ParseResult

func ParseResult(
	title string, count int, q string, timing *result.Timing, rows *sqlx.Rows, enums model.Models, logger *zap.SugaredLogger,
) (*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 *zap.SugaredLogger) (*result.Result, error)

func Remove

func Remove(
	ctx context.Context, db *database.Service, m *model.Model, fields []string, values []interface{}, expected int, logger *zap.SugaredLogger,
) (int, error)

func Save

func Save(
	ctx context.Context, db *database.Service, m *model.Model, ids []interface{}, changes util.ValueMap, logger *zap.SugaredLogger,
) ([]interface{}, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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