Documentation ¶
Index ¶
- type BaseGrammar
- func (g *BaseGrammar) IsExpression(value interface{}) bool
- func (g *BaseGrammar) Parameter(value interface{}) interface{}
- func (g *BaseGrammar) Parameterize(values []interface{}) string
- func (g *BaseGrammar) PrepareBindingsForUpdate(bindings map[string][]interface{}, values map[string]interface{}) []interface{}
- type Expression
- type Grammar
- type MySqlGrammar
- func (g *MySqlGrammar) CompileDelete(query *query.Query) string
- func (g *MySqlGrammar) CompileInsert(query *query.Query, values []map[string]interface{}) (string, []interface{})
- func (g *MySqlGrammar) CompileSelect(query *query.Query) string
- func (g *MySqlGrammar) CompileUpdate(query *query.Query, values map[string]interface{}) string
- func (g *MySqlGrammar) PrepareBindingsForUpdate(bindings map[string][]interface{}, values map[string]interface{}) []interface{}
- func (g *MySqlGrammar) Wrap(value string, prefixAlias bool) string
- func (g *MySqlGrammar) WrapTable(table string) string
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) WrapTable ¶
func (g *MySqlGrammar) WrapTable(table string) string
Click to show internal directories.
Click to hide internal directories.