class

Laspatule::Repositories::DB::Recipes

Inherits Laspatule::Repositories::Recipes < Reference < Object

Constructors

new(db : ::DB::Database)
Source

Instance methods

create(recipe : Models::CreateRecipe, user_id : Int32) : Int32

Creates a new recipe and returns its id.

Source
get_all(page_size : Int32, next_page previous_page : String | Nil = nil) : Models::Page(Models::Recipe)

Gets all recipes ordered by name,

This is a paginated query, see Models::Page for the pagination instructions.

Source
get_by_id(id : Int32) : Models::Recipe

Gets a recipe by id.

Source

Nested types