class Repository::Collection

Overview

Addition of the method for eager loading and N+1 avoidance.

Defined in:

models/repository.cr:2
models/repository.cr:34
models/repository.cr:36
models/repository.cr:53

Instance Method Summary

Instance Method Detail

def published #

[View source]
def search(str) #

def with_dependencies(&block : Repository::Collection -> ) : self #

Eager load the relation dependencies. Use it to avoid N+1 queries.


def with_dependencies #

def with_dependents(&block : Repository::Collection -> ) : self #

Eager load the relation dependents. Use it to avoid N+1 queries.


def with_dependents #

def with_dependents_count #

[View source]
def with_relationships(fetch_columns = false, &block : Relationship::Collection -> ) : self #

Eager load the has many relation relationships. Use it to avoid N+1 queries.


def with_relationships(fetch_columns = false) #

def with_releases(fetch_columns = false, &block : Release::Collection -> ) : self #

Eager load the has many relation releases. Use it to avoid N+1 queries.


def with_releases(fetch_columns = false) #

def with_tags(&block : Tag::Collection -> ) : self #

Eager load the relation tags. Use it to avoid N+1 queries.


def with_tags #

def with_user(fetch_columns = false, &block : User::Collection -> ) : self #

def with_user(fetch_columns = false) : self #

def without_releases #

[View source]