Documentation
¶
Index ¶
- Constants
- type InsertData
- type MysqlSqlGenerator
- func (sg MysqlSqlGenerator) GetInsertSql(data InsertData) (string, []interface{}, error)
- func (sg MysqlSqlGenerator) GetSelectSql(data SelectData) (string, []interface{}, error)
- func (sg MysqlSqlGenerator) GetUpdateSql(data UpdateData) (string, []interface{}, error)
- func (sg MysqlSqlGenerator) GetUpsertSql(data UpsertData) (string, []interface{}, error)
- type ReplaceData
- type SelectData
- type UpdateData
- type UpsertData
Constants ¶
View Source
const ( INCREMENT = "inc" DECREMENT = "dec" CONDITION = "cond" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertData ¶
func (*InsertData) Add ¶
func (d *InsertData) Add(values []string)
type MysqlSqlGenerator ¶
type MysqlSqlGenerator struct {
}
func (MysqlSqlGenerator) GetInsertSql ¶
func (sg MysqlSqlGenerator) GetInsertSql(data InsertData) (string, []interface{}, error)
GetInsertSql - bind params and values to sql query
func (MysqlSqlGenerator) GetSelectSql ¶
func (sg MysqlSqlGenerator) GetSelectSql(data SelectData) (string, []interface{}, error)
func (MysqlSqlGenerator) GetUpdateSql ¶
func (sg MysqlSqlGenerator) GetUpdateSql(data UpdateData) (string, []interface{}, error)
func (MysqlSqlGenerator) GetUpsertSql ¶
func (sg MysqlSqlGenerator) GetUpsertSql(data UpsertData) (string, []interface{}, error)
type ReplaceData ¶
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 []string)
Click to show internal directories.
Click to hide internal directories.