use repr (instead of str) to print rql in __repr__ method of a result set
try:# missing on some old databasessql('CREATE INDEX entities_extid_idx ON entities(extid)')except:pass# already existscheckpoint()sql('CREATE INDEX entities_type_idx ON entities(type)')checkpoint()