Documentation ¶
Index ¶
- type CRUD
- func (_m *CRUD[T]) Count(ctx context.Context, filter ffapi.Filter) (int64, error)
- func (_m *CRUD[T]) Delete(ctx context.Context, id string, hooks ...dbsql.PostCompletionHook) error
- func (_m *CRUD[T]) DeleteMany(ctx context.Context, filter ffapi.Filter, hooks ...dbsql.PostCompletionHook) error
- func (_m *CRUD[T]) GetByID(ctx context.Context, id string, getOpts ...dbsql.GetOption) (T, error)
- func (_m *CRUD[T]) GetByName(ctx context.Context, name string, getOpts ...dbsql.GetOption) (T, error)
- func (_m *CRUD[T]) GetByUUIDOrName(ctx context.Context, uuidOrName string, getOpts ...dbsql.GetOption) (T, error)
- func (_m *CRUD[T]) GetFirst(ctx context.Context, filter ffapi.Filter, getOpts ...dbsql.GetOption) (T, error)
- func (_m *CRUD[T]) GetMany(ctx context.Context, filter ffapi.Filter) ([]T, *ffapi.FilterResult, error)
- func (_m *CRUD[T]) GetQueryFactory() ffapi.QueryFactory
- func (_m *CRUD[T]) GetSequenceForID(ctx context.Context, id string) (int64, error)
- func (_m *CRUD[T]) Insert(ctx context.Context, inst T, hooks ...dbsql.PostCompletionHook) error
- func (_m *CRUD[T]) InsertMany(ctx context.Context, instances []T, allowPartialSuccess bool, ...) error
- func (_m *CRUD[T]) ModifyQuery(modifier func(squirrel.SelectBuilder) (squirrel.SelectBuilder, error)) dbsql.CRUDQuery[T]
- func (_m *CRUD[T]) NewFilterBuilder(ctx context.Context) ffapi.FilterBuilder
- func (_m *CRUD[T]) NewUpdateBuilder(ctx context.Context) ffapi.UpdateBuilder
- func (_m *CRUD[T]) Replace(ctx context.Context, inst T, hooks ...dbsql.PostCompletionHook) error
- func (_m *CRUD[T]) Scoped(scope squirrel.Eq) dbsql.CRUD[T]
- func (_m *CRUD[T]) TableAlias() string
- func (_m *CRUD[T]) Update(ctx context.Context, id string, update ffapi.Update, ...) error
- func (_m *CRUD[T]) UpdateMany(ctx context.Context, filter ffapi.Filter, update ffapi.Update, ...) error
- func (_m *CRUD[T]) UpdateSparse(ctx context.Context, sparseUpdate T, hooks ...dbsql.PostCompletionHook) error
- func (_m *CRUD[T]) Upsert(ctx context.Context, inst T, optimization dbsql.UpsertOptimization, ...) (bool, error)
- func (_m *CRUD[T]) Validate()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRUD ¶
CRUD is an autogenerated mock type for the CRUD type
func NewCRUD ¶
NewCRUD creates a new instance of CRUD. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*CRUD[T]) DeleteMany ¶
func (_m *CRUD[T]) DeleteMany(ctx context.Context, filter ffapi.Filter, hooks ...dbsql.PostCompletionHook) error
DeleteMany provides a mock function with given fields: ctx, filter, hooks
func (*CRUD[T]) GetByName ¶
func (_m *CRUD[T]) GetByName(ctx context.Context, name string, getOpts ...dbsql.GetOption) (T, error)
GetByName provides a mock function with given fields: ctx, name, getOpts
func (*CRUD[T]) GetByUUIDOrName ¶
func (_m *CRUD[T]) GetByUUIDOrName(ctx context.Context, uuidOrName string, getOpts ...dbsql.GetOption) (T, error)
GetByUUIDOrName provides a mock function with given fields: ctx, uuidOrName, getOpts
func (*CRUD[T]) GetFirst ¶
func (_m *CRUD[T]) GetFirst(ctx context.Context, filter ffapi.Filter, getOpts ...dbsql.GetOption) (T, error)
GetFirst provides a mock function with given fields: ctx, filter, getOpts
func (*CRUD[T]) GetMany ¶
func (_m *CRUD[T]) GetMany(ctx context.Context, filter ffapi.Filter) ([]T, *ffapi.FilterResult, error)
GetMany provides a mock function with given fields: ctx, filter
func (*CRUD[T]) GetQueryFactory ¶ added in v1.4.1
func (_m *CRUD[T]) GetQueryFactory() ffapi.QueryFactory
GetQueryFactory provides a mock function with given fields:
func (*CRUD[T]) GetSequenceForID ¶
GetSequenceForID provides a mock function with given fields: ctx, id
func (*CRUD[T]) InsertMany ¶
func (_m *CRUD[T]) InsertMany(ctx context.Context, instances []T, allowPartialSuccess bool, hooks ...dbsql.PostCompletionHook) error
InsertMany provides a mock function with given fields: ctx, instances, allowPartialSuccess, hooks
func (*CRUD[T]) ModifyQuery ¶
func (_m *CRUD[T]) ModifyQuery(modifier func(squirrel.SelectBuilder) (squirrel.SelectBuilder, error)) dbsql.CRUDQuery[T]
ModifyQuery provides a mock function with given fields: modifier
func (*CRUD[T]) NewFilterBuilder ¶
func (_m *CRUD[T]) NewFilterBuilder(ctx context.Context) ffapi.FilterBuilder
NewFilterBuilder provides a mock function with given fields: ctx
func (*CRUD[T]) NewUpdateBuilder ¶
func (_m *CRUD[T]) NewUpdateBuilder(ctx context.Context) ffapi.UpdateBuilder
NewUpdateBuilder provides a mock function with given fields: ctx
func (*CRUD[T]) TableAlias ¶ added in v1.4.6
TableAlias provides a mock function with given fields:
func (*CRUD[T]) Update ¶
func (_m *CRUD[T]) Update(ctx context.Context, id string, update ffapi.Update, hooks ...dbsql.PostCompletionHook) error
Update provides a mock function with given fields: ctx, id, update, hooks
func (*CRUD[T]) UpdateMany ¶
func (_m *CRUD[T]) UpdateMany(ctx context.Context, filter ffapi.Filter, update ffapi.Update, hooks ...dbsql.PostCompletionHook) error
UpdateMany provides a mock function with given fields: ctx, filter, update, hooks
func (*CRUD[T]) UpdateSparse ¶
func (_m *CRUD[T]) UpdateSparse(ctx context.Context, sparseUpdate T, hooks ...dbsql.PostCompletionHook) error
UpdateSparse provides a mock function with given fields: ctx, sparseUpdate, hooks