Documentation ¶
Index ¶
Constants ¶
View Source
const ( INCREMENT = "inc" DECREMENT = "dec" CONDITION = "cond" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertData ¶
type InsertData struct { TableName string IsIgnore bool Fields []string ValuesList rows // contains filtered or unexported fields }
InsertData - data for perform insert operation
func (*InsertData) GetPrimaryKeyName ¶
func (d *InsertData) GetPrimaryKeyName() string
GetPrimaryKeyName - get primary key field name
func (*InsertData) IsOptimize ¶
func (d *InsertData) IsOptimize() bool
IsOptimize - return optimize state
func (*InsertData) Reset ¶ added in v1.0.0
func (d *InsertData) Reset()
func (*InsertData) SetOptimize ¶
func (d *InsertData) SetOptimize(o bool)
SetOptimize - set support for sql optimize
func (*InsertData) SetPrimaryKeyName ¶
func (d *InsertData) SetPrimaryKeyName(name string)
SetPrimaryKeyName - set primary key field name
type ReplaceData ¶
type SQLGenerator ¶
type SQLGenerator interface { GetInsertSQL(InsertData) (string, []interface{}, error) GetUpdateSQL(UpdateData) (string, []interface{}, error) GetUpsertSQL(UpsertData) (string, []interface{}, error) GetSelectSQL(SelectData) (string, []interface{}, error) }
SQLGenerator - generate queries operations for defined driver
func NewSQLGenerator ¶
func NewSQLGenerator(driver string) SQLGenerator
NewSQLGenerator - return sqlGenarator interface for provided driver
type SelectData ¶
type UpdateData ¶
type UpdateData struct { TableName string List []updateDataList }
type UpsertData ¶
type UpsertData struct { TableName string Fields []string ValuesList []rowValues ReplaceDataList []ReplaceData }
func (*UpsertData) Add ¶
func (d *UpsertData) Add(values []interface{})
func (*UpsertData) Reset ¶ added in v1.0.0
func (d *UpsertData) Reset()
Click to show internal directories.
Click to hide internal directories.