builder

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sqlbuilder

type Sqlbuilder struct {
	Dialect string //Can be postgres, mysql or (more to come)
	// contains filtered or unexported fields
}

func New

func New(dialect string) *Sqlbuilder

func (*Sqlbuilder) Build

func (s *Sqlbuilder) Build() string

func (*Sqlbuilder) BuildInsert

func (s *Sqlbuilder) BuildInsert(table string, data interface{}, additionalQuery ...string) (string, error)

func (*Sqlbuilder) BuildUpdate

func (s *Sqlbuilder) BuildUpdate(table string, data interface{}, additionalQuery string) (string, error)

func (*Sqlbuilder) Column

func (s *Sqlbuilder) Column(column string, value interface{}) *Sqlbuilder

Column

Adds a string column for INSERT & UPDATE statements.

func (*Sqlbuilder) Count

func (s *Sqlbuilder) Count() string

func (*Sqlbuilder) DeleteFrom

func (s *Sqlbuilder) DeleteFrom(fromStmt string) *Sqlbuilder

func (*Sqlbuilder) Exists

func (s *Sqlbuilder) Exists() string

func (*Sqlbuilder) From

func (s *Sqlbuilder) From(fromStmt string) *Sqlbuilder

func (*Sqlbuilder) Insert

func (s *Sqlbuilder) Insert(table string) *Sqlbuilder

Insert

Sets the insert table statement to the table name.

func (*Sqlbuilder) LeftJoin

func (s *Sqlbuilder) LeftJoin(table string, as string, on string) *Sqlbuilder

func (*Sqlbuilder) LeftJoinExtended

func (s *Sqlbuilder) LeftJoinExtended(table string, as string, on string, additionalQuery ...string) *Sqlbuilder

func (*Sqlbuilder) Limit

func (s *Sqlbuilder) Limit(limit int) *Sqlbuilder

func (*Sqlbuilder) Offset

func (s *Sqlbuilder) Offset(offset int) *Sqlbuilder

func (*Sqlbuilder) OrderBy

func (s *Sqlbuilder) OrderBy(column string, diretion string) *Sqlbuilder

func (*Sqlbuilder) Reset

func (s *Sqlbuilder) Reset() *Sqlbuilder

func (*Sqlbuilder) Select

func (s *Sqlbuilder) Select(selectStmt ...string) *Sqlbuilder

func (*Sqlbuilder) SelectRaw

func (s *Sqlbuilder) SelectRaw(selectStmt string) *Sqlbuilder

func (*Sqlbuilder) Update

func (s *Sqlbuilder) Update(table string) *Sqlbuilder

Update

Sets the update table statement to the table name.

func (*Sqlbuilder) Where

func (s *Sqlbuilder) Where(table string, operator string, value interface{}) *Sqlbuilder

func (*Sqlbuilder) WhereIn

func (s *Sqlbuilder) WhereIn(column string, params interface{}) *Sqlbuilder

Accepts Slice of INT, FLOAT32, STRING, or a simple comma separated STRING

func (*Sqlbuilder) WhereRaw

func (s *Sqlbuilder) WhereRaw(whereStmt string) *Sqlbuilder

func (*Sqlbuilder) WhereStringMatchAll

func (s *Sqlbuilder) WhereStringMatchAll(column string, params []string) *Sqlbuilder

func (*Sqlbuilder) WhereStringMatchAny

func (s *Sqlbuilder) WhereStringMatchAny(column string, params []string) *Sqlbuilder

Jump to

Keyboard shortcuts

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