Documentation
¶
Index ¶
- type Factory
- func (f *Factory) BuildBatchInsert(table string, values []map[string]interface{}) (string, []interface{})
- func (f *Factory) BuildCreateTable(table string, modelType reflect.Type) string
- func (f *Factory) BuildDelete(table string, conditions []*define.Condition) (string, []interface{})
- func (f *Factory) BuildInsert(table string, fields map[string]interface{}) (string, []interface{})
- func (f *Factory) BuildSelect(table string, fields []string, conditions []*define.Condition, orderBy string, ...) (string, []interface{})
- func (f *Factory) BuildUpdate(table string, fields map[string]interface{}, conditions []*define.Condition) (string, []interface{})
- func (f *Factory) Connect(dsn string) (*sql.DB, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct{}
Factory implements the SQLFactory interface for MySQL
func (*Factory) BuildBatchInsert ¶
func (f *Factory) BuildBatchInsert(table string, values []map[string]interface{}) (string, []interface{})
BuildBatchInsert builds a batch INSERT query for MySQL
func (*Factory) BuildCreateTable ¶
BuildCreateTable builds a CREATE TABLE query for MySQL
func (*Factory) BuildDelete ¶
BuildDelete builds a DELETE query for MySQL
func (*Factory) BuildInsert ¶
BuildInsert builds an INSERT query for MySQL
func (*Factory) BuildSelect ¶
func (f *Factory) BuildSelect(table string, fields []string, conditions []*define.Condition, orderBy string, limit, offset int) (string, []interface{})
BuildSelect builds a SELECT query for MySQL
Click to show internal directories.
Click to hide internal directories.