database

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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