class

Ralph::EagerLoading::EagerLoader

Inherits Reference / Object

EagerLoader - handles the LEFT JOIN strategy

Fetches all data in a single query using LEFT JOINs. Better for small result sets but requires row deduplication.

Example:

authors = Author.eager_load(:posts).to_a

Class methods

build_query(model_class : String, table_name : String, includes : IncludeSpec) : Query::Builder

Build a query with LEFT JOINs for the specified associations

Source