FR: Access to DB from v3 scheduler custom JS

Will it be possible to access the DB to perform queries from the JS? This will be useful for custom scheduling algorithms that take into account a card’s review history, current deck settings, etc.

I posted a proposal for a new default Anki algorithm (also cross-posted on Reddit where it generated a lot of upvotes) a while ago. If the v3 JS code can access the DB and deck settings, then there’s no need to bake this into Anki at all.

I’m a developer myself and would be happy to contribute to adding this feature to the v3 scheduler. Please let me know.

Thank you: )

Direct DB access is unlikely, but access to the review history may come in a future update.

1 Like

That’s great to hear! Being able to access a card’s:

  • Historical ease, i.e. select ease from revlog where cid = ?
  • Historical ease factors, i.e. "select factor from revlog where cid = ? and factor > 0
  • Card’s deck settings or at least the default starting ease of a card), i.e. mw.col.decks.confForDid( deck_id)['new']['initialFactor']

would be critical for me to reimplement my proposed algorithm with the new scheduler.

Again, happy to contribute to the work, please keep me posted if you need any help :smiley: