factory

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FactoryImpl

type FactoryImpl struct {
	// contains filtered or unexported fields
}

func NewFactoryImpl

func NewFactoryImpl(query ormcontract.Query) *FactoryImpl

func (*FactoryImpl) Count

func (f *FactoryImpl) Count(count int) ormcontract.Factory

Count Specify the number of models you wish to create / make.

func (*FactoryImpl) Create

func (f *FactoryImpl) Create(value any, attributes ...map[string]any) error

Create a model and persist it in the database.

func (*FactoryImpl) CreateQuietly

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.

func (*FactoryImpl) Make

func (f *FactoryImpl) Make(value any, attributes ...map[string]any) error

Make a model instance that's not persisted in the database.

Jump to

Keyboard shortcuts

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