View Source Memorex.Cards (Memorex v0.2.4)
Functions for interacting with Memorex.Domain.Card
s.
Link to this section Summary
Functions
Converts a Memorex.Domain.Card
from a :new
card to a :learn
card (and in the process creates a
Memorex.Domain.CardLog
entry).
Updates a card, and in the process sets the :due
field, and also increments the rep count
Link to this section Functions
@spec cards_for_deck(Memorex.Ecto.Schema.id(), Keyword.t()) :: Ecto.Query.t()
@spec convert_new_card_to_learn_card( Memorex.Domain.Card.t(), Memorex.Scheduler.Config.t(), DateTime.t() ) :: Memorex.Domain.Card.t()
Converts a Memorex.Domain.Card
from a :new
card to a :learn
card (and in the process creates a
Memorex.Domain.CardLog
entry).
@spec count(Memorex.Ecto.Schema.id()) :: non_neg_integer()
@spec count(Memorex.Ecto.Schema.id(), Keyword.t()) :: non_neg_integer()
@spec create_from_note(Memorex.Domain.Note.t()) :: Ecto.Schema.t()
@spec due_count(Memorex.Ecto.Schema.id(), DateTime.t()) :: non_neg_integer()
@spec get_card!(Memorex.Ecto.Schema.id()) :: Memorex.Domain.Card.t()
@spec get_interval_choices( Memorex.Domain.Card.t(), Memorex.Scheduler.Config.t(), DateTime.t() ) :: [ {Memorex.Domain.Card.answer_choice(), Timex.Duration.t()} ]
@spec get_one_random_due_card(Memorex.Ecto.Schema.id(), DateTime.t()) :: Memorex.Domain.Card.t() | nil
Link to this function
set_new_cards_in_deck_to_learn_cards(deck_id, config, time_now, opts \\ [])
View Source@spec set_new_cards_in_deck_to_learn_cards( Memorex.Ecto.Schema.id(), Memorex.Scheduler.Config.t(), DateTime.t(), Keyword.t() ) :: :ok
@spec update(Memorex.Domain.Card.t(), map()) :: {:ok, Memorex.Domain.Card.t()} | {:error, Ecto.Changeset.t()}
@spec update_card_when_reviewing!(Memorex.Domain.Card.t(), map(), DateTime.t()) :: Memorex.Domain.Card.t()
Updates a card, and in the process sets the :due
field, and also increments the rep count
@spec where_due(Ecto.Query.t(), DateTime.t()) :: Ecto.Query.t()