database

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 (r *Relational) DeleteByQuery(query *gorm.DB, tableName string) *response.Response

func (*Relational) Find

func (r *Relational) Find(entity interface{}, query *gorm.DB, tableName string) *response.Response

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

func (*Relational) Update

func (r *Relational) Update(
	entity interface{}, conditions map[string]interface{}, tableName string) *response.Response

Jump to

Keyboard shortcuts

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