0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 20:03:05 +02:00

add: tmplUseCount to match Java interface

This commit is contained in:
David Allison 2021-08-31 14:48:27 +01:00 committed by Mike Hardy
parent 5fad3373e1
commit 997c33385b

View File

@ -336,6 +336,11 @@ class ModelsV16(private val col: Collection) {
return col.db.queryLongScalar("select count() from notes where mid = ?", m.id).toInt()
}
@RustCleanup("not in libAnki any more - may not be needed")
fun tmplUseCount(m: NoteType, ord: Int): Int {
return col.db.queryScalar("select count() from cards, notes where cards.nid = notes.id and notes.mid = ? and cards.ord = ?", m.id, ord)
}
/*
# Copying
##################################################