orm

package
v0.0.66 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Pagination
	DefaultQueryLimit  = 10
	DefaultQueryOffset = 0
)

Variables

View Source
var ErrConflict = errors.New("unable to process the requested resource because of conflict in the current state")
View Source
var ErrNotFound = errors.New("unable to locate the requested resource")
View Source
var ErrUnImplemented = errors.New("unimplemented method")

Functions

func FormatLimit

func FormatLimit(limit int) int

func FormatOffset

func FormatOffset(offset int) int

func FormatPagination

func FormatPagination(LimitPerPage, PageSeq int) (limit, offset int)

Types

type CommonSqlData

type CommonSqlData struct {
	Id        uint      `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`

	IsDeleted bool         `db:"is_deleted"`
	DeletedAt sql.NullTime `db:"deleted_at"`

	Version uint `db:"version"`
}

Jump to

Keyboard shortcuts

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