Hi,
First of all, congrats on ankiDroid 2. I've used ankiDroid since Jan 2011 and the improvements in speed are very noticeable.
I'm considering whether it'd be possible to write a webapp (unrelated to languages) that would interface with anki/ankiDroid. For that, I'm thinking the scheduler algo must be mostly the same. Is this correct?
I'm reading the code. First I want to understand the database. I guess the place to start would be:
private static void _addSchema(AnkiDb db, boolean setColConf) {
db.execute("create table if not exists col ( " + "id integer primary key, "
+ "crt integer not null," + "mod integer not null,"
+ "scm integer not null," + "ver integer not null,"
+ "dty integer not null," + "usn integer not null,"
+ "ls integer not null," + "conf text not null,"
+ "models text not null," + "decks text not null,"
+ "dconf text not null," + "tags text not null" + ");");
db.execute("create table if not exists notes (" + " id integer primary key,"
+ " guid text not null," + " mid integer not null,"
+ " mod integer not null," + " usn integer not null,"
+ " tags text not null," + " flds text not null,"
+ " sfld integer not null," + " csum integer not null,"
+ " flags integer not null," + " data text not null" + ");");
db.execute("create table if not exists cards (" + " id integer primary key,"
+ " nid integer not null," + " did integer not null,"
+ " ord integer not null," + " mod integer not null,"
+ " usn integer not null," + " type integer not null,"
+ " queue integer not null," + " due integer not null,"
+ " ivl integer not null," + " factor integer not null,"
+ " reps integer not null," + " lapses integer not null,"
+ " left integer not null," + " odue integer not null,"
+ " odid integer not null," + " flags integer not null,"
+ " data text not null" + ");");
db.execute("create table if not exists revlog (" + " id integer primary key,"
+ " cid integer not null," + " usn integer not null,"
+ " ease integer not null," + " ivl integer not null,"
+ " lastIvl integer not null," + " factor integer not null,"
+ " time integer not null," + " type integer not null" + ");");
db.execute("create table if not exists graves (" + " usn integer not null,"
+ " oid integer not null," + " type integer not null" + ")");
db.execute("INSERT OR IGNORE INTO col VALUES(1,0,0," +
Utils.intNow(1000) + "," + Collection.SCHEMA_VERSION +
",0,0,0,'','{}','','','{}')");
if (setColConf) {
_setColVars(db);
}
}
But the column names don't make any sense to me. They look like acronyms.
Is this documented anywhere? If no documentation (no worries!) Is there any other way I could guess the names?
Thanks!