dbkit

package
v0.8.27 Latest Latest
Warning

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

Go to latest
Published: May 3, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileOpts added in v0.8.27

func CompileOpts(builder sq.SelectBuilder, opts ...FindOption) (err error)

CompileOpts the find options

Types

type FindOption added in v0.8.19

type FindOption interface {
	CompileQuery(sq.SelectBuilder) (sq.SelectBuilder, error)
	String() string
}

FindOption to compile find query

func Pagination added in v0.8.19

func Pagination(offset, limit uint64) FindOption

Pagination find option

func PaginationWithRange added in v0.8.19

func PaginationWithRange(start, end uint64) FindOption

PaginationWithRange to setup pagination with start and end index

func Sort added in v0.8.19

func Sort(column string, orderBy OrderBy) FindOption

Sort is find option to sort by column and order

type OrderBy added in v0.8.19

type OrderBy int

OrderBy is type of order by

const (
	// Asc for ascending
	Asc OrderBy = iota

	// Desc for descending
	Desc
)

func (OrderBy) String added in v0.8.19

func (o OrderBy) String() string

type WhereCondition added in v0.8.19

type WhereCondition FindOption

WhereCondition is find option with WHERE condition

func Equal added in v0.8.19

func Equal(column string, expectation interface{}) WhereCondition

Equal where condition

func Like added in v0.8.19

func Like(column string, expectation interface{}) WhereCondition

Like where condition

Jump to

Keyboard shortcuts

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