mysql

package
v0.0.0-...-bf8f870 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenMySQL

func OpenMySQL(config string) (driver.Database, error)

Types

type MySQLDB

type MySQLDB struct {
	Processor *utils.Processor
	// contains filtered or unexported fields
}

func (MySQLDB) Delete

func (db MySQLDB) Delete(dataType interface{}) clauses.DeleteClause

func (MySQLDB) Insert

func (db MySQLDB) Insert(dataType interface{}) clauses.InsertClause

func (MySQLDB) Select

func (db MySQLDB) Select(dataType interface{}) clauses.SelectClause

func (MySQLDB) Update

func (db MySQLDB) Update(dataType interface{}) clauses.UpdateClause

type MySQLDeleteClause

type MySQLDeleteClause struct {
	Processor *utils.Processor
	// contains filtered or unexported fields
}

func (*MySQLDeleteClause) Exec

func (sc *MySQLDeleteClause) Exec() (sql.Result, error)

func (*MySQLDeleteClause) GetSQLQuery

func (sc *MySQLDeleteClause) GetSQLQuery() string

DELETE FROM db.users WHERE cognito_id = "BBBBBB" ORDER BY name ASC LIMIT 2

func (*MySQLDeleteClause) Limit

func (sc *MySQLDeleteClause) Limit(number int) clauses.DeleteClause

func (*MySQLDeleteClause) OrderBy

func (sc *MySQLDeleteClause) OrderBy(orderBy []string) clauses.DeleteClause

TODO: string to struct type

func (*MySQLDeleteClause) Where

func (sc *MySQLDeleteClause) Where(condition interface{}) clauses.DeleteClause

func (*MySQLDeleteClause) WhereNot

func (sc *MySQLDeleteClause) WhereNot(condition interface{}) clauses.DeleteClause

func (*MySQLDeleteClause) WhereOr

func (sc *MySQLDeleteClause) WhereOr(condition interface{}) clauses.DeleteClause

type MySQLInsertClause

type MySQLInsertClause struct {
	Processor *utils.Processor
	// contains filtered or unexported fields
}

func (*MySQLInsertClause) Exec

func (sc *MySQLInsertClause) Exec() (sql.Result, error)

func (*MySQLInsertClause) GetSQLQuery

func (sc *MySQLInsertClause) GetSQLQuery() string

func (*MySQLInsertClause) SetData

func (sc *MySQLInsertClause) SetData(data interface{}) clauses.InsertClause

type MySQLSelectClause

type MySQLSelectClause struct {
	Processor *utils.Processor
	// contains filtered or unexported fields
}

func (*MySQLSelectClause) All

func (sc *MySQLSelectClause) All(target interface{}) error

func (*MySQLSelectClause) First

func (sc *MySQLSelectClause) First(target interface{}) error

func (*MySQLSelectClause) GetSQLQuery

func (sc *MySQLSelectClause) GetSQLQuery() string

func (*MySQLSelectClause) Last

func (sc *MySQLSelectClause) Last(target interface{}) error

func (*MySQLSelectClause) Limit

func (sc *MySQLSelectClause) Limit(number int) clauses.SelectClause

func (*MySQLSelectClause) OrderBy

func (sc *MySQLSelectClause) OrderBy(orderBy []string) clauses.SelectClause

TODO: string to struct type

func (*MySQLSelectClause) Where

func (sc *MySQLSelectClause) Where(condition interface{}) clauses.SelectClause

func (*MySQLSelectClause) WhereNot

func (sc *MySQLSelectClause) WhereNot(condition interface{}) clauses.SelectClause

func (*MySQLSelectClause) WhereOr

func (sc *MySQLSelectClause) WhereOr(condition interface{}) clauses.SelectClause

type MySQLUpdateClause

type MySQLUpdateClause struct {
	Processor *utils.Processor
	// contains filtered or unexported fields
}

func (*MySQLUpdateClause) Exec

func (sc *MySQLUpdateClause) Exec() (sql.Result, error)

func (*MySQLUpdateClause) GetSQLQuery

func (sc *MySQLUpdateClause) GetSQLQuery() string

func (*MySQLUpdateClause) Limit

func (sc *MySQLUpdateClause) Limit(number int) clauses.UpdateClause

func (*MySQLUpdateClause) OrderBy

func (sc *MySQLUpdateClause) OrderBy(orderBy []string) clauses.UpdateClause

TODO: string to struct type

func (*MySQLUpdateClause) SetData

func (sc *MySQLUpdateClause) SetData(data interface{}) clauses.UpdateClause

func (*MySQLUpdateClause) Where

func (sc *MySQLUpdateClause) Where(condition interface{}) clauses.UpdateClause

func (*MySQLUpdateClause) WhereNot

func (sc *MySQLUpdateClause) WhereNot(condition interface{}) clauses.UpdateClause

func (*MySQLUpdateClause) WhereOr

func (sc *MySQLUpdateClause) WhereOr(condition interface{}) clauses.UpdateClause

type WhereCondition

type WhereCondition struct {
	// contains filtered or unexported fields
}

func (*WhereCondition) SetAND

func (c *WhereCondition) SetAND(conditions interface{})

func (*WhereCondition) SetNOT

func (c *WhereCondition) SetNOT(conditions interface{})

func (*WhereCondition) SetOR

func (c *WhereCondition) SetOR(conditions interface{})

Jump to

Keyboard shortcuts

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