sqlbuilder

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialect

type Dialect interface {
	SetPagination()

	ToSQL(sql string) string
}

func Oracle

func Oracle() Dialect

func Postgres

func Postgres() Dialect

type SqlBuilder

type SqlBuilder interface {
	Where(args WhereArgs) WhereBuilder

	Build() (string, []interface{})
}

func Select

func Select(selectClausule string) SqlBuilder

type SqlBuilderFactory

type SqlBuilderFactory interface {
	Select(selectClausule string) SqlBuilder
}

func NewSqlBuilder

func NewSqlBuilder(dialect Dialect) SqlBuilderFactory

type Value

type Value interface {
	Add(sql string, args ...interface{})
}

type WhereArgs

type WhereArgs func(args Value)

type WhereBuilder

type WhereBuilder interface {
	SetPaginate(offset, limit int64) WhereBuilder

	GroupBy(sql string) WhereBuilder

	OrderBy(sql string) WhereBuilder

	Build() (string, []interface{})
}

Jump to

Keyboard shortcuts

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