Documentation ¶
Index ¶
- func Fields(values interface{}) []string
- type Db
- func (db *Db) Close()
- func (db *Db) Connect() error
- func (db *Db) FetchLines(table string, selectFields []string, where string, valuesWhere []interface{}) (result *[]interface{}, er error)
- func (db *Db) Insert(table string, columns []string, columnsValue []interface{}) (int64, error)
- func (db *Db) Update(table string, id uint, columns map[string]string) (sql.Result, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Db ¶
type Db struct { //Conn deve substituir con em futura versão major Conn *sql.DB //conexão banco User, Password, Host, Port, Database string // contains filtered or unexported fields }
Db mantem conexao com banco MySQL Provê métodos para update/insert/select
func (*Db) FetchLines ¶
func (db *Db) FetchLines(table string, selectFields []string, where string, valuesWhere []interface{}) (result *[]interface{}, er error)
FetchLines retorna select de campos fornecidos em slice de strings
Click to show internal directories.
Click to hide internal directories.