class Repository::Collection
- Repository::Collection
- Clear::Model::CollectionBase(Repository)
- Reference
- Object
Overview
Addition of the method for eager loading and N+1 avoidance.
Defined in:
models/repository.cr:2models/repository.cr:45
models/repository.cr:47
models/repository.cr:64
Instance Method Summary
- #published
- #search(str)
- #with_counts
-
#with_dependencies(&block : Repository::Collection -> ) : self
Eager load the relation dependencies.
- #with_dependencies
-
#with_dependents(&block : Repository::Collection -> ) : self
Eager load the relation dependents.
- #with_dependents
-
#with_forks(&block : Repository::Collection -> ) : self
Eager load the relation forks.
- #with_forks
-
#with_languages(&block : Language::Collection -> ) : self
Eager load the relation languages.
- #with_languages
-
#with_relationships(fetch_columns = false, &block : Relationship::Collection -> ) : self
Eager load the has many relation relationships.
- #with_relationships(fetch_columns = false)
-
#with_releases(fetch_columns = false, &block : Release::Collection -> ) : self
Eager load the has many relation releases.
- #with_releases(fetch_columns = false)
-
#with_repository_forks(fetch_columns = false, &block : RepositoryFork::Collection -> ) : self
Eager load the has many relation repository_forks.
- #with_repository_forks(fetch_columns = false)
-
#with_repository_languages(fetch_columns = false, &block : RepositoryLanguage::Collection -> ) : self
Eager load the has many relation repository_languages.
- #with_repository_languages(fetch_columns = false)
-
#with_tags(&block : Tag::Collection -> ) : self
Eager load the relation tags.
- #with_tags
- #with_user(fetch_columns = false, &block : User::Collection -> ) : self
- #with_user(fetch_columns = false) : self
- #without_releases
Instance Method Detail
Eager load the relation dependencies. Use it to avoid N+1 queries.
Eager load the relation dependents. Use it to avoid N+1 queries.
Eager load the relation forks. Use it to avoid N+1 queries.
Eager load the relation languages. Use it to avoid N+1 queries.
Eager load the has many relation relationships. Use it to avoid N+1 queries.
Eager load the has many relation releases. Use it to avoid N+1 queries.
Eager load the has many relation repository_forks. Use it to avoid N+1 queries.
Eager load the has many relation repository_languages. Use it to avoid N+1 queries.
Eager load the relation tags. Use it to avoid N+1 queries.