Documentation ¶
Index ¶
- func NewRelationalRead() relational.InterfaceRead
- func NewRelationalWrite() relational.InterfaceWrite
- type Relational
- func (r *Relational) CommitTransaction() *response.Response
- func (r *Relational) Connect() *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{}, 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) Related(model, related interface{}, filter map[string]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 ¶
This section is empty.
Functions ¶
func NewRelationalRead ¶
func NewRelationalRead() relational.InterfaceRead
func NewRelationalWrite ¶
func NewRelationalWrite() 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() *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{}, 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) Related ¶
func (r *Relational) Related( model, related interface{}, filter map[string]interface{}, foreignKeys ...string) *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.