class Post::Collection
- Post::Collection
- Clear::Model::CollectionBase(Post)
- Reference
- Object
Overview
Addition of the method for eager loading and N+1 avoidance.
Defined in:
models/post.crInstance Method Summary
- #search(str)
- #with_author(fetch_columns = false, &block : Author::Collection -> ) : self
- #with_author(fetch_columns = false) : self
-
#with_dependencies(&block : Post::Collection -> ) : self
Eager load the relation dependencies.
- #with_dependencies
-
#with_dependents(&block : Post::Collection -> ) : self
Eager load the relation dependents.
- #with_dependents
-
#with_relationships(fetch_columns = false, &block : Relationship::Collection -> ) : self
Eager load the has many relation relationships.
- #with_relationships(fetch_columns = false)
-
#with_tags(&block : Tag::Collection -> ) : self
Eager load the relation tags.
- #with_tags
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 has many relation relationships. Use it to avoid N+1 queries.
Eager load the relation tags. Use it to avoid N+1 queries.