mysql

package
v4.0.1-ai Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

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

func (f *Factory) BuildCreateTable(table string, modelType reflect.Type) string

BuildCreateTable builds a CREATE TABLE query for MySQL

func (*Factory) BuildDelete

func (f *Factory) BuildDelete(table string, conditions []*define.Condition) (string, []interface{})

BuildDelete builds a DELETE query for MySQL

func (*Factory) BuildInsert

func (f *Factory) BuildInsert(table string, fields map[string]interface{}) (string, []interface{})

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

func (*Factory) BuildUpdate

func (f *Factory) BuildUpdate(table string, fields map[string]interface{}, conditions []*define.Condition) (string, []interface{})

BuildUpdate builds an UPDATE query for MySQL

func (*Factory) Connect

func (f *Factory) Connect(dsn string) (*sql.DB, error)

Jump to

Keyboard shortcuts

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