Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo in comment #340

Merged
merged 2 commits into from
Aug 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions entity_repository_go1.18.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ type EntityRepository[T any] interface {
// Supported aggregate: count, sum, avg, max, min.
// Any select, group, offset, limit and sort query will be ignored automatically.
// If complex aggregation is needed, consider using All instead.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustAggregate(ctx context.Context, aggregate string, field string, queriers ...Querier) int

// Count entities that match the query.
Count(ctx context.Context, queriers ...Querier) (int, error)

// MustCount entities that match the query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustCount(ctx context.Context, queriers ...Querier) int

// Find a entity that match the query.
Expand All @@ -49,7 +49,7 @@ type EntityRepository[T any] interface {
FindAll(ctx context.Context, queriers ...Querier) ([]T, error)

// MustFindAll entities that match the query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustFindAll(ctx context.Context, queriers ...Querier) []T

// FindAndCountAll entities that match the query.
Expand All @@ -60,7 +60,7 @@ type EntityRepository[T any] interface {
// MustFindAndCountAll entities that match the query.
// This is a convenient method that combines FindAll and Count. It's useful when dealing with queries related to pagination.
// Limit and Offset property will be ignored when performing count query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustFindAndCountAll(ctx context.Context, queriers ...Querier) ([]T, int)

// Insert a entity to database.
Expand Down Expand Up @@ -91,7 +91,7 @@ type EntityRepository[T any] interface {
Delete(ctx context.Context, entity *T, mutators ...Mutator) error

// MustDelete a entity.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustDelete(ctx context.Context, entity *T, mutators ...Mutator)

// DeleteAll entities.
Expand Down
14 changes: 7 additions & 7 deletions repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ type Repository interface {
// Supported aggregate: count, sum, avg, max, min.
// Any select, group, offset, limit and sort query will be ignored automatically.
// If complex aggregation is needed, consider using All instead.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustAggregate(ctx context.Context, query Query, aggregate string, field string) int

// Count entities that match the query.
Count(ctx context.Context, collection string, queriers ...Querier) (int, error)

// MustCount entities that match the query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustCount(ctx context.Context, collection string, queriers ...Querier) int

// Find a entity that match the query.
Expand All @@ -56,7 +56,7 @@ type Repository interface {
FindAll(ctx context.Context, entities any, queriers ...Querier) error

// MustFindAll entities that match the query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustFindAll(ctx context.Context, entities any, queriers ...Querier)

// FindAndCountAll entities that match the query.
Expand All @@ -67,7 +67,7 @@ type Repository interface {
// MustFindAndCountAll entities that match the query.
// This is a convenient method that combines FindAll and Count. It's useful when dealing with queries related to pagination.
// Limit and Offset property will be ignored when performing count query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustFindAndCountAll(ctx context.Context, entities any, queriers ...Querier) int

// Insert a entity to database.
Expand Down Expand Up @@ -107,7 +107,7 @@ type Repository interface {
Delete(ctx context.Context, entity any, mutators ...Mutator) error

// MustDelete a entity.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
MustDelete(ctx context.Context, entity any, mutators ...Mutator)

// DeleteAll entities.
Expand All @@ -124,7 +124,7 @@ type Repository interface {
DeleteAny(ctx context.Context, query Query) (int, error)

// MustDeleteAny entities that match the query.
// It'll panic if any error eccured.
// It'll panic if any error occurred.
// Returns number of updated entities.
MustDeleteAny(ctx context.Context, query Query) int

Expand All @@ -135,7 +135,7 @@ type Repository interface {
Preload(ctx context.Context, entities any, field string, queriers ...Querier) error

// MustPreload association with given query.
// This function can accepts either a struct or a slice of structs.
// This function can accept either a struct or a slice of structs.
// It'll panic if any error occurred.
MustPreload(ctx context.Context, entities any, field string, queriers ...Querier)

Expand Down
Loading