Documentation ¶
Index ¶
- Constants
- type FactoryImpl
- type InitializeImpl
- type OrmImpl
- func (r *OrmImpl) Connection(name string) ormcontract.Orm
- func (r *OrmImpl) DB() (*sql.DB, error)
- func (r *OrmImpl) Factory() ormcontract.Factory
- func (r *OrmImpl) Observe(model any, observer ormcontract.Observer)
- func (r *OrmImpl) Query() ormcontract.Query
- func (r *OrmImpl) Transaction(txFunc func(tx ormcontract.Transaction) error) error
- func (r *OrmImpl) WithContext(ctx context.Context) ormcontract.Orm
- type SeederFacade
- type ServiceProvider
Constants ¶
View Source
const BindingOrm = "goravel.orm"
View Source
const BindingSeeder = "goravel.seeder"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FactoryImpl ¶ added in v1.13.0
type FactoryImpl struct {
// contains filtered or unexported fields
}
func NewFactoryImpl ¶ added in v1.13.0
func NewFactoryImpl(query ormcontract.Query) *FactoryImpl
func (*FactoryImpl) Count ¶ added in v1.13.0
func (f *FactoryImpl) Count(count int) ormcontract.Factory
Count Specify the number of models you wish to create / make.
func (*FactoryImpl) Create ¶ added in v1.13.0
func (f *FactoryImpl) Create(value any, attributes ...map[string]any) error
Create a model and persist it in the database.
func (*FactoryImpl) CreateQuietly ¶ added in v1.13.0
func (f *FactoryImpl) CreateQuietly(value any, attributes ...map[string]any) error
CreateQuietly create a model and persist it in the database without firing any events.
type InitializeImpl ¶ added in v1.14.0
type InitializeImpl struct{}
func NewInitializeImpl ¶ added in v1.14.0
func NewInitializeImpl() *InitializeImpl
func (*InitializeImpl) InitializeGorm ¶ added in v1.14.0
func (receive *InitializeImpl) InitializeGorm(config config.Config, connection string) contractsgorm.Gorm
type OrmImpl ¶ added in v1.12.0
type OrmImpl struct {
// contains filtered or unexported fields
}
func InitializeOrm ¶ added in v1.12.0
func NewOrmImpl ¶ added in v1.12.0
func (*OrmImpl) Connection ¶ added in v1.12.0
func (r *OrmImpl) Connection(name string) ormcontract.Orm
func (*OrmImpl) Factory ¶ added in v1.13.0
func (r *OrmImpl) Factory() ormcontract.Factory
func (*OrmImpl) Observe ¶ added in v1.12.0
func (r *OrmImpl) Observe(model any, observer ormcontract.Observer)
func (*OrmImpl) Query ¶ added in v1.12.0
func (r *OrmImpl) Query() ormcontract.Query
func (*OrmImpl) Transaction ¶ added in v1.12.0
func (r *OrmImpl) Transaction(txFunc func(tx ormcontract.Transaction) error) error
func (*OrmImpl) WithContext ¶ added in v1.12.0
func (r *OrmImpl) WithContext(ctx context.Context) ormcontract.Orm
type SeederFacade ¶ added in v1.12.6
func NewSeederFacade ¶ added in v1.12.6
func NewSeederFacade() *SeederFacade
func (*SeederFacade) Call ¶ added in v1.12.6
func (s *SeederFacade) Call(seeders []seeder.Seeder) error
Call executes the specified seeder(s).
func (*SeederFacade) CallOnce ¶ added in v1.12.6
func (s *SeederFacade) CallOnce(seeders []seeder.Seeder) error
CallOnce executes the specified seeder(s) only if they haven't been executed before.
func (*SeederFacade) GetSeeder ¶ added in v1.12.6
func (s *SeederFacade) GetSeeder(name string) seeder.Seeder
func (*SeederFacade) GetSeeders ¶ added in v1.12.6
func (s *SeederFacade) GetSeeders() []seeder.Seeder
func (*SeederFacade) Register ¶ added in v1.12.6
func (s *SeederFacade) Register(seeders []seeder.Seeder)
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register(app foundation.Application)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.