Documentation ¶
Index ¶
- Variables
- func NewRelationalRead(dialect, uri string, logMode bool) relational.InterfaceRead
- func NewRelationalWrite(dialect, uri string, logMode bool) relational.InterfaceWrite
- type Relational
- func (r *Relational) CommitTransaction() *response.Response
- func (r *Relational) Connect(dialect, uri string, logMode bool) *response.Response
- func (r *Relational) Create(entity interface{}, tableName string) *response.Response
- func (r *Relational) CreateOrUpdate(entity interface{}, conditions map[string]interface{}, tableName string) *response.Response
- func (r *Relational) Delete(conditions map[string]interface{}, tableName string) *response.Response
- func (r *Relational) DeleteByQuery(query *gorm.DB, tableName string) *response.Response
- func (r *Relational) Find(entity interface{}, query *gorm.DB, tableName string) *response.Response
- func (r *Relational) First(out interface{}, tableName string, where ...interface{}) *response.Response
- func (r *Relational) GetConnection() *gorm.DB
- func (r *Relational) IsAvailable() bool
- func (r *Relational) RawSQL(sql string, entity interface{}) *response.Response
- func (r *Relational) RollbackTransaction() *response.Response
- func (r *Relational) SetFilter(filter map[string]interface{}) *gorm.DB
- func (r *Relational) SetLogMode(logMode bool)
- func (r *Relational) StartTransaction() relational.InterfaceWrite
- func (r *Relational) Update(entity interface{}, conditions map[string]interface{}, tableName string) *response.Response
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDialectNotFound = errors.New("error on create connection with database dialect not found")
)
Functions ¶
func NewRelationalRead ¶
func NewRelationalRead(dialect, uri string, logMode bool) relational.InterfaceRead
func NewRelationalWrite ¶
func NewRelationalWrite(dialect, uri string, logMode bool) relational.InterfaceWrite
Types ¶
type Relational ¶
type Relational struct {
// contains filtered or unexported fields
}
func (*Relational) CommitTransaction ¶
func (r *Relational) CommitTransaction() *response.Response
func (*Relational) Connect ¶
func (r *Relational) Connect(dialect, uri string, logMode bool) *response.Response
func (*Relational) Create ¶
func (r *Relational) Create(entity interface{}, tableName string) *response.Response
func (*Relational) CreateOrUpdate ¶
func (r *Relational) CreateOrUpdate( entity interface{}, conditions map[string]interface{}, tableName string) *response.Response
func (*Relational) Delete ¶
func (r *Relational) Delete(conditions map[string]interface{}, tableName string) *response.Response
func (*Relational) DeleteByQuery ¶
func (*Relational) First ¶
func (r *Relational) First(out interface{}, tableName string, where ...interface{}) *response.Response
func (*Relational) GetConnection ¶
func (r *Relational) GetConnection() *gorm.DB
func (*Relational) IsAvailable ¶
func (r *Relational) IsAvailable() bool
func (*Relational) RawSQL ¶
func (r *Relational) RawSQL(sql string, entity interface{}) *response.Response
func (*Relational) RollbackTransaction ¶
func (r *Relational) RollbackTransaction() *response.Response
func (*Relational) SetFilter ¶
func (r *Relational) SetFilter(filter map[string]interface{}) *gorm.DB
func (*Relational) SetLogMode ¶
func (r *Relational) SetLogMode(logMode bool)
func (*Relational) StartTransaction ¶
func (r *Relational) StartTransaction() relational.InterfaceWrite
Click to show internal directories.
Click to hide internal directories.