query

package
v0.0.0-...-daf71f5 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QueryBuilder

type QueryBuilder struct{}

QueryBuilder provides methods to generate MySQL queries from pointers to structs.

func NewQueryBuilder

func NewQueryBuilder() *QueryBuilder

NewQueryBuilder returns a pointer to a new instance of the QueryBuilder struct.

func (*QueryBuilder) BuildDeleteQuery

func (builder *QueryBuilder) BuildDeleteQuery(object interface{}) (string, []interface{}, error)

BuildDeleteQuery constructs and returns a MySQL DELETE query and arguments from the passed object (struct pointer).

func (*QueryBuilder) BuildInsertQuery

func (builder *QueryBuilder) BuildInsertQuery(object interface{}) (string, []interface{})

BuildInsertQuery constructs and returns a MySQL INSERT query and arguments from the passed object (struct pointer).

func (*QueryBuilder) BuildSelectQuery

func (builder *QueryBuilder) BuildSelectQuery(object interface{}) (string, []interface{}, error)

BuildSelectQuery constructs and returns a MySQL SELECT query and arguments from the passed object (struct pointer).

func (*QueryBuilder) BuildUpdateQuery

func (builder *QueryBuilder) BuildUpdateQuery(object interface{}) (string, []interface{}, error)

BuildUpdateQuery constructs and returns a MySQL UPDATE query and arguments from the passed object (struct pointer).

Jump to

Keyboard shortcuts

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