Versions in this module Expand all Collapse all v1 v1.0.1 Apr 19, 2024 Changes in this version + type Association interface + Append func(values ...any) error + Clear func() error + Count func() int64 + Delete func(values ...any) error + Find func(out any, conds ...any) error + Replace func(values ...any) error + type ConnectionModel interface + Connection func() string + type Cursor interface + Scan func(value any) error + type DispatchesEvents interface + DispatchesEvents func() map[EventType]func(Event) error + type Driver string + const DriverMysql + const DriverPostgresql + const DriverSqlite + const DriverSqlserver + func (d Driver) String() string + type Event interface + Context func() context.Context + GetAttribute func(key string) any + GetOriginal func(key string, def ...any) any + IsClean func(columns ...string) bool + IsDirty func(columns ...string) bool + Query func() Query + SetAttribute func(key string, value any) + type EventType string + const EventCreated + const EventCreating + const EventDeleted + const EventDeleting + const EventForceDeleted + const EventForceDeleting + const EventRetrieved + const EventSaved + const EventSaving + const EventUpdated + const EventUpdating + type Factory interface + Count func(count int) Factory + Create func(value any, attributes ...map[string]any) error + CreateQuietly func(value any, attributes ...map[string]any) error + Make func(value any, attributes ...map[string]any) error + type Observer interface + Created func(Event) error + Creating func(Event) error + Deleted func(Event) error + Deleting func(Event) error + ForceDeleted func(Event) error + ForceDeleting func(Event) error + Retrieved func(Event) error + Saved func(Event) error + Saving func(Event) error + Updated func(Event) error + Updating func(Event) error + type Orm interface + Connection func(name string) Orm + DB func() (*sql.DB, error) + Factory func() Factory + Observe func(model any, observer Observer) + Query func() Query + Transaction func(txFunc func(tx Transaction) error) error + WithContext func(ctx context.Context) Orm + type Query interface + Association func(association string) Association + Begin func() (Transaction, error) + Count func(count *int64) error + Create func(value any) error + Cursor func() (chan Cursor, error) + Delete func(value any, conds ...any) (*Result, error) + Distinct func(args ...any) Query + Driver func() Driver + Exec func(sql string, values ...any) (*Result, error) + Find func(dest any, conds ...any) error + FindOrFail func(dest any, conds ...any) error + First func(dest any) error + FirstOr func(dest any, callback func() error) error + FirstOrCreate func(dest any, conds ...any) error + FirstOrFail func(dest any) error + FirstOrNew func(dest any, attributes any, values ...any) error + ForceDelete func(value any, conds ...any) (*Result, error) + Get func(dest any) error + Group func(name string) Query + Having func(query any, args ...any) Query + Join func(query string, args ...any) Query + Limit func(limit int) Query + Load func(dest any, relation string, args ...any) error + LoadMissing func(dest any, relation string, args ...any) error + LockForUpdate func() Query + Model func(value any) Query + Offset func(offset int) Query + Omit func(columns ...string) Query + OrWhere func(query any, args ...any) Query + Order func(value any) Query + Paginate func(page, limit int, dest any, total *int64) error + Pluck func(column string, dest any) error + Raw func(sql string, values ...any) Query + Save func(value any) error + SaveQuietly func(value any) error + Scan func(dest any) error + Scopes func(funcs ...func(Query) Query) Query + Select func(query any, args ...any) Query + SharedLock func() Query + Sum func(column string, dest any) error + Table func(name string, args ...any) Query + Update func(column any, value ...any) (*Result, error) + UpdateOrCreate func(dest any, attributes any, values any) error + Where func(query any, args ...any) Query + With func(query string, args ...any) Query + WithTrashed func() Query + WithoutEvents func() Query + type Result struct + RowsAffected int64 + type Transaction interface + Commit func() error + Rollback func() error