dataUtil

package
v0.0.0-...-7bb2ca5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamedQueryList

func NamedQueryList[T any](db DB, t []*T, arg NamedQueryEntity, query, defaultSort, orderAlias string) (list []*T)

func NamedQueryListAndTotal

func NamedQueryListAndTotal[T any](db DB, t []*T, arg NamedQueryEntity, query, defaultSort, orderAlias string) (list []*T, total *int64)

Types

type DB

type DB interface {
	NamedExec(query string, arg interface{}) (sql.Result, error)
	Exec(query string, args ...interface{}) (sql.Result, error)

	NamedQuery(query string, arg interface{}) (*sqlx.Rows, error)

	Select(dest interface{}, query string, args ...interface{}) error
	Get(dest interface{}, query string, args ...interface{}) error
}

type NamedQueryEntity

type NamedQueryEntity interface {
	GetOrder() string
	GetLimit() string
	GetSize() int64
	GetOffset() int64
}

Jump to

Keyboard shortcuts

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