Documentation ¶
Index ¶
- Constants
- type Model
- type Orm
- func (r *Orm) Connection(name string) contractsorm.Orm
- func (r *Orm) DB() (*sql.DB, error)
- func (r *Orm) DatabaseName() string
- func (r *Orm) Factory() contractsorm.Factory
- func (r *Orm) Name() string
- func (r *Orm) Observe(model any, observer contractsorm.Observer)
- func (r *Orm) Query() contractsorm.Query
- func (r *Orm) Refresh()
- func (r *Orm) SetQuery(query contractsorm.Query)
- func (r *Orm) Transaction(txFunc func(tx contractsorm.Query) error) error
- func (r *Orm) WithContext(ctx context.Context) contractsorm.Orm
- type SoftDeletes
- type Timestamps
Constants ¶
View Source
const Associations = clause.Associations
View Source
const BindingOrm = "goravel.orm"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct { ID uint `gorm:"primaryKey" json:"id"` Timestamps }
type Orm ¶ added in v1.15.0
type Orm struct {
// contains filtered or unexported fields
}
func NewOrm ¶ added in v1.15.0
func NewOrm( ctx context.Context, config config.Config, connection string, query contractsorm.Query, queries map[string]contractsorm.Query, log log.Log, modelToObserver []contractsorm.ModelToObserver, refresh func(key any), ) *Orm
func (*Orm) Connection ¶ added in v1.15.0
func (r *Orm) Connection(name string) contractsorm.Orm
func (*Orm) DatabaseName ¶ added in v1.15.0
func (*Orm) Factory ¶ added in v1.15.0
func (r *Orm) Factory() contractsorm.Factory
func (*Orm) Observe ¶ added in v1.15.0
func (r *Orm) Observe(model any, observer contractsorm.Observer)
func (*Orm) Query ¶ added in v1.15.0
func (r *Orm) Query() contractsorm.Query
func (*Orm) SetQuery ¶ added in v1.15.0
func (r *Orm) SetQuery(query contractsorm.Query)
func (*Orm) Transaction ¶ added in v1.15.0
func (r *Orm) Transaction(txFunc func(tx contractsorm.Query) error) error
func (*Orm) WithContext ¶ added in v1.15.0
func (r *Orm) WithContext(ctx context.Context) contractsorm.Orm
type SoftDeletes ¶
Click to show internal directories.
Click to hide internal directories.