grammar

package
v0.0.0-...-f986c1d Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseGrammar

type BaseGrammar struct {
}

func (*BaseGrammar) IsExpression

func (g *BaseGrammar) IsExpression(value interface{}) bool

IsExpression Determine if the given value is a raw expression.

func (*BaseGrammar) Parameter

func (g *BaseGrammar) Parameter(value interface{}) interface{}

Parameter Get the appropriate query parameter place-holder for a value.

func (*BaseGrammar) Parameterize

func (g *BaseGrammar) Parameterize(values []interface{}) string

func (*BaseGrammar) PrepareBindingsForUpdate

func (g *BaseGrammar) PrepareBindingsForUpdate(bindings map[string][]interface{}, values map[string]interface{}) []interface{}

PrepareBindingsForUpdate Prepare the bindings for an update statement.

type Expression

type Expression interface {
	GetValue() interface{}
}

type Grammar

type Grammar interface {
	// CompileSelect Compile a select query into SQL.
	CompileSelect(query *query.Query) string

	// CompileInsert Compile an insert statement into SQL.
	CompileInsert(query *query.Query, values []map[string]interface{}) (string, []interface{})

	// CompileUpdate Compile an update statement into SQL.
	CompileUpdate(query *query.Query, values map[string]interface{}) string

	// CompileDelete Compile a delete statement into SQL.
	CompileDelete(query *query.Query) string

	// PrepareBindingsForUpdate Prepare the bindings for an update statement.
	PrepareBindingsForUpdate(bindings map[string][]interface{}, values map[string]interface{}) []interface{}
}

type MySqlGrammar

type MySqlGrammar struct {
	BaseGrammar
	// contains filtered or unexported fields
}

func (*MySqlGrammar) CompileDelete

func (g *MySqlGrammar) CompileDelete(query *query.Query) string

CompileDelete Compile a delete statement into SQL.

func (*MySqlGrammar) CompileInsert

func (g *MySqlGrammar) CompileInsert(query *query.Query, values []map[string]interface{}) (string, []interface{})

CompileInsert Compile an insert statement into SQL.

func (*MySqlGrammar) CompileSelect

func (g *MySqlGrammar) CompileSelect(query *query.Query) string

CompileSelect Compile a select query into SQL.

func (*MySqlGrammar) CompileUpdate

func (g *MySqlGrammar) CompileUpdate(query *query.Query, values map[string]interface{}) string

CompileUpdate Compile an update statement into SQL.

func (*MySqlGrammar) PrepareBindingsForUpdate

func (g *MySqlGrammar) PrepareBindingsForUpdate(bindings map[string][]interface{}, values map[string]interface{}) []interface{}

PrepareBindingsForUpdate Prepare the bindings for an update statement.

func (*MySqlGrammar) Wrap

func (g *MySqlGrammar) Wrap(value string, prefixAlias bool) string

func (*MySqlGrammar) WrapTable

func (g *MySqlGrammar) WrapTable(table string) string

Jump to

Keyboard shortcuts

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