Documentation ¶
Index ¶
- type Database
- func (d *Database) CommitTransaction() (err error)
- func (d *Database) Create(obj interface{}) (err error)
- func (d *Database) Delete(obj interface{}) (affected int, err error)
- func (d *Database) ExecSQL(query string, args ...interface{}) (result *gorm.DB, err error)
- func (d *Database) Find(dest interface{}, conditions ...interface{}) (err error)
- func (d *Database) FindById(id string, obj interface{}) (err error)
- func (d *Database) GormInstance() *gorm.DB
- func (d *Database) Migrate(dst ...interface{}) (err error)
- func (d *Database) RollbackTransaction() (err error)
- func (d *Database) Select(dest interface{}, query string, args ...interface{}) (err error)
- func (d *Database) StartTransaction() (err error)
- func (d *Database) Update(obj interface{}) (affected int, err error)
- type ViolationUniqKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func NewConnection ¶
NewConnection return a new database connection
func (*Database) CommitTransaction ¶
func (*Database) ExecSQL ¶
ExecSQL funcao para executar insert, update, delete e atualizar schema do banco, essa funcao NÃO FAZ QUERY
func (*Database) GormInstance ¶
func (*Database) RollbackTransaction ¶
func (*Database) Select ¶
Select funcao para executar uma consulta(query), o parametro `dest` é usado para gravar o resultado da query
func (*Database) StartTransaction ¶
StartTransaction start a database transaction
type ViolationUniqKey ¶
type ViolationUniqKey struct { Field string Value string // contains filtered or unexported fields }
func (ViolationUniqKey) Error ¶
func (v ViolationUniqKey) Error() string
Click to show internal directories.
Click to hide internal directories.