Interface class describing the functions to be implemented by the
actual database classes.
Apart from the basic interface defined here, depending on the situation
a database can also implement functions for logging and statistics
(see SQLite_logging.py and SQLite_statistics.py for the interface).
-
abandon()
-
active_count()
-
add_card(card)
-
add_card_type(card_type)
-
add_fact(fact)
-
add_tag(tag)
-
backup()
-
card_count()
-
card_types_in_use()
-
cards_due_for_final_review(grade, sort_key='', limit=-1)
-
cards_due_for_ret_rep(now, sort_key='', limit=-1)
-
cards_from_fact(fact)
- Return a list of the cards deriving from a fact.
-
cards_learn_ahead(now, sort_key='', limit=-1)
-
cards_new_memorising(grade, sort_key='', limit=-1)
-
cards_unseen(sort_key='', limit=-1)
-
cards_with_scheduler_data(scheduler_data, sort_key='', limit=-1)
-
count_related_cards_with_next_rep(card, next_rep)
- Return how many related cards with grade >= 2 are scheduled at
‘next_rep’. Note that there is no need that next_rep == card.next_rep.
-
current_activity_criterion()
-
deactivate()
-
delete_card(card)
-
delete_card_type(card_type)
-
delete_fact_and_related_data(fact)
-
delete_tag(tag)
-
duplicates_for_fact(fact)
- Return facts with the same ‘unique_fields’ data as ‘fact’.
-
fact_count()
-
get_card(id, id_is_internal)
-
get_card_type(id, id_is_internal)
-
get_fact(id, id_is_internal)
-
get_or_create_tag_with_name(name)
-
get_tag(id, id_is_internal)
-
get_tag_names()
-
get_tags()
-
is_loaded()
-
load(path)
-
new(path)
-
non_memorised_count()
-
remove_tag_if_unused(tag)
-
save(path=None)
-
save_activity_criterion()
-
saved_activity_criteria()
-
scheduled_count(days=0)
-
scheduler_data_count(scheduler_data)
-
set_current_activity_criterion(criterion)
-
set_scheduler_data(scheduler_data)
-
unload()
-
update_card(card, repetition_only=False)
-
update_card_type(card_type)
-
update_fact(fact)
-
update_tag(tag)